Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

vtkImageReader2 Class Reference

#include <vtkImageReader2.h>

Inheritance diagram for vtkImageReader2:

Inheritance graph
[legend]
Collaboration diagram for vtkImageReader2:

Collaboration graph
[legend]
List of all members.

Detailed Description

Superclass of binary file readers.

vtkImageReader2 is the parent class for vtkImageReader. It is a good super class for streaming readers that do not require a mask or transform on the data. vtkImageReader was implemented before vtkImageReader2, vtkImageReader2 is intended to have a simpler interface.

See also:
vtkJPEGReader vtkPNGReader vtkImageReader vtkGESignaReader

Definition at line 36 of file vtkImageReader2.h.

Public Types

typedef vtkImageAlgorithm Superclass

Public Member Functions

virtual const char * GetClassName ()
virtual int IsA (const char *type)
ifstream * GetFile ()
virtual unsigned long * GetDataIncrements ()
virtual void GetDataIncrements (unsigned long data[4])
virtual int OpenFile ()
void PrintSelf (ostream &os, vtkIndent indent)
virtual void SetFileName (const char *)
virtual char * GetFileName ()
virtual void SetFilePrefix (const char *)
virtual char * GetFilePrefix ()
virtual void SetFilePattern (const char *)
virtual char * GetFilePattern ()
virtual void SetDataScalarType (int type)
virtual void SetDataScalarTypeToFloat ()
virtual void SetDataScalarTypeToDouble ()
virtual void SetDataScalarTypeToInt ()
virtual void SetDataScalarTypeToShort ()
virtual void SetDataScalarTypeToUnsignedShort ()
virtual void SetDataScalarTypeToUnsignedChar ()
virtual int GetDataScalarType ()
virtual void SetNumberOfScalarComponents (int)
virtual int GetNumberOfScalarComponents ()
virtual void SetDataExtent (int, int, int, int, int, int)
virtual void SetDataExtent (int[6])
virtual int * GetDataExtent ()
virtual void GetDataExtent (int &, int &, int &, int &, int &, int &)
virtual void GetDataExtent (int[6])
virtual void SetFileDimensionality (int)
int GetFileDimensionality ()
virtual void SetDataSpacing (double, double, double)
virtual void SetDataSpacing (double[3])
virtual double * GetDataSpacing ()
virtual void GetDataSpacing (double &, double &, double &)
virtual void GetDataSpacing (double[3])
virtual void SetDataOrigin (double, double, double)
virtual void SetDataOrigin (double[3])
virtual double * GetDataOrigin ()
virtual void GetDataOrigin (double &, double &, double &)
virtual void GetDataOrigin (double[3])
unsigned long GetHeaderSize ()
unsigned long GetHeaderSize (unsigned long slice)
virtual void SetHeaderSize (unsigned long size)
virtual void SetDataByteOrderToBigEndian ()
virtual void SetDataByteOrderToLittleEndian ()
virtual int GetDataByteOrder ()
virtual void SetDataByteOrder (int)
virtual const char * GetDataByteOrderAsString ()
virtual void SetFileNameSliceOffset (int)
virtual int GetFileNameSliceOffset ()
virtual void SetFileNameSliceSpacing (int)
virtual int GetFileNameSliceSpacing ()
virtual void SetSwapBytes (int)
virtual int GetSwapBytes ()
virtual void SwapBytesOn ()
virtual void SwapBytesOff ()
virtual void SeekFile (int i, int j, int k)
virtual void FileLowerLeftOn ()
virtual void FileLowerLeftOff ()
virtual int GetFileLowerLeft ()
virtual void SetFileLowerLeft (int)
virtual void ComputeInternalFileName (int slice)
virtual char * GetInternalFileName ()
virtual int CanReadFile (const char *vtkNotUsed(fname))
virtual const char * GetFileExtensions ()
virtual const char * GetDescriptiveName ()

Static Public Member Functions

