VTK
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes
vtkMINCImageReader Class Reference

A reader for MINC files. More...

#include <vtkMINCImageReader.h>

Inheritance diagram for vtkMINCImageReader:
Inheritance graph
[legend]
Collaboration diagram for vtkMINCImageReader:
Collaboration graph
[legend]

List of all members.

Public Types

typedef vtkImageReader2 Superclass

Public Member Functions

virtual int IsA (const char *type)
vtkMINCImageReaderNewInstance () const
virtual void PrintSelf (ostream &os, vtkIndent indent)
virtual void SetFileName (const char *name)
virtual int CanReadFile (const char *name)
virtual vtkMatrix4x4GetDirectionCosines ()
virtual int GetNumberOfTimeSteps ()
virtual vtkMINCImageAttributesGetImageAttributes ()
virtual const char * GetFileExtensions ()
virtual const char * GetDescriptiveName ()
virtual double GetRescaleSlope ()
virtual double GetRescaleIntercept ()
virtual void SetRescaleRealValues (int)
virtual void RescaleRealValuesOn ()
virtual void RescaleRealValuesOff ()
virtual int GetRescaleRealValues ()
virtual doubleGetDataRange ()
virtual void GetDataRange (double range[2])
virtual void SetTimeStep (int)
virtual int GetTimeStep ()

Static Public Member Functions

static int IsTypeOf (const char *type)
static vtkMINCImageReaderSafeDownCast (vtkObjectBase *o)
static vtkMINCImageReaderNew ()

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 vtkMINCImageReader ()
 ~vtkMINCImageReader ()
virtual int OpenNetCDFFile (const char *filename, int &ncid)
virtual int CloseNetCDFFile (int ncid)
virtual int IndexFromDimensionName (const char *dimName)
virtual int ReadMINCFileAttributes ()
virtual void FindRangeAndRescaleValues ()
virtual void ExecuteInformation ()
virtual void ExecuteDataWithInformation (vtkDataObject *out, vtkInformation *outInfo)

Static Protected Member Functions

static int ConvertMINCTypeToVTKType (int minctype, int mincsigned)

Protected Attributes

int MINCImageType
int MINCImageTypeSigned
double ValidRange [2]
double ImageRange [2]
double DataRange [2]
int NumberOfTimeSteps
int TimeStep
vtkMatrix4x4DirectionCosines
double RescaleSlope
double RescaleIntercept
int RescaleRealValues
vtkMINCImageAttributesImageAttributes
int FileNameHasChanged

Detailed Description

A reader for MINC files.

MINC is a NetCDF-based medical image file format that was developed at the Montreal Neurological Institute in 1992. This class will read a MINC file into VTK, rearranging the data to match the VTK x, y, and z dimensions, and optionally rescaling real-valued data to VTK_FLOAT if RescaleRealValuesOn() is set. If RescaleRealValues is off, then the data will be stored in its original data type and the GetRescaleSlope(), GetRescaleIntercept() method can be used to retrieve global rescaling parameters. If the original file had a time dimension, the SetTimeStep() method can be used to specify a time step to read. All of the original header information can be accessed though the GetImageAttributes() method.

See also:
vtkMINCImageWriter vtkMINCImageAttributes
Thanks:
Thanks to David Gobbi for writing this class and Atamai Inc. for contributing it to VTK.
Tests:
vtkMINCImageReader (Tests)

Definition at line 87 of file vtkMINCImageReader.h.


Member Typedef Documentation

Reimplemented from vtkImageReader2.

Definition at line 90 of file vtkMINCImageReader.h.


Constructor & Destructor Documentation


Member Function Documentation

static int vtkMINCImageReader::IsTypeOf ( const char *  name) [static]

Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkImageReader2.

virtual int vtkMINCImageReader::IsA ( const char *  name) [virtual]

Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkImageReader2.

Reimplemented from vtkImageReader2.

virtual vtkObjectBase* vtkMINCImageReader::NewInstanceInternal ( ) const [protected, virtual]

Reimplemented from vtkImageReader2.

Reimplemented from vtkImageReader2.

Create an object with Debug turned off, modified time initialized to zero, and reference counting on.

Reimplemented from vtkImageReader2.

virtual void vtkMINCImageReader::PrintSelf ( ostream &  os,
vtkIndent  indent 
) [virtual]

Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from vtkImageReader2.

virtual void vtkMINCImageReader::SetFileName ( const char *  name) [virtual]

Set the file name.

Reimplemented from vtkImageReader2.

virtual const char* vtkMINCImageReader::GetFileExtensions ( ) [inline, virtual]

