コード例 #1
0
 def __init__(self, module_manager):
     SimpleVTKClassModuleBase.__init__(
         self, module_manager,
         vtk.vtkImageVariance3D(), 'Processing.',
         ('vtkImageData',), ('vtkImageData',),
         replaceDoc=True,
         inputFunctions=None, outputFunctions=None)
	def __init__(self):
		"""
		Initialization
		"""        
		MorphologicalFilter.__init__(self)
		self.vtkfilter = vtk.vtkImageVariance3D()        
		self.vtkfilter.AddObserver('ProgressEvent', lib.messenger.send)
		lib.messenger.connect(self.vtkfilter, "ProgressEvent", self.updateProgress)
		self.filterDesc = "Replaces each pixel/voxel with variance inside kernel\nInput: Grayscale image\nOutput: Grayscale image"
コード例 #3
0
    def __init__(self):
        """
		Initialization
		"""
        MorphologicalFilter.__init__(self)
        self.vtkfilter = vtk.vtkImageVariance3D()
        self.vtkfilter.AddObserver('ProgressEvent', lib.messenger.send)
        lib.messenger.connect(self.vtkfilter, "ProgressEvent",
                              self.updateProgress)
        self.filterDesc = "Replaces each pixel/voxel with variance inside kernel\nInput: Grayscale image\nOutput: Grayscale image"
コード例 #4
0
 def __init__(self, module_manager):
     SimpleVTKClassModuleBase.__init__(
         self,
         module_manager,
         vtk.vtkImageVariance3D(),
         "Processing.",
         ("vtkImageData",),
         ("vtkImageData",),
         replaceDoc=True,
         inputFunctions=None,
         outputFunctions=None,
     )
コード例 #5
0
ファイル: TestVariance3D.py プロジェクト: ciwei100000/vtk8
#!/usr/bin/env python
import vtk
from vtk.util.misc import vtkGetDataRoot
VTK_DATA_ROOT = vtkGetDataRoot()

# Image pipeline
reader = vtk.vtkImageReader()
reader.ReleaseDataFlagOff()
reader.SetDataByteOrderToLittleEndian()
reader.SetDataExtent(0, 63, 0, 63, 1, 93)
reader.SetDataSpacing(3.2, 3.2, 1.5)
reader.SetFilePrefix("" + str(VTK_DATA_ROOT) + "/Data/headsq/quarter")
reader.SetDataMask(0x7fff)
var = vtk.vtkImageVariance3D()
var.SetInputConnection(reader.GetOutputPort())
var.SetKernelSize(3, 3, 1)
viewer = vtk.vtkImageViewer()
viewer.SetInputConnection(var.GetOutputPort())
viewer.SetZSlice(22)
viewer.SetColorWindow(3000)
viewer.SetColorLevel(1000)
#viewer DebugOn
viewer.Render()
# --- end of script --
コード例 #6
0
ファイル: TestVariance3D.py プロジェクト: 0004c/VTK
#!/usr/bin/env python
import vtk
from vtk.test import Testing
from vtk.util.misc import vtkGetDataRoot
VTK_DATA_ROOT = vtkGetDataRoot()

# Image pipeline
reader = vtk.vtkImageReader()
reader.ReleaseDataFlagOff()
reader.SetDataByteOrderToLittleEndian()
reader.SetDataExtent(0,63,0,63,1,93)
reader.SetDataSpacing(3.2,3.2,1.5)
reader.SetFilePrefix("" + str(VTK_DATA_ROOT) + "/Data/headsq/quarter")
reader.SetDataMask(0x7fff)
var = vtk.vtkImageVariance3D()
var.SetInputConnection(reader.GetOutputPort())
var.SetKernelSize(3,3,1)
viewer = vtk.vtkImageViewer()
viewer.SetInputConnection(var.GetOutputPort())
viewer.SetZSlice(22)
viewer.SetColorWindow(3000)
viewer.SetColorLevel(1000)
#viewer DebugOn
viewer.Render()
# --- end of script --