static vtkImageReader2New ()
static int IsTypeOf (const char *type)
static vtkImageReader2SafeDownCast (vtkObject *o)

Protected Member Functions

 vtkImageReader2 ()
 ~vtkImageReader2 ()
virtual int RequestInformation (vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
virtual void ExecuteInformation ()
virtual void ExecuteData (vtkDataObject *data)
virtual void ComputeDataIncrements ()

Protected Attributes

char * InternalFileName
char * FileName
char * FilePrefix
char * FilePattern
int NumberOfScalarComponents
int FileLowerLeft
ifstream * File
unsigned long DataIncrements [4]
int DataExtent [6]
int SwapBytes
int FileDimensionality
unsigned long HeaderSize
int DataScalarType
unsigned long ManualHeaderSize
double DataSpacing [3]
double DataOrigin [3]
int FileNameSliceOffset
int FileNameSliceSpacing


Member Typedef Documentation

typedef vtkImageAlgorithm vtkImageReader2::Superclass
 

Reimplemented from vtkImageAlgorithm.

Reimplemented in vtkBMPReader, vtkDICOMImageReader, vtkGESignaReader, vtkImageReader, vtkJPEGReader, vtkMedicalImageReader2, vtkMetaImageReader, vtkPNGReader, vtkPNMReader, vtkSLCReader, and vtkTIFFReader.

Definition at line 40 of file vtkImageReader2.h.


Constructor & Destructor Documentation

vtkImageReader2::vtkImageReader2  )  [protected]
 

vtkImageReader2::~vtkImageReader2  )  [protected]
 


Member Function Documentation

static vtkImageReader2* vtkImageReader2::New  )  [static]
 

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

Reimplemented from vtkAlgorithm.

Reimplemented in vtkBMPReader, vtkDICOMImageReader, vtkGESignaReader, vtkImageReader, vtkJPEGReader, vtkMedicalImageReader2, vtkMetaImageReader, vtkPNGReader, vtkPNMReader, vtkSLCReader, and vtkTIFFReader.

virtual const char* vtkImageReader2::GetClassName  )  [virtual]
 

Reimplemented from vtkImageAlgorithm.

Reimplemented in vtkBMPReader, vtkDICOMImageReader, vtkGESignaReader, vtkImageReader, vtkJPEGReader, vtkMedicalImageReader2, vtkMetaImageReader, vtkPNGReader, vtkPNMReader, vtkSLCReader, and vtkTIFFReader.

static int vtkImageReader2::IsTypeOf const char *  type  )  [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 vtkTypeRevisionMacro found in vtkSetGet.h.

Reimplemented from vtkImageAlgorithm.

Reimplemented in vtkBMPReader, vtkDICOMImageReader, vtkGESignaReader, vtkImageReader, vtkJPEGReader, vtkMedicalImageReader2, vtkMetaImageReader, vtkPNGReader, vtkPNMReader, vtkSLCReader, and vtkTIFFReader.

virtual int vtkImageReader2::IsA const char *  type  )  [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 vtkTypeRevisionMacro found in vtkSetGet.h.

Reimplemented from vtkImageAlgorithm.

Reimplemented in vtkBMPReader, vtkDICOMImageReader, vtkGESignaReader, vtkImageReader, vtkJPEGReader, vtkMedicalImageReader2, vtkMetaImageReader, vtkPNGReader, vtkPNMReader, vtkSLCReader, and vtkTIFFReader.

static vtkImageReader2* vtkImageReader2::SafeDownCast vtkObject o  )  [static]
 

Reimplemented from vtkImageAlgorithm.

Reimplemented in vtkBMPReader, vtkDICOMImageReader, vtkGESignaReader, vtkImageReader, vtkJPEGReader, vtkMedicalImageReader2, vtkMetaImageReader, vtkPNGReader, vtkPNMReader, vtkSLCReader, and vtkTIFFReader.