Get the entension for this file format.

Reimplemented from vtkImageReader2.

Definition at line 100 of file vtkMINCImageReader.h.

virtual const char* vtkMINCImageReader::GetDescriptiveName ( ) [inline, virtual]

Get the name of this file format.

Reimplemented from vtkImageReader2.

Definition at line 106 of file vtkMINCImageReader.h.

virtual int vtkMINCImageReader::CanReadFile ( const char *  name) [virtual]

Test whether the specified file can be read.

Get a matrix that describes the orientation of the data. The three columns of the matrix are the direction cosines for the x, y and z dimensions respectively.

Get the slope and intercept for rescaling the scalar values to real data values. To convert scalar values to real values, use the equation y = x*RescaleSlope + RescaleIntercept.

Get the slope and intercept for rescaling the scalar values to real data values. To convert scalar values to real values, use the equation y = x*RescaleSlope + RescaleIntercept.

virtual void vtkMINCImageReader::SetRescaleRealValues ( int  ) [virtual]

Rescale real data values to float. If this is done, the RescaleSlope and RescaleIntercept will be set to 1 and 0 respectively. This is off by default.

virtual void vtkMINCImageReader::RescaleRealValuesOn ( ) [virtual]

Rescale real data values to float. If this is done, the RescaleSlope and RescaleIntercept will be set to 1 and 0 respectively. This is off by default.

virtual void vtkMINCImageReader::RescaleRealValuesOff ( ) [virtual]

Rescale real data values to float. If this is done, the RescaleSlope and RescaleIntercept will be set to 1 and 0 respectively. This is off by default.

Rescale real data values to float. If this is done, the RescaleSlope and RescaleIntercept will be set to 1 and 0 respectively. This is off by default.

virtual double* vtkMINCImageReader::GetDataRange ( ) [virtual]

Get the scalar range of the output from the information in the file header. This is more efficient that computing the scalar range, but in some cases the MINC file stores an incorrect valid_range and the DataRange will be incorrect.

virtual void vtkMINCImageReader::GetDataRange ( double  range[2]) [inline, virtual]

Get the scalar range of the output from the information in the file header. This is more efficient that computing the scalar range, but in some cases the MINC file stores an incorrect valid_range and the DataRange will be incorrect.

Definition at line 141 of file vtkMINCImageReader.h.

Get the number of time steps in the file.

virtual void vtkMINCImageReader::SetTimeStep ( int  ) [virtual]

Set the time step to read.

virtual int vtkMINCImageReader::GetTimeStep ( ) [virtual]

Set the time step to read.

Get the image attributes, which contain patient information and other useful metadata.

virtual int vtkMINCImageReader::OpenNetCDFFile ( const char *  filename,
int ncid 
) [protected, virtual]
virtual int vtkMINCImageReader::CloseNetCDFFile ( int  ncid) [protected, virtual]
virtual int vtkMINCImageReader::IndexFromDimensionName ( const char *  dimName) [protected, virtual]
virtual int vtkMINCImageReader::ReadMINCFileAttributes ( ) [protected, virtual]
virtual void vtkMINCImageReader::FindRangeAndRescaleValues ( ) [protected, virtual]
static int vtkMINCImageReader::ConvertMINCTypeToVTKType ( int  minctype,
int  mincsigned 
) [static, protected]
virtual void vtkMINCImageReader::ExecuteInformation ( ) [protected, virtual]

Reimplemented from vtkImageReader2.

virtual void vtkMINCImageReader::ExecuteDataWithInformation ( vtkDataObject output,
vtkInformation outInfo 
) [protected, virtual]

This is a convenience method that is implemented in many subclasses instead of RequestData. It is called by RequestData.

Reimplemented from vtkImageReader2.


Member Data Documentation

Definition at line 163 of file vtkMINCImageReader.h.

Definition at line 164 of file vtkMINCImageReader.h.

Definition at line 166 of file vtkMINCImageReader.h.

Definition at line 167 of file vtkMINCImageReader.h.

Definition at line 168 of file vtkMINCImageReader.h.

Definition at line 170 of file vtkMINCImageReader.h.

Definition at line 171 of file vtkMINCImageReader.h.

Definition at line 172 of file vtkMINCImageReader.h.

Definition at line 173 of file vtkMINCImageReader.h.

Definition at line 174 of file vtkMINCImageReader.h.

Definition at line 175 of file vtkMINCImageReader.h.

Definition at line 176 of file vtkMINCImageReader.h.

Definition at line 178 of file vtkMINCImageReader.h.


The documentation for this class was generated from the following file: