本文整理汇总了Python中Visualizer.VisualizationModules.VisualizationModule.setDataUnit方法的典型用法代码示例。如果您正苦于以下问题:Python VisualizationModule.setDataUnit方法的具体用法?Python VisualizationModule.setDataUnit怎么用?Python VisualizationModule.setDataUnit使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Visualizer.VisualizationModules.VisualizationModule
的用法示例。
在下文中一共展示了VisualizationModule.setDataUnit方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: setDataUnit
# 需要导入模块: from Visualizer.VisualizationModules import VisualizationModule [as 别名]
# 或者: from Visualizer.VisualizationModules.VisualizationModule import setDataUnit [as 别名]
def setDataUnit(self, dataunit):
"""
Sets the dataunit this module uses for visualization
"""
if dataunit == None:
return
VisualizationModule.setDataUnit(self, dataunit)
示例2: setDataUnit
# 需要导入模块: from Visualizer.VisualizationModules import VisualizationModule [as 别名]
# 或者: from Visualizer.VisualizationModules.VisualizationModule import setDataUnit [as 别名]
def setDataUnit(self, dataunit):
"""
Sets the dataunit this module uses for visualization
"""
VisualizationModule.setDataUnit(self, dataunit)
if self.dataUnit.isProcessed():
data = self.dataUnit.getSourceDataUnits()[0].getTimepoint(0)
else:
data = self.dataUnit.getTimepoint(0)
self.origin = data.GetOrigin()
self.spacing = data.GetSpacing()
self.extent = data.GetWholeExtent()
x = self.extent[1] / 2
y = self.extent[3] / 2
z = self.extent[5] / 2
self.setDisplaySlice(x, y, z)
ctf = self.dataUnit.getColorTransferFunction()
self.planeWidgetX.GetColorMap().SetLookupTable(ctf)
self.planeWidgetX.maxDim = x
self.planeWidgetY.GetColorMap().SetLookupTable(ctf)
self.planeWidgetY.maxDim = y
self.planeWidgetZ.GetColorMap().SetLookupTable(ctf)
self.planeWidgetZ.maxDim = z
示例3: setDataUnit
# 需要导入模块: from Visualizer.VisualizationModules import VisualizationModule [as 别名]
# 或者: from Visualizer.VisualizationModules.VisualizationModule import setDataUnit [as 别名]
def setDataUnit(self, dataunit):
"""
Sets the dataunit this module uses for visualization
"""
VisualizationModule.setDataUnit(self, dataunit)
data = self.getInput(1)
self.boxWidget.SetInput(data)
self.boxWidget.PlaceWidget()
self.boxWidget.On()
示例4: setDataUnit
# 需要导入模块: from Visualizer.VisualizationModules import VisualizationModule [as 别名]
# 或者: from Visualizer.VisualizationModules.VisualizationModule import setDataUnit [as 别名]
def setDataUnit(self, dataunit):
"""
Sets the dataunit this module uses for visualization
"""
VisualizationModule.setDataUnit(self, dataunit)
if self.visualizer.getProcessedMode():
data = self.dataUnit.getSourceDataUnits()[0].getTimepoint(0)
else:
data = self.dataUnit.getTimepoint(0)
sx, sy, sz = data.GetSpacing()
示例5: setDataUnit
# 需要导入模块: from Visualizer.VisualizationModules import VisualizationModule [as 别名]
# 或者: from Visualizer.VisualizationModules.VisualizationModule import setDataUnit [as 别名]
def setDataUnit(self, dataunit):
"""
Sets the dataunit this module uses for visualization
"""
VisualizationModule.setDataUnit(self, dataunit)
if self.visualizer.getProcessedMode():
self.voxelSize = dataunit.getSourceDataUnits()[0].getVoxelSize()
else:
self.voxelSize = dataunit.getVoxelSize()
self.updateLine()
示例6: setDataUnit
# 需要导入模块: from Visualizer.VisualizationModules import VisualizationModule [as 别名]
# 或者: from Visualizer.VisualizationModules.VisualizationModule import setDataUnit [as 别名]
def setDataUnit(self, dataunit):
"""
Method: setDataUnit(self)
Sets the dataunit this module uses for visualization
"""
VisualizationModule.setDataUnit(self, dataunit)
if self.visualizer.getProcessedMode():
data = self.dataUnit.getSourceDataUnits()[0].getTimepoint(0)
else:
data = self.dataUnit.getTimepoint(0)
ctf = self.dataUnit.getColorTransferFunction()
示例7: setDataUnit
# 需要导入模块: from Visualizer.VisualizationModules import VisualizationModule [as 别名]
# 或者: from Visualizer.VisualizationModules.VisualizationModule import setDataUnit [as 别名]
def setDataUnit(self, dataunit):
"""
Sets the dataunit this module uses for visualization
"""
VisualizationModule.setDataUnit(self, dataunit)
if self.visualizer.getProcessedMode():
data = self.dataUnit.getSourceDataUnits()[0].getTimepoint(0)
else:
data = self.dataUnit.getTimepoint(0)
self.data = data
sx, sy, sz = data.GetSpacing()
vx, vy, vz = self.dataUnit.getVoxelSize()
scale = vx
scale = 1000000
self.representation.SetLabelFormat("%.2fum")
self.representation.SetScaleX(vx)
self.representation.SetScaleZ(vz)
示例8: setDataUnit
# 需要导入模块: from Visualizer.VisualizationModules import VisualizationModule [as 别名]
# 或者: from Visualizer.VisualizationModules.VisualizationModule import setDataUnit [as 别名]
def setDataUnit(self, dataunit):
"""
Sets the dataunit this module uses for visualization
"""
VisualizationModule.setDataUnit(self, dataunit)
data = self.getInput(1)
self.origin = data.GetOrigin()
self.spacing = data.GetSpacing()
self.extent = data.GetWholeExtent()
y = self.extent[3]
x = self.extent[1]
self.planeWidget.SetInput(data)
self.planeWidget.SetOrigin(-32, -32, -32)
self.planeWidget.SetPoint1(0, y + 32, 0)
self.planeWidget.SetPoint2(x + 32, 0, 0)
self.planeWidget.PlaceWidget()
示例9: setDataUnit
# 需要导入模块: from Visualizer.VisualizationModules import VisualizationModule [as 别名]
# 或者: from Visualizer.VisualizationModules.VisualizationModule import setDataUnit [as 别名]
def setDataUnit(self, dataunit):
"""
Sets the dataunit this module uses for visualization
"""
Logging.info("Dataunit for Volume Rendering:", dataunit, kw = "rendering")
VisualizationModule.setDataUnit(self, dataunit)
otf, otf2 = vtk.vtkPiecewiseFunction(), vtk.vtkPiecewiseFunction()
d = dataunit.getSingleComponentBitDepth()
maxv = 2 ** d
otf2.AddPoint(0, 0.0)
otf2.AddPoint(maxv, 1.0)
otf.AddPoint(0, 0.0)
otf.AddPoint(maxv, 0.2)
self.otfs = [otf, otf, otf, otf2, otf]
self.setInputChannel(1, 0)
self.parameters["Palette"] = self.colorTransferFunction
示例10: setDataUnit
# 需要导入模块: from Visualizer.VisualizationModules import VisualizationModule [as 别名]
# 或者: from Visualizer.VisualizationModules.VisualizationModule import setDataUnit [as 别名]
def setDataUnit(self, dataunit):
"""
Sets the dataunit this module uses for visualization
"""
VisualizationModule.setDataUnit(self, dataunit)