예제 #1
0
 def __init__(self, module_manager):
     SimpleVTKClassModuleBase.__init__(
         self, module_manager,
         vtk.vtkGESignaReader(), 'Reading vtkGESigna.',
         (), ('vtkGESigna',),
         replaceDoc=True,
         inputFunctions=None, outputFunctions=None)
예제 #2
0
 def __init__(self, module_manager):
     SimpleVTKClassModuleBase.__init__(self,
                                       module_manager,
                                       vtk.vtkGESignaReader(),
                                       'Reading vtkGESigna.', (),
                                       ('vtkGESigna', ),
                                       replaceDoc=True,
                                       inputFunctions=None,
                                       outputFunctions=None)
예제 #3
0
def loadGenesisImage(directory, range=(1, 60)):
    reader = vtk.vtkGESignaReader()
    reader.SetDataExtent(0, 0, 0, 0, range[0], range[1])
    #reader.SetFileNameSliceOffset(1)
    reader.SetFilePrefix(directory)
    reader.SetFilePattern("%s/I.%03d")
    #print 'header size =', reader.GetHeaderSize()
    #print 'format =', reader.GetDescriptiveName()
    reader.Update()
    return reader.GetOutput()
예제 #4
0
#!/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.vtkGESignaReader()
reader.SetFileName("" + str(VTK_DATA_ROOT) + "/Data/E07733S002I009.MR")
gradient = vtk.vtkImageGradientMagnitude()
gradient.SetDimensionality(2)
gradient.SetInputConnection(reader.GetOutputPort())
viewer = vtk.vtkImageViewer()
viewer.SetInputConnection(gradient.GetOutputPort())
viewer.SetColorWindow(250)
viewer.SetColorLevel(125)
viewer.Render()
# --- end of script --