Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound 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.

Date:
2003/01/14 21:30:00
Revision:
1.17

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
Created by:
  • Martin, Ken
CVS contributions (if > 5%):
  • Martin, Ken (73%)
  • Hoffman, Bill (10%)
  • Cedilnik, Andy (5%)
CVS logs (CVSweb):
  • .cxx (/IO/vtkImageReader2.cxx)
  • .h (/IO/vtkImageReader2.h)

Definition at line 52 of file vtkImageReader2.h.

Public Types

typedef vtkImageSource Superclass

Public Methods

virtual const char * GetClassName ()
virtual int IsA (const char *type)
void PrintSelf (ostream &os, vtkIndent indent)
void SetHeaderSize (unsigned long size)
ifstream * GetFile ()
virtual unsigned long * GetDataIncrements ()
virtual void GetDataIncrements (unsigned long data[4])
int OpenFile ()
void SeekFile (int i, int j, int k)
virtual vtkImageReader2 * MakeObject ()
void SetFileName (const char *)
virtual char * GetFileName ()
void SetFilePrefix (const char *)
virtual char * GetFilePrefix ()
void SetFilePattern (const char *)
virtual char * GetFilePattern ()
void SetDataScalarType (int type)
void SetDataScalarTypeToFloat ()
void SetDataScalarTypeToDouble ()
void SetDataScalarTypeToInt ()
void SetDataScalarTypeToShort ()
void SetDataScalarTypeToUnsignedShort ()
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 (float, float, float)
virtual void SetDataSpacing (float[3])
virtual float * GetDataSpacing ()
virtual void GetDataSpacing (float &, float &, float &)
virtual void GetDataSpacing (float[3])
virtual void SetDataOrigin (float, float, float)
virtual void SetDataOrigin (float[3])
virtual float * GetDataOrigin ()
virtual void GetDataOrigin (float &, float &, float &)
virtual void GetDataOrigin (float[3])
unsigned long GetHeaderSize ()
unsigned long GetHeaderSize (unsigned long slice)
void SetDataByteOrderToBigEndian ()
void SetDataByteOrderToLittleEndian ()
int GetDataByteOrder ()
void SetDataByteOrder (int)
const char * GetDataByteOrderAsString ()
virtual void SetFileNameSliceOffset (int)
virtual int GetFileNameSliceOffset ()
virtual void SetFileNameSliceSpacing (int)
virtual int GetFileNameSliceSpacing ()
virtual void SetSwapBytes (int)
int GetSwapBytes ()
virtual void SwapBytesOn ()
virtual void SwapBytesOff ()
virtual void FileLowerLeftOn ()
virtual void FileLowerLeftOff ()
virtual int GetFileLowerLeft ()
virtual void SetFileLowerLeft (int)
void ComputeInternalFileName (int slice)
virtual char * GetInternalFileName ()
virtual int CanReadFile (const char *vtkNotUsed(fname))
virtual const char * GetFileExensions ()
virtual const char * GetDescriptiveName ()

Static Public Methods

vtkImageReader2 * New ()
int IsTypeOf (const char *type)
vtkImageReader2 * SafeDownCast (vtkObject *o)

Protected Methods

 vtkImageReader2 ()
 ~vtkImageReader2 ()
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
float DataSpacing [3]
float DataOrigin [3]
int FileNameSliceOffset
int FileNameSliceSpacing


Member Typedef Documentation

typedef vtkImageSource vtkImageReader2::Superclass
 

Reimplemented from vtkImageSource.

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

Definition at line 56 of file vtkImageReader2.h.


Constructor & Destructor Documentation

vtkImageReader2::vtkImageReader2   [protected]
 

vtkImageReader2::~vtkImageReader2   [protected]
 


Member Function Documentation

vtkImageReader2* vtkImageReader2::New   [static]
 

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

Reimplemented from vtkObject.

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

virtual const char* vtkImageReader2::GetClassName   [virtual]
 

Reimplemented from vtkImageSource.

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

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 vtkImageSource.

Reimplemented in vtkPushImageReader, vtkBMPReader, vtkGESignaReader, vtkImageReader, vtkJPEGReader, vtkMedicalImageReader2, 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 vtkImageSource.

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

vtkImageReader2* vtkImageReader2::SafeDownCast vtkObject   o [static]
 

Reimplemented from vtkImageSource.

Reimplemented in vtkPushImageReader, vtkBMPReader, vtkGESignaReader, vtkImageReader, vtkJPEGReader, vtkMedicalImageReader2, 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 vtkImageSource.

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

void vtkImageReader2::SetFileName const char *   
 

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 vtkSLCReader.