void vtkImageReader2::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 vtkImageAlgorithm.

Reimplemented in vtkBMPReader, vtkDICOMImageReader, vtkGESignaReader, vtkImageReader, vtkJPEGReader, vtkMedicalImageReader2, vtkMetaImageReader, vtkPNGReader, vtkPNMReader, vtkSLCReader, and vtkTIFFReader.

virtual void vtkImageReader2::SetFileName const char *   )  [virtual]
 

Specify file name for the image file. You should specify either a FileName or a FilePrefix. Use FilePrefix if the data is stored in multiple files.

Reimplemented in vtkDICOMImageReader, vtkMetaImageReader, and vtkSLCReader.

Referenced by vtkDICOMImageReader::SetFileName().

virtual char* vtkImageReader2::GetFileName  )  [virtual]
 

Reimplemented in vtkMetaImageReader, and vtkSLCReader.

virtual void vtkImageReader2::SetFilePrefix const char *   )  [virtual]
 

Specify file prefix for the image file(s).You should specify either a FileName or FilePrefix. Use FilePrefix if the data is stored in multiple files.

virtual char* vtkImageReader2::GetFilePrefix  )  [virtual]
 

Specify file prefix for the image file(s).You should specify either a FileName or FilePrefix. Use FilePrefix if the data is stored in multiple files.

virtual void vtkImageReader2::SetFilePattern const char *   )  [virtual]
 

The sprintf format used to build filename from FilePrefix and number.

virtual char* vtkImageReader2::GetFilePattern  )  [virtual]
 

The sprintf format used to build filename from FilePrefix and number.

virtual void vtkImageReader2::SetDataScalarType int  type  )  [virtual]
 

Set the data type of pixels in the file. If you want the output scalar type to have a different value, set it after this method is called.

virtual void vtkImageReader2::SetDataScalarTypeToFloat  )  [inline, virtual]
 

Set the data type of pixels in the file. If you want the output scalar type to have a different value, set it after this method is called.

Definition at line 70 of file vtkImageReader2.h.

References VTK_FLOAT.

virtual void vtkImageReader2::SetDataScalarTypeToDouble  )  [inline, virtual]
 

Set the data type of pixels in the file. If you want the output scalar type to have a different value, set it after this method is called.

Definition at line 71 of file vtkImageReader2.h.

References VTK_DOUBLE.

virtual void vtkImageReader2::SetDataScalarTypeToInt  )  [inline, virtual]
 

Set the data type of pixels in the file. If you want the output scalar type to have a different value, set it after this method is called.

Definition at line 72 of file vtkImageReader2.h.

References VTK_INT.

virtual void vtkImageReader2::SetDataScalarTypeToShort  )  [inline, virtual]
 

Set the data type of pixels in the file. If you want the output scalar type to have a different value, set it after this method is called.

Definition at line 73 of file vtkImageReader2.h.

References VTK_SHORT.

virtual void vtkImageReader2::SetDataScalarTypeToUnsignedShort  )  [inline, virtual]
 

Set the data type of pixels in the file. If you want the output scalar type to have a different value, set it after this method is called.

Definition at line 74 of file vtkImageReader2.h.

References VTK_UNSIGNED_SHORT.

virtual void vtkImageReader2::SetDataScalarTypeToUnsignedChar  )  [inline, virtual]
 

Set the data type of pixels in the file. If you want the output scalar type to have a different value, set it after this method is called.

Definition at line 76 of file vtkImageReader2.h.

References VTK_UNSIGNED_CHAR.

virtual int vtkImageReader2::GetDataScalarType  )  [virtual]
 

Get the file format. Pixels are this type in the file.

virtual void vtkImageReader2::SetNumberOfScalarComponents int   )  [virtual]
 

Set/Get the number of scalar components

virtual int vtkImageReader2::GetNumberOfScalarComponents  )  [virtual]
 

Set/Get the number of scalar components

