vmtkimagereader
Description
read an image and stores it in a vtkImageData object
Input arguments
| Argument | Variable | Type | Length | Range | Default | Description |
| id | Id | str | 1 | | 0 | script id |
| handle | Self | self | 1 | | | handle to self |
| disabled | Disabled | bool | 1 | | 0 | disable execution and piping |
| f | Format | str | 1 | ["vtkxml","vtk","dicom","raw","meta","tiff","png"] | | file format |
| guessformat | GuessFormat | bool | 1 | | 1 | guess file format from extension |
| useitk | UseITKIO | bool | 1 | | 1 | use ITKIO mechanism |
| i | Image | vtkImageData | 1 | | | the input image |
| ifile | InputFileName | str | 1 | | | input file name |
| prefix | InputFilePrefix | str | 1 | | | input file prefix (e.g. foo_) |
| pattern | InputFilePattern | str | 1 | | | input file pattern (e.g. %s%04d.png) |
| extent | DataExtent | int | 6 | | [-1, -1, -1, -1, -1, -1] | 3D extent of the image - raw and png |
| headersize | HeaderSize | int | 1 | (0,) | 0 | size of the image header - raw only |
| spacing | DataSpacing | float | 3 | | [1.0, 1.0, 1.0] | spacing of the image - raw, tiff, png, itk |
| origin | DataOrigin | float | 3 | | [0.0, 0.0, 0.0] | origin of the image - raw, tiff, png, itk |
| orientation | DesiredOrientation | str | 1 | ["native","axial","coronal","sagittal"] | native | desired data orientation - itk only |
| byteorder | DataByteOrder | str | 1 | ["littleendian","bigendian"] | littleendian | byte ordering - raw only |
| scalartype | DataScalarType | str | 1 | ["float","double","int","short","ushort","uchar"] | float | scalar type - raw only |
| filedimensionality | FileDimensionality | int | 1 | (2,3) | 3 | dimensionality of the file to read - raw only |
| flip | Flip | bool | 3 | | [0, 0, 0] | toggle flipping of the corresponding axis |
| autoorientdicom | AutoOrientDICOMImage | bool | 1 | | 1 | flip a dicom stack in order to have a left-to-right, posterio-to-anterior, inferior-to-superior image; this is based on the "image orientation (patient)" field in the dicom header |
| ofile | ImageOutputFileName | str | 1 | | | filename for the default Image writer |
Output arguments
| Argument | Variable | Type | Length | Range | Default | Description |
| id | Id | str | 1 | | 0 | script id |
| handle | Self | self | 1 | | | handle to self |
| o | Image | vtkImageData | 1 | | | the output image |
| rastoijkmatrix | RasToIjkMatrixCoefficients | float | 16 | | [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1] | |
| xyztorasmatrix | XyzToRasMatrixCoefficients | float | 16 | | [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1] | |