当前位置: 首页>>代码示例>>Python>>正文


Python VisualizationModule.setDataUnit方法代码示例

本文整理汇总了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)
开发者ID:chalkie666,项目名称:bioimagexd-svn-import-from-sourceforge,代码行数:9,代码来源:PDB.py

示例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
开发者ID:chalkie666,项目名称:bioimagexd-svn-import-from-sourceforge,代码行数:29,代码来源:Orthogonal.py

示例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()
开发者ID:chalkie666,项目名称:bioimagexd-svn-import-from-sourceforge,代码行数:12,代码来源:CutWidget.py

示例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()
开发者ID:chalkie666,项目名称:bioimagexd-svn-import-from-sourceforge,代码行数:12,代码来源:Angle.py

示例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()
开发者ID:chalkie666,项目名称:bioimagexd-svn-import-from-sourceforge,代码行数:13,代码来源:ScaleBar.py

示例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()
开发者ID:chalkie666,项目名称:bioimagexd-svn-import-from-sourceforge,代码行数:15,代码来源:Spline.py

示例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)
开发者ID:chalkie666,项目名称:bioimagexd-svn-import-from-sourceforge,代码行数:20,代码来源:Distance.py

示例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()
开发者ID:chalkie666,项目名称:bioimagexd-svn-import-from-sourceforge,代码行数:21,代码来源:ClippingPlane.py

示例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
开发者ID:chalkie666,项目名称:bioimagexd-svn-import-from-sourceforge,代码行数:22,代码来源:Volume.py

示例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)
开发者ID:chalkie666,项目名称:bioimagexd-svn-import-from-sourceforge,代码行数:7,代码来源:Axes.py


注:本文中的Visualizer.VisualizationModules.VisualizationModule.setDataUnit方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。