vtkImageReader2 Class Reference
#include <vtkImageReader2.h>
Inheritance diagram for vtkImageReader2:
[legend]Collaboration diagram for vtkImageReader2:
[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
- Created by:
-
- CVS contributions (if > 5%):
- Martin, Ken (70%)
- Hoffman, Bill (10%)
- Cedilnik, Andy (7%)
- Barre, Sebastien (5%)
- CVS logs (CVSweb):
.h (/IO/vtkImageReader2
.h)
.cxx (/IO/vtkImageReader2
.cxx)
Definition at line 49 of file vtkImageReader2.h.
|
Public Types |
typedef vtkImageSource | Superclass |
Public Member Functions |
virtual const char * | GetClassName () |
virtual int | IsA (const char *type) |
void | PrintSelf (ostream &os, vtkIndent indent) |
virtual void | SetHeaderSize (unsigned long size) |
ifstream * | GetFile () |
virtual unsigned long * | GetDataIncrements () |
virtual void | GetDataIncrements (unsigned long data[4]) |
virtual int | OpenFile () |
virtual void | SeekFile (int i, int j, int k) |
|
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 | 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 | 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 |
vtkImageReader2 * | New () |
int | IsTypeOf (const char *type) |
vtkImageReader2 * | SafeDownCast (vtkObject *o) |
Protected Member Functions |
| 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 |
double | DataSpacing [3] |
double | DataOrigin [3] |
int | FileNameSliceOffset |
int | FileNameSliceSpacing |
Member Typedef Documentation
|
Reimplemented from vtkImageSource.
Reimplemented in vtkBMPReader, vtkDICOMImageReader, vtkGESignaReader, vtkImageReader, vtkJPEGReader, vtkMedicalImageReader2, vtkMetaImageReader, vtkPNGReader, vtkPNMReader, vtkSLCReader, and vtkTIFFReader.
Definition at line 53 of file vtkImageReader2.h. |
Constructor & Destructor Documentation
vtkImageReader2::vtkImageReader2 |
( |
|
) |
[protected] |
|
Member Function Documentation
|
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 vtkImageSource.
Reimplemented in vtkBMPReader, vtkDICOMImageReader, vtkGESignaReader, vtkImageReader, vtkJPEGReader, vtkMedicalImageReader2, vtkMetaImageReader, 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 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 vtkImageSource.
Reimplemented in vtkBMPReader, vtkDICOMImageReader, vtkGESignaReader, vtkImageReader, vtkJPEGReader, vtkMedicalImageReader2, vtkMetaImageReader, vtkPNGReader, vtkPNMReader, vtkSLCReader, and vtkTIFFReader. |
|
Reimplemented from vtkImageSource.
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 vtkImageSource.
Reimplemented in vtkBMPReader, vtkDICOMImageReader, vtkGESignaReader, vtkImageReader, vtkJPEGReader, vtkMedicalImageReader2, vtkMetaImageReader, vtkPNGReader, vtkPNMReader, vtkSLCReader, and vtkTIFFReader. |
virtual void vtkImageReader2::SetFileName |
( |
const char * |
|
) |
[virtual] |
|
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 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 83 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 84 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 85 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 86 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 87 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 89 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 113 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] |
|
|
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 int vtkImageReader2::GetDataByteOrder |
( |
|
) |
[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::SetDataByteOrder |
( |
int |
|
) |
[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 const char* vtkImageReader2::GetDataByteOrderAsString |
( |
|
) |
[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::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 175 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] |
|
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] |
|
|
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. |
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 208 of file vtkImageReader2.h. |
virtual const char* vtkImageReader2::GetFileExtensions |
( |
|
) |
[inline, virtual] |
|
virtual const char* vtkImageReader2::GetDescriptiveName |
( |
|
) |
[inline, virtual] |
|
virtual void vtkImageReader2::ExecuteInformation |
( |
|
) |
[protected, virtual] |
|
virtual void vtkImageReader2::ExecuteData |
( |
vtkDataObject * |
data |
) |
[protected, virtual] |
|
virtual void vtkImageReader2::ComputeDataIncrements |
( |
|
) |
[protected, virtual] |
|
Member Data Documentation
The documentation for this class was generated from the following file: