38 #ifndef vtkNIFTIImageReader_h
39 #define vtkNIFTIImageReader_h
41 #include "vtkIOImageModule.h"
70 return ".nii .nii.gz .img .img.gz .hdr .hdr.gz"; }
91 vtkGetMacro(TimeAsVector,
bool);
120 vtkGetMacro(PlanarRGB,
bool);
206 const char *fname,
const char *ext1,
const char *ext2);
Superclass of binary file readers.
a simple class to control print indentation
represent and manipulate 4x4 transformation matrices
Read NIfTI-1 and NIfTI-2 medical image files.
vtkMatrix4x4 * GetSFormMatrix()
Get a matrix that gives the "sform" orientation and offset for the data.
static bool CheckExtension(const char *fname, const char *ext)
Do a case-insensitive check for the given extension.
double GetRescaleIntercept()
double GetQFac()
QFac gives the slice order in the NIFTI file versus the VTK image.
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
Read the header information.
static int CheckNIFTIVersion(const nifti_1_header *hdr)
Check the version of the header.
double QFac
Is -1 if VTK slice order is opposite to NIFTI slice order, +1 otherwise.
vtkMatrix4x4 * GetQFormMatrix()
Get a matrix that gives the "qform" orientation and offset for the data.
double GetRescaleSlope()
Get the slope and intercept for rescaling the scalar values.
virtual const char * GetFileExtensions()
Valid extensions for this file type.
void PrintSelf(ostream &os, vtkIndent indent) override
Print information about this object.
virtual const char * GetDescriptiveName()
Return a descriptive name that might be useful in a GUI.
bool PlanarRGB
Use planar RGB instead of the default (packed).
static char * ReplaceExtension(const char *fname, const char *ext1, const char *ext2)
Make a new filename by replacing extension "ext1" with "ext2".
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
Read the voxel data.
double RescaleIntercept
Information for rescaling data to quantitative units.
vtkMatrix4x4 * QFormMatrix
The orientation matrices for the NIFTI file.
static bool CheckAnalyzeHeader(const nifti_1_header *hdr)
Return true if an Analyze 7.5 header was found.
vtkNIFTIImageHeader * GetNIFTIHeader()
Get the raw header information from the NIfTI file.
static vtkNIFTIImageReader * New()
Static method for construction.
int CanReadFile(const char *filename)
Return true if this reader can read the given file.
vtkMatrix4x4 * SFormMatrix
bool TimeAsVector
Read the time dimension as if it was a vector dimension.
int GetTimeDimension()
Get the time dimension that was stored in the NIFTI header.
vtkNIFTIImageHeader * NIFTIHeader
A copy of the header from the file that was most recently read.
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.