vmtkimagereader

Description

read an image and stores it in a vtkImageData object

Input arguments

ArgumentVariableTypeLengthRangeDefaultDescription
idIdstr10script id
handleSelfself1handle to self
disabledDisabledbool10disable execution and piping
fFormatstr1["vtkxml","vtk","dicom","raw","meta","tiff","png"]file format
guessformatGuessFormatbool11guess file format from extension
useitkUseITKIObool11use ITKIO mechanism
iImagevtkImageData1the input image
ifileInputFileNamestr1input file name
prefixInputFilePrefixstr1input file prefix (e.g. foo_)
patternInputFilePatternstr1input file pattern (e.g. %s%04d.png)
extentDataExtentint6[-1, -1, -1, -1, -1, -1]3D extent of the image - raw and png
headersizeHeaderSizeint1(0,)0size of the image header - raw only
spacingDataSpacingfloat3[1.0, 1.0, 1.0]spacing of the image - raw, tiff, png, itk
originDataOriginfloat3[0.0, 0.0, 0.0]origin of the image - raw, tiff, png, itk
orientationDesiredOrientationstr1["native","axial","coronal","sagittal"]nativedesired data orientation - itk only
byteorderDataByteOrderstr1["littleendian","bigendian"]littleendianbyte ordering - raw only
scalartypeDataScalarTypestr1["float","double","int","short","ushort","uchar"]floatscalar type - raw only
filedimensionalityFileDimensionalityint1(2,3)3dimensionality of the file to read - raw only
flipFlipbool3[0, 0, 0]toggle flipping of the corresponding axis
autoorientdicomAutoOrientDICOMImagebool11flip 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
ofileImageOutputFileNamestr1filename for the default Image writer

Output arguments

ArgumentVariableTypeLengthRangeDefaultDescription
idIdstr10script id
handleSelfself1handle to self
oImagevtkImageData1the output image
rastoijkmatrixRasToIjkMatrixCoefficientsfloat16[1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]
xyztorasmatrixXyzToRasMatrixCoefficientsfloat16[1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]