virtual void vtkImageReader2::SetDataExtent int  ,
int  ,
int  ,
int  ,
int  ,
int 
[virtual]
 

Get/Set the extent of the data on disk.

virtual void vtkImageReader2::SetDataExtent int  [6]  )  [virtual]
 

Get/Set the extent of the data on disk.

virtual int* vtkImageReader2::GetDataExtent  )  [virtual]
 

Get/Set the extent of the data on disk.

virtual void vtkImageReader2::GetDataExtent int &  ,
int &  ,
int &  ,
int &  ,
int &  ,
int & 
[virtual]
 

Get/Set the extent of the data on disk.

virtual void vtkImageReader2::GetDataExtent int  [6]  )  [virtual]
 

Get/Set the extent of the data on disk.

virtual void vtkImageReader2::SetFileDimensionality int   )  [virtual]
 

The number of dimensions stored in a file. This defaults to two.

int vtkImageReader2::GetFileDimensionality  )  [inline]
 

The number of dimensions stored in a file. This defaults to two.

Definition at line 100 of file vtkImageReader2.h.

virtual void vtkImageReader2::SetDataSpacing double  ,
double  ,
double 
[virtual]
 

Set/Get the spacing of the data in the file.

virtual void vtkImageReader2::SetDataSpacing double  [3]  )  [virtual]
 

Set/Get the spacing of the data in the file.

virtual double* vtkImageReader2::GetDataSpacing  )  [virtual]
 

Set/Get the spacing of the data in the file.

virtual void vtkImageReader2::GetDataSpacing double &  ,
double &  ,
double & 
[virtual]
 

Set/Get the spacing of the data in the file.

virtual void vtkImageReader2::GetDataSpacing double  [3]  )  [virtual]
 

Set/Get the spacing of the data in the file.

virtual void vtkImageReader2::SetDataOrigin double  ,
double  ,
double 
[virtual]
 

Set/Get the origin of the data (location of first pixel in the file).

virtual void vtkImageReader2::SetDataOrigin double  [3]  )  [virtual]
 

Set/Get the origin of the data (location of first pixel in the file).

virtual double* vtkImageReader2::GetDataOrigin  )  [virtual]
 

Set/Get the origin of the data (location of first pixel in the file).

virtual void vtkImageReader2::GetDataOrigin double &  ,
double &  ,
double & 
[virtual]
 

Set/Get the origin of the data (location of first pixel in the file).

virtual void vtkImageReader2::GetDataOrigin double  [3]  )  [virtual]
 

Set/Get the origin of the data (location of first pixel in the file).

unsigned long vtkImageReader2::GetHeaderSize  ) 
 

Get the size of the header computed by this object.

unsigned long vtkImageReader2::GetHeaderSize unsigned long  slice  ) 
 

Get the size of the header computed by this object.

virtual void vtkImageReader2::SetHeaderSize unsigned long  size  )  [virtual]
 

If there is a tail on the file, you want to explicitly set the header size.

virtual void vtkImageReader2::SetDataByteOrderToBigEndian  )  [virtual]
 

These methods should be used instead of the SwapBytes methods. They indicate the byte ordering of the file you are trying to read in. These methods will then either swap or not swap the bytes depending on the byte ordering of the machine it is being run on. For example, reading in a BigEndian file on a BigEndian machine will result in no swapping. Trying to read the same file on a LittleEndian machine will result in swapping. As a quick note most UNIX machines are BigEndian while PC's and VAX tend to be LittleEndian. So if the file you are reading in was generated on a VAX or PC, SetDataByteOrderToLittleEndian otherwise SetDataByteOrderToBigEndian.

virtual void vtkImageReader2::SetDataByteOrderToLittleEndian  )  [virtual]
 

If there is a tail on the file, you want to explicitly set the header size.

virtual int vtkImageReader2::GetDataByteOrder  )  [virtual]
 

