def UpdateColorsInElectrodeView(self, nodelist, Offset = 0):
ElectrodeViewObjectDummy = self.electrode.SmallMultipleElectrode[1]
for i in nodelist:
try:
ElectrodeViewNumberToUpdate = self.AggregateHashmap[i['timestep']]
except KeyError:
continue
# getting the electrode view number
ElectrodeViewObject = self.electrode.SmallMultipleElectrode[ElectrodeViewNumberToUpdate]
assert ElectrodeViewObject.ChunkNo == ElectrodeViewNumberToUpdate
# get the elements in the community defined by that
CommunityNumber = i['OriginalAssignmentValue']
Elements = i['Elements']
Color = i['color'].replace("rgb(", "").replace(")", "").replace(" ", "").split(',')
Color = map(int, Color)
for element in Elements:
ActualElectrodeNumber = self.electrode.ElectrodeIds[element]
norm = ElectrodeViewObject.ElectrodeOpacity[element].normalize(i['timestep'], ActualElectrodeNumber)
ElectrodeViewObject.NodeIds[element].PutFinalColors(norm[0],norm[1], QtGui.QColor(Color[0],Color[1],Color[2]),i['timestep'],CommunityNumber,ElectrodeViewObjectDummy.slices)
assert ElectrodeViewObject.NodeIds[element].counter == element
ElectrodeViewObject.NodeIds[element].update()
CommunitiesAcrossTimeStep.py 文件源码
python
阅读 17
收藏 0
点赞 0
评论 0
评论列表
文章目录