vtkmodules.util.vtkImageExportToArray¶
vtkImageExportToArray - a NumPy front-end to vtkImageExport
This class converts a VTK image to a numpy array. The output array will always have 3 dimensions (or 4, if the image had multiple scalar components).
To use this class, you must have numpy installed (http://numpy.scipy.org)
Methods
SetInputConnection(vtkAlgorithmOutput) – connect to VTK image pipeline SetInputData(vtkImageData) – set an vtkImageData to export GetArray() – execute pipeline and return a numpy array
Methods from vtkImageExport
GetDataExtent() GetDataSpacing() GetDataOrigin()
Module Contents¶
Classes¶
API¶
- class vtkmodules.util.vtkImageExportToArray.vtkImageExportToArray¶
Initialization
- __typeDict¶
None
- __sizeDict¶
None
- SetConvertUnsignedShortToInt(yesno)¶
- GetConvertUnsignedShortToInt()¶
- ConvertUnsignedShortToIntOn()¶
- ConvertUnsignedShortToIntOff()¶
- SetInputConnection(input)¶
- SetInputData(input)¶
- GetInput()¶
- GetArray()¶
- GetDataExtent()¶
- GetDataSpacing()¶
- GetDataOrigin()¶