If there is a tail on the file, you want to explicitly set the header size.

virtual void vtkImageReader2::SetDataByteOrder int   )  [virtual]
 

If there is a tail on the file, you want to explicitly set the header size.

virtual const char* vtkImageReader2::GetDataByteOrderAsString  )  [virtual]
 

If there is a tail on the file, you want to explicitly set the header size.

virtual void vtkImageReader2::SetFileNameSliceOffset int   )  [virtual]
 

When reading files which start at an unusual index, this can be added to the slice number when generating the file name (default = 0)

virtual int vtkImageReader2::GetFileNameSliceOffset  )  [virtual]
 

When reading files which start at an unusual index, this can be added to the slice number when generating the file name (default = 0)

virtual void vtkImageReader2::SetFileNameSliceSpacing int   )  [virtual]
 

When reading files which have regular, but non contiguous slices (eg filename.1,filename.3,filename.5) a spacing can be specified to skip missing files (default = 1)

virtual int vtkImageReader2::GetFileNameSliceSpacing  )  [virtual]
 

When reading files which have regular, but non contiguous slices (eg filename.1,filename.3,filename.5) a spacing can be specified to skip missing files (default = 1)

virtual void vtkImageReader2::SetSwapBytes int   )  [virtual]
 

Set/Get the byte swapping to explicitly swap the bytes of a file.

virtual int vtkImageReader2::GetSwapBytes  )  [inline, virtual]
 

Set/Get the byte swapping to explicitly swap the bytes of a file.

Definition at line 162 of file vtkImageReader2.h.

virtual void vtkImageReader2::SwapBytesOn  )  [virtual]
 

Set/Get the byte swapping to explicitly swap the bytes of a file.

virtual void vtkImageReader2::SwapBytesOff  )  [virtual]
 

Set/Get the byte swapping to explicitly swap the bytes of a file.

ifstream* vtkImageReader2::GetFile  )  [inline]
 

Definition at line 167 of file vtkImageReader2.h.

virtual unsigned long* vtkImageReader2::GetDataIncrements  )  [virtual]
 

virtual void vtkImageReader2::GetDataIncrements unsigned long  data[4]  )  [virtual]
 

virtual int vtkImageReader2::OpenFile  )  [virtual]
 

virtual void vtkImageReader2::SeekFile int  i,
int  j,
int  k
[virtual]
 

virtual void vtkImageReader2::FileLowerLeftOn  )  [virtual]
 

Set/Get whether the data comes from the file starting in the lower left corner or upper left corner.

virtual void vtkImageReader2::FileLowerLeftOff  )  [virtual]
 

virtual int vtkImageReader2::GetFileLowerLeft  )  [virtual]
 

virtual void vtkImageReader2::SetFileLowerLeft int   )  [virtual]
 

virtual void vtkImageReader2::ComputeInternalFileName int  slice  )  [virtual]
 

Set/Get the internal file name

virtual char* vtkImageReader2::GetInternalFileName  )  [virtual]
 

Set/Get the internal file name

virtual int vtkImageReader2::CanReadFile const char *  vtkNotUsed(fname)  )  [inline, virtual]
 

Return non zero if the reader can read the given file name. Should be implemented by all sub-classes of vtkImageReader2. For non zero return values the following values are to be used 1 - I think I can read the file but I cannot prove it 2 - I definitely can read the file 3 - I can read the file and I have validated that I am the correct reader for this file

Definition at line 195 of file vtkImageReader2.h.

virtual const char* vtkImageReader2::GetFileExtensions  )  [inline, virtual]
 

Get the file extensions for this format. Returns a string with a space separated list of extensions in the format .extension

Reimplemented in vtkBMPReader, vtkDICOMImageReader, vtkGESignaReader, vtkJPEGReader, vtkPNGReader, vtkPNMReader, vtkSLCReader, and vtkTIFFReader.

Definition at line 204 of file vtkImageReader2.h.