virtual char* vtkImageReader2::GetFileName   [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 vtkSLCReader.

void vtkImageReader2::SetFilePrefix const char *   
 

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.

void vtkImageReader2::SetFilePattern const char *   
 

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.

void vtkImageReader2::SetDataScalarType int    type
 

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.

void vtkImageReader2::SetDataScalarTypeToFloat   [inline]
 

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 86 of file vtkImageReader2.h.

References VTK_FLOAT.

void vtkImageReader2::SetDataScalarTypeToDouble   [inline]
 

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 87 of file vtkImageReader2.h.

References VTK_DOUBLE.

void vtkImageReader2::SetDataScalarTypeToInt   [inline]
 

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 88 of file vtkImageReader2.h.

References VTK_INT.

void vtkImageReader2::SetDataScalarTypeToShort   [inline]
 

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 89 of file vtkImageReader2.h.

References VTK_SHORT.

void vtkImageReader2::SetDataScalarTypeToUnsignedShort   [inline]
 

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 90 of file vtkImageReader2.h.

References VTK_UNSIGNED_SHORT.

void vtkImageReader2::SetDataScalarTypeToUnsignedChar   [inline]
 

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 92 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 116 of file vtkImageReader2.h.

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

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

virtual void vtkImageReader2::SetDataSpacing float   [3] [virtual]
 

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

virtual float* vtkImageReader2::GetDataSpacing   [virtual]
 

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

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

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

virtual void vtkImageReader2::GetDataSpacing float   [3] [virtual]
 

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

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

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

virtual void vtkImageReader2::SetDataOrigin float   [3] [virtual]
 

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

virtual float* vtkImageReader2::GetDataOrigin   [virtual]
 

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

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

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

virtual void vtkImageReader2::GetDataOrigin float   [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.

void vtkImageReader2::SetHeaderSize unsigned long    size
 

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

void vtkImageReader2::SetDataByteOrderToBigEndian  
 

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.

void vtkImageReader2::SetDataByteOrderToLittleEndian  
 

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.

int vtkImageReader2::GetDataByteOrder  
 

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.

void vtkImageReader2::SetDataByteOrder int   
 

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.

const char* vtkImageReader2::GetDataByteOrderAsString  
 

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::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.

int vtkImageReader2::GetSwapBytes   [inline]
 

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

Definition at line 178 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 183 of file vtkImageReader2.h.

virtual unsigned long* vtkImageReader2::GetDataIncrements   [virtual]
 

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

int vtkImageReader2::OpenFile  
 

void vtkImageReader2::SeekFile int    i,
int    j,
int    k
 

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]
 

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

virtual int vtkImageReader2::GetFileLowerLeft   [virtual]
 

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

virtual void vtkImageReader2::SetFileLowerLeft int    [virtual]
 

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

void vtkImageReader2::ComputeInternalFileName int    slice
 

Set/Get the internal file name

virtual char* vtkImageReader2::GetInternalFileName   [virtual]
 

Set/Get the internal file name

virtual vtkImageReader2* vtkImageReader2::MakeObject   [virtual]
 

For legacy compatibility. Do not use.

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 216 of file vtkImageReader2.h.

virtual const char* vtkImageReader2::GetFileExensions   [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, vtkGESignaReader, vtkJPEGReader, vtkPNGReader, vtkPNMReader, vtkSLCReader, and vtkTIFFReader.

Definition at line 225 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, vtkGESignaReader, vtkJPEGReader, vtkPNGReader, vtkPNMReader, vtkSLCReader, and vtkTIFFReader.

Definition at line 234 of file vtkImageReader2.h.

virtual void vtkImageReader2::ExecuteInformation   [protected, virtual]
 

Reimplemented from vtkSource.

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

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

Reimplemented in vtkPushImageReader, vtkBMPReader, 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 243 of file vtkImageReader2.h.

char* vtkImageReader2::FileName [protected]
 

Definition at line 244 of file vtkImageReader2.h.

char* vtkImageReader2::FilePrefix [protected]
 

Definition at line 245 of file vtkImageReader2.h.

char* vtkImageReader2::FilePattern [protected]
 

Definition at line 246 of file vtkImageReader2.h.

int vtkImageReader2::NumberOfScalarComponents [protected]
 

Definition at line 247 of file vtkImageReader2.h.

int vtkImageReader2::FileLowerLeft [protected]
 

Definition at line 248 of file vtkImageReader2.h.

ifstream* vtkImageReader2::File [protected]
 

Definition at line 250 of file vtkImageReader2.h.

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

Definition at line 251 of file vtkImageReader2.h.

int vtkImageReader2::DataExtent[6] [protected]
 

Definition at line 252 of file vtkImageReader2.h.

int vtkImageReader2::SwapBytes [protected]
 

Definition at line 253 of file vtkImageReader2.h.

int vtkImageReader2::FileDimensionality [protected]
 

Definition at line 255 of file vtkImageReader2.h.

unsigned long vtkImageReader2::HeaderSize [protected]
 

Definition at line 256 of file vtkImageReader2.h.

int vtkImageReader2::DataScalarType [protected]
 

Definition at line 257 of file vtkImageReader2.h.

unsigned long vtkImageReader2::ManualHeaderSize [protected]
 

Definition at line 258 of file vtkImageReader2.h.

float vtkImageReader2::DataSpacing[3] [protected]
 

Definition at line 260 of file vtkImageReader2.h.

float vtkImageReader2::DataOrigin[3] [protected]
 

Definition at line 261 of file vtkImageReader2.h.

int vtkImageReader2::FileNameSliceOffset [protected]
 

Definition at line 263 of file vtkImageReader2.h.

int vtkImageReader2::FileNameSliceSpacing [protected]
 

Definition at line 264 of file vtkImageReader2.h.


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