Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

vtkImageReader Class Reference

Superclass of binary file readers. More...

#include <vtkImageReader.h>

Inheritance diagram for vtkImageReader:

Inheritance graph
[legend]
Collaboration diagram for vtkImageReader:

Collaboration graph
[legend]
List of all members.

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])
void ComputeInverseTransformedExtent (int inExtent[6], int outExtent[6])
void ComputeInverseTransformedIncrements (int inIncr[3], int outIncr[3])
void OpenFile ()
void OpenAndSeekFile (int extent[6], int slice)
void SetFileName (const char *)
virtual char * GetFileName ()
void SetFilePrefix (const char *)
virtual char * GetFilePrefix ()
void SetFilePattern (const char *)
virtual char * GetFilePattern ()
virtual void SetFileNameSliceOffset (int)
virtual int GetFileNameSliceOffset ()
virtual void SetFileNameSliceSpacing (int)
virtual int GetFileNameSliceSpacing ()
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 SetDataVOI (int, int, int, int, int, int)
virtual void SetDataVOI (int[6])
virtual int * GetDataVOI ()
virtual void GetDataVOI (int &, int &, int &, int &, int &, int &)
virtual void GetDataVOI (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 (int slice)
virtual unsigned short GetDataMask ()
void SetDataMask (int val)
virtual void SetTransform (vtkTransform *)
virtual vtkTransformGetTransform ()
void SetDataByteOrderToBigEndian ()
void SetDataByteOrderToLittleEndian ()
int GetDataByteOrder ()
void SetDataByteOrder (int)
const char * GetDataByteOrderAsString ()
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 ()

Static Public Methods

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

Protected Methods

 vtkImageReader ()
 ~vtkImageReader ()
void ComputeTransformedSpacing (float Spacing[3])
void ComputeTransformedOrigin (float origin[3])
void ComputeTransformedExtent (int inExtent[6], int outExtent[6])
void ComputeTransformedIncrements (int inIncr[3], int outIncr[3])
void ExecuteInformation ()
void ExecuteData (vtkDataObject *data)
virtual void ComputeDataIncrements ()

Protected Attributes

char * InternalFileName
char * FileName
char * FilePrefix
char * FilePattern
int NumberOfScalarComponents
int FileLowerLeft
int FileNameSliceOffset
int FileNameSliceSpacing
ifstream * File
unsigned long DataIncrements [4]
int DataExtent [6]
unsigned short DataMask
int SwapBytes
int FileDimensionality
unsigned long HeaderSize
int DataScalarType
int ManualHeaderSize
int Initialized
vtkTransformTransform
int DataDimensions [3]
float DataSpacing [3]
float DataOrigin [3]
int DataVOI [6]

Detailed Description

Superclass of binary file readers.

Date:
2001/11/13 14:30:28
Revision:
1.60
Thanks:
Thanks to C. Charles Law who developed this class.
vtkImageReader provides methods needed to read a region from a file.

See also:
vtkBMPReader vtkPNMReader vtkTIFFReader
Examples:
vtkImageReader (Examples)
Tests:
vtkImageReader (Tests)

Definition at line 68 of file vtkImageReader.h.


Constructor & Destructor Documentation

vtkImageReader::vtkImageReader   [protected]
 

vtkImageReader::~vtkImageReader   [protected]
 


Member Function Documentation

vtkImageReader* vtkImageReader::New   [static]
 

Instantiate object with no start, end, or progress methods.

Reimplemented from vtkImageSource.

Reimplemented in vtkBMPReader, vtkPNMReader, and vtkTIFFReader.

virtual const char* vtkImageReader::GetClassName   [virtual]
 

Return the class name as a string. This method is defined in all subclasses of vtkObject with the vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkImageSource.

Reimplemented in vtkBMPReader, vtkPNMReader, and vtkTIFFReader.

int vtkImageReader::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 vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkImageSource.

Reimplemented in vtkBMPReader, vtkPNMReader, and vtkTIFFReader.

virtual int vtkImageReader::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 vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkImageSource.

Reimplemented in vtkBMPReader, vtkPNMReader, and vtkTIFFReader.

vtkImageReader* vtkImageReader::SafeDownCast vtkObject   o [static]
 

Will cast the supplied object to vtkObject* is this is a safe operation (i.e., a safe downcast); otherwise NULL is returned. This method is defined in all subclasses of vtkObject with the vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkImageSource.

Reimplemented in vtkBMPReader, vtkPNMReader, and vtkTIFFReader.

void vtkImageReader::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 vtkSource.

Reimplemented in vtkBMPReader.

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

virtual char* vtkImageReader::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.

void vtkImageReader::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* vtkImageReader::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 vtkImageReader::SetFilePattern const char *   
 

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

virtual char* vtkImageReader::GetFilePattern   [virtual]
 

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

virtual void vtkImageReader::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 vtkImageReader::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 vtkImageReader::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 vtkImageReader::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)