virtual const char* vtkImageReader2::GetDescriptiveName  )  [inline, virtual]
 

Return a descriptive name for the file format that might be useful in a GUI.

Reimplemented in vtkBMPReader, vtkDICOMImageReader, vtkGESignaReader, vtkJPEGReader, vtkPNGReader, vtkPNMReader, vtkSLCReader, and vtkTIFFReader.

Definition at line 213 of file vtkImageReader2.h.

virtual int vtkImageReader2::RequestInformation vtkInformation request,
vtkInformationVector **  inputVector,
vtkInformationVector outputVector
[protected, virtual]
 

Reimplemented from vtkImageAlgorithm.

Reimplemented in vtkImageReader, vtkMetaImageReader, and vtkSLCReader.

virtual void vtkImageReader2::ExecuteInformation  )  [protected, virtual]
 

Reimplemented in vtkBMPReader, vtkDICOMImageReader, vtkGESignaReader, vtkJPEGReader, vtkPNGReader, vtkPNMReader, and vtkTIFFReader.

virtual void vtkImageReader2::ExecuteData vtkDataObject data  )  [protected, virtual]
 

This method is the old style execute method

Reimplemented from vtkImageAlgorithm.

Reimplemented in vtkBMPReader, vtkDICOMImageReader, vtkGESignaReader, vtkImageReader, vtkJPEGReader, vtkPNGReader, vtkSLCReader, and vtkTIFFReader.

virtual void vtkImageReader2::ComputeDataIncrements  )  [protected, virtual]
 

Reimplemented in vtkBMPReader.


Member Data Documentation

char* vtkImageReader2::InternalFileName [protected]
 

Definition at line 222 of file vtkImageReader2.h.

char* vtkImageReader2::FileName [protected]
 

Definition at line 223 of file vtkImageReader2.h.

char* vtkImageReader2::FilePrefix [protected]
 

Definition at line 224 of file vtkImageReader2.h.

char* vtkImageReader2::FilePattern [protected]
 

Definition at line 225 of file vtkImageReader2.h.

int vtkImageReader2::NumberOfScalarComponents [protected]
 

Definition at line 226 of file vtkImageReader2.h.

int vtkImageReader2::FileLowerLeft [protected]
 

Definition at line 227 of file vtkImageReader2.h.

ifstream* vtkImageReader2::File [protected]
 

Definition at line 229 of file vtkImageReader2.h.

unsigned long vtkImageReader2::DataIncrements[4] [protected]
 

Definition at line 230 of file vtkImageReader2.h.

int vtkImageReader2::DataExtent[6] [protected]
 

Definition at line 231 of file vtkImageReader2.h.

int vtkImageReader2::SwapBytes [protected]
 

Definition at line 232 of file vtkImageReader2.h.

int vtkImageReader2::FileDimensionality [protected]
 

Definition at line 234 of file vtkImageReader2.h.

unsigned long vtkImageReader2::HeaderSize [protected]
 

Definition at line 235 of file vtkImageReader2.h.

int vtkImageReader2::DataScalarType [protected]
 

Definition at line 236 of file vtkImageReader2.h.

unsigned long vtkImageReader2::ManualHeaderSize [protected]
 

Definition at line 237 of file vtkImageReader2.h.

double vtkImageReader2::DataSpacing[3] [protected]
 

Definition at line 239 of file vtkImageReader2.h.

double vtkImageReader2::DataOrigin[3] [protected]
 

Definition at line 240 of file vtkImageReader2.h.

int vtkImageReader2::FileNameSliceOffset [protected]
 

Definition at line 242 of file vtkImageReader2.h.

int vtkImageReader2::FileNameSliceSpacing [protected]
 

Definition at line 243 of file vtkImageReader2.h.


The documentation for this class was generated from the following file:
Generated on Mon Jan 21 23:52:34 2008 for VTK by  doxygen 1.4.3-20050530