Esempio n. 1
0
    def __init__(self):
        self.dti_math = slicer.vtkDiffusionTensorMathematics()

        self.single_pixel_image = vtk.vtkImageData()
        self.single_pixel_image.SetExtent(0, 0, 0, 0, 0, 0)

        self.tensor_data = vtk.vtkFloatArray()
        self.tensor_data.SetNumberOfComponents(9)
        self.tensor_data.SetNumberOfTuples(self.single_pixel_image.GetNumberOfPoints())
        self.single_pixel_image.GetPointData().SetTensors(self.tensor_data)

        self.dti_math.SetInputData(self.single_pixel_image)
Esempio n. 2
0
    def __init__(self):
        self.dti_math = slicer.vtkDiffusionTensorMathematics()

        self.single_pixel_image = vtk.vtkImageData()
        self.single_pixel_image.SetExtent(0, 0, 0, 0, 0, 0)
        if vtk.VTK_MAJOR_VERSION <= 5:
          self.single_pixel_image.AllocateScalars()

        self.tensor_data = vtk.vtkFloatArray()
        self.tensor_data.SetNumberOfComponents(9)
        self.tensor_data.SetNumberOfTuples(self.single_pixel_image.GetNumberOfPoints())
        self.single_pixel_image.GetPointData().SetTensors(self.tensor_data)

        if vtk.VTK_MAJOR_VERSION <= 5:
          self.dti_math.SetInput(self.single_pixel_image)
        else:
          self.dti_math.SetInputData(self.single_pixel_image)
Esempio n. 3
0
    def __init__(self):
        self.dti_math = slicer.vtkDiffusionTensorMathematics()

        self.single_pixel_image = vtk.vtkImageData()
        self.single_pixel_image.SetExtent(0, 0, 0, 0, 0, 0)
        if vtk.VTK_MAJOR_VERSION <= 5:
          self.single_pixel_image.AllocateScalars()

        self.tensor_data = vtk.vtkFloatArray()
        self.tensor_data.SetNumberOfComponents(9)
        self.tensor_data.SetNumberOfTuples(self.single_pixel_image.GetNumberOfPoints())
        self.single_pixel_image.GetPointData().SetTensors(self.tensor_data)

        if vtk.VTK_MAJOR_VERSION <= 5:
          self.dti_math.SetInput(self.single_pixel_image)
        else:
          self.dti_math.SetInputData(self.single_pixel_image)