void vtkImageReader::SetDataScalarType int    type
 

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

void vtkImageReader::SetDataScalarTypeToFloat   [inline]
 

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

Definition at line 118 of file vtkImageReader.h.

void vtkImageReader::SetDataScalarTypeToDouble   [inline]
 

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

Definition at line 119 of file vtkImageReader.h.

void vtkImageReader::SetDataScalarTypeToInt   [inline]
 

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

Definition at line 120 of file vtkImageReader.h.

void vtkImageReader::SetDataScalarTypeToShort   [inline]
 

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

Definition at line 121 of file vtkImageReader.h.

void vtkImageReader::SetDataScalarTypeToUnsignedShort   [inline]
 

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

Definition at line 122 of file vtkImageReader.h.

void vtkImageReader::SetDataScalarTypeToUnsignedChar   [inline]
 

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

Definition at line 124 of file vtkImageReader.h.

virtual int vtkImageReader::GetDataScalarType   [virtual]
 

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

virtual void vtkImageReader::SetNumberOfScalarComponents int    [virtual]
 

Set/Get the number of scalar components

virtual int vtkImageReader::GetNumberOfScalarComponents   [virtual]
 

Set/Get the number of scalar components

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

Get/Set the extent of the data on disk.

virtual void vtkImageReader::SetDataExtent int   [6] [virtual]
 

Get/Set the extent of the data on disk.

virtual int* vtkImageReader::GetDataExtent   [virtual]
 

Get/Set the extent of the data on disk.

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

Get/Set the extent of the data on disk.

virtual void vtkImageReader::GetDataExtent int   [6] [virtual]
 

Get/Set the extent of the data on disk.

virtual void vtkImageReader::SetDataVOI int   ,
int   ,
int   ,
int   ,
int   ,
int   
[virtual]
 

Set/get the data VOI. You can limit the reader to only read a subset of the data.

virtual void vtkImageReader::SetDataVOI int   [6] [virtual]
 

Set/get the data VOI. You can limit the reader to only read a subset of the data.

virtual int* vtkImageReader::GetDataVOI   [virtual]
 

Set/get the data VOI. You can limit the reader to only read a subset of the data.

virtual void vtkImageReader::GetDataVOI int &   ,
int &   ,
int &   ,
int &   ,
int &   ,
int &   
[virtual]
 

Set/get the data VOI. You can limit the reader to only read a subset of the data.

virtual void vtkImageReader::GetDataVOI int   [6] [virtual]
 

Set/get the data VOI. You can limit the reader to only read a subset of the data.

virtual void vtkImageReader::SetFileDimensionality int    [virtual]
 

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

int vtkImageReader::GetFileDimensionality   [inline]
 

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

Definition at line 155 of file vtkImageReader.h.

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

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

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

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

virtual float* vtkImageReader::GetDataSpacing   [virtual]
 

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

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

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

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

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

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

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

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

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

virtual float* vtkImageReader::GetDataOrigin   [virtual]
 

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

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

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

virtual void vtkImageReader::GetDataOrigin float   [3] [virtual]
 

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

unsigned long vtkImageReader::GetHeaderSize  
 

Get the size of the header computed by this object.

unsigned long vtkImageReader::GetHeaderSize int    slice
 

Get the size of the header computed by this object.

void vtkImageReader::SetHeaderSize unsigned long    size
 

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

virtual unsigned short vtkImageReader::GetDataMask   [virtual]
 

Set/Get the Data mask.

void vtkImageReader::SetDataMask int    val [inline]
 

Set/Get the Data mask.

Definition at line 183 of file vtkImageReader.h.

virtual void vtkImageReader::SetTransform vtkTransform   [virtual]
 

Set/Get transformation matrix to transform the data from slice space into world space. This matrix must be a permutation matrix. To qualify, the sums of the rows must be + or - 1.

virtual vtkTransform* vtkImageReader::GetTransform   [virtual]
 

Set/Get transformation matrix to transform the data from slice space into world space. This matrix must be a permutation matrix. To qualify, the sums of the rows must be + or - 1.

void vtkImageReader::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 vtkImageReader::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 vtkImageReader::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 vtkImageReader::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* vtkImageReader::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 vtkImageReader::SetSwapBytes int    [virtual]
 

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

int vtkImageReader::GetSwapBytes   [inline]
 

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

Definition at line 217 of file vtkImageReader.h.

virtual void vtkImageReader::SwapBytesOn   [virtual]
 

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

virtual void vtkImageReader::SwapBytesOff   [virtual]
 

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

ifstream* vtkImageReader::GetFile   [inline]
 

Definition at line 222 of file vtkImageReader.h.

virtual unsigned long* vtkImageReader::GetDataIncrements   [virtual]
 

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

void vtkImageReader::ComputeInverseTransformedExtent int    inExtent[6],
int    outExtent[6]
 

void vtkImageReader::ComputeInverseTransformedIncrements int    inIncr[3],
int    outIncr[3]
 

void vtkImageReader::OpenFile  
 

void vtkImageReader::OpenAndSeekFile int    extent[6],
int    slice
 

virtual void vtkImageReader::FileLowerLeftOn   [virtual]
 

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

virtual void vtkImageReader::FileLowerLeftOff   [virtual]
 

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

virtual int vtkImageReader::GetFileLowerLeft   [virtual]
 

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

virtual void vtkImageReader::SetFileLowerLeft int    [virtual]
 

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

void vtkImageReader::ComputeInternalFileName int    slice
 

Set/Get the internal file name

virtual char* vtkImageReader::GetInternalFileName   [virtual]
 

Set/Get the internal file name

void vtkImageReader::ComputeTransformedSpacing float    Spacing[3] [protected]
 

void vtkImageReader::ComputeTransformedOrigin float    origin[3] [protected]
 

void vtkImageReader::ComputeTransformedExtent int    inExtent[6],
int    outExtent[6]
[protected]
 

void vtkImageReader::ComputeTransformedIncrements int    inIncr[3],
int    outIncr[3]
[protected]
 

void vtkImageReader::ExecuteInformation   [protected, virtual]
 

Reimplemented from vtkSource.

Reimplemented in vtkBMPReader, vtkPNMReader, and vtkTIFFReader.

void vtkImageReader::ExecuteData vtkDataObject   out [protected]
 

Reimplemented in vtkBMPReader.

virtual void vtkImageReader::ComputeDataIncrements   [protected, virtual]
 

Reimplemented in vtkBMPReader.


Member Data Documentation

char* vtkImageReader::InternalFileName [protected]
 

Definition at line 255 of file vtkImageReader.h.

char* vtkImageReader::FileName [protected]
 

Definition at line 256 of file vtkImageReader.h.

char* vtkImageReader::FilePrefix [protected]
 

Definition at line 257 of file vtkImageReader.h.

char* vtkImageReader::FilePattern [protected]
 

Definition at line 258 of file vtkImageReader.h.

int vtkImageReader::NumberOfScalarComponents [protected]
 

Definition at line 259 of file vtkImageReader.h.

int vtkImageReader::FileLowerLeft [protected]
 

Definition at line 260 of file vtkImageReader.h.

int vtkImageReader::FileNameSliceOffset [protected]
 

Definition at line 261 of file vtkImageReader.h.

int vtkImageReader::FileNameSliceSpacing [protected]
 

Definition at line 262 of file vtkImageReader.h.

ifstream* vtkImageReader::File [protected]
 

Definition at line 264 of file vtkImageReader.h.

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

Definition at line 265 of file vtkImageReader.h.

int vtkImageReader::DataExtent[6] [protected]
 

Definition at line 266 of file vtkImageReader.h.

unsigned short vtkImageReader::DataMask [protected]
 

Definition at line 267 of file vtkImageReader.h.

int vtkImageReader::SwapBytes [protected]
 

Definition at line 268 of file vtkImageReader.h.

int vtkImageReader::FileDimensionality [protected]
 

Definition at line 270 of file vtkImageReader.h.

unsigned long vtkImageReader::HeaderSize [protected]
 

Definition at line 271 of file vtkImageReader.h.

int vtkImageReader::DataScalarType [protected]
 

Definition at line 272 of file vtkImageReader.h.

int vtkImageReader::ManualHeaderSize [protected]
 

Definition at line 273 of file vtkImageReader.h.

int vtkImageReader::Initialized [protected]
 

Definition at line 274 of file vtkImageReader.h.

vtkTransform* vtkImageReader::Transform [protected]
 

Definition at line 275 of file vtkImageReader.h.

int vtkImageReader::DataDimensions[3] [protected]
 

Definition at line 284 of file vtkImageReader.h.

float vtkImageReader::DataSpacing[3] [protected]
 

Definition at line 285 of file vtkImageReader.h.

float vtkImageReader::DataOrigin[3] [protected]
 

Definition at line 286 of file vtkImageReader.h.

int vtkImageReader::DataVOI[6] [protected]
 

Definition at line 287 of file vtkImageReader.h.


The documentation for this class was generated from the following file:
Generated on Thu Mar 28 14:31:13 2002 for VTK by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001