VTK
|
Superclass of binary file readers. More...
#include <vtkImageReader2.h>
Superclass of binary file readers.
vtkImageReader2 is a parent class for many VTK image readers. It was written to simplify the interface of vtkImageReader. It can also be used directly to read data without headers (raw). It is a good super class for streaming readers that do not require a mask or transform on the data. An example of reading a raw file is shown below:
vtkSmartPointer<vtkImageReader2> reader = vtkSmartPointer<vtkImageReader2>::New(); reader->SetFilePrefix(argv[1]); reader->SetDataExtent(0, 63, 0, 63, 1, 93); reader->SetDataSpacing(3.2, 3.2, 1.5); reader->SetDataOrigin(0.0, 0.0, 0.0); reader->SetDataScalarTypeToUnsignedShort(); reader->SetDataByteOrderToLittleEndian(); reader->UpdateWholeExtent();
Definition at line 56 of file vtkImageReader2.h.
Reimplemented from vtkImageAlgorithm.
Reimplemented in vtkMINCImageReader, vtkMetaImageReader, vtkDICOMImageReader, vtkMPIImageReader, vtkBMPReader, vtkPNrrdReader, vtkPNMReader, vtkImageReader, vtkTIFFReader, vtkGESignaReader, vtkJPEGReader, vtkPNGReader, vtkSLCReader, and vtkMedicalImageReader2.
Definition at line 60 of file vtkImageReader2.h.
vtkImageReader2::vtkImageReader2 | ( | ) | [protected] |
Return a descriptive name for the file format that might be useful in a GUI.
vtkImageReader2::~vtkImageReader2 | ( | ) | [protected] |
Return a descriptive name for the file format that might be useful in a GUI.
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 vtkMINCImageReader, vtkMetaImageReader, vtkMPIImageReader, vtkDICOMImageReader, vtkBMPReader, vtkPNrrdReader, vtkPNMReader, vtkImageReader, vtkTIFFReader, vtkGESignaReader, vtkJPEGReader, vtkPNGReader, vtkSLCReader, and vtkMedicalImageReader2.
virtual const char* vtkImageReader2::GetClassName | ( | ) | [virtual] |
Reimplemented from vtkImageAlgorithm.
Reimplemented in vtkMINCImageReader, vtkMetaImageReader, vtkDICOMImageReader, vtkMPIImageReader, vtkBMPReader, vtkPNrrdReader, vtkPNMReader, vtkImageReader, vtkTIFFReader, vtkGESignaReader, vtkJPEGReader, vtkPNGReader, vtkSLCReader, and vtkMedicalImageReader2.
static int vtkImageReader2::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 vtkImageAlgorithm.
Reimplemented in vtkMINCImageReader, vtkMetaImageReader, vtkDICOMImageReader, vtkMPIImageReader, vtkBMPReader, vtkPNrrdReader, vtkPNMReader, vtkImageReader, vtkTIFFReader, vtkGESignaReader, vtkJPEGReader, vtkPNGReader, vtkSLCReader, and vtkMedicalImageReader2.
virtual int vtkImageReader2::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 vtkImageAlgorithm.
Reimplemented in vtkMINCImageReader, vtkMetaImageReader, vtkDICOMImageReader, vtkMPIImageReader, vtkBMPReader, vtkPNrrdReader, vtkPNMReader, vtkImageReader, vtkTIFFReader, vtkGESignaReader, vtkJPEGReader, vtkPNGReader, vtkSLCReader, and vtkMedicalImageReader2.
static vtkImageReader2* vtkImageReader2::SafeDownCast | ( | vtkObject * | o | ) | [static] |
Reimplemented from vtkImageAlgorithm.
Reimplemented in vtkMINCImageReader, vtkMetaImageReader, vtkDICOMImageReader, vtkMPIImageReader, vtkBMPReader, vtkPNrrdReader, vtkPNMReader, vtkImageReader, vtkTIFFReader, vtkGESignaReader, vtkJPEGReader, vtkPNGReader, vtkSLCReader, and vtkMedicalImageReader2.
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 vtkMINCImageReader, vtkMetaImageReader, vtkDICOMImageReader, vtkMPIImageReader, vtkBMPReader, vtkPNrrdReader, vtkPNMReader, vtkImageReader, vtkTIFFReader, vtkGESignaReader, vtkJPEGReader, vtkPNGReader, vtkSLCReader, and vtkMedicalImageReader2.
virtual void vtkImageReader2::SetFileName | ( | const char * | ) | [virtual] |
Specify file name for the image file. If the data is stored in multiple files, then use SetFileNames or SetFilePrefix instead.
Reimplemented in vtkMINCImageReader, vtkDICOMImageReader, and vtkSLCReader.
virtual char* vtkImageReader2::GetFileName | ( | ) | [virtual] |
Specify file name for the image file. If the data is stored in multiple files, then use SetFileNames or SetFilePrefix instead.
Reimplemented in vtkSLCReader.
virtual void vtkImageReader2::SetFileNames | ( | vtkStringArray * | ) | [virtual] |
Specify a list of file names. Each file must be a single slice, and each slice must be of the same size. The files must be in the correct order. Use SetFileName when reading a volume (multiple slice), since DataExtent will be modified after a SetFileNames call.
virtual vtkStringArray* vtkImageReader2::GetFileNames | ( | ) | [virtual] |
Specify a list of file names. Each file must be a single slice, and each slice must be of the same size. The files must be in the correct order. Use SetFileName when reading a volume (multiple slice), since DataExtent will be modified after a SetFileNames call.
virtual void vtkImageReader2::SetFilePrefix | ( | const char * | ) | [virtual] |
Specify file prefix for the image file or files. This can be used in place of SetFileName or SetFileNames if the filenames follow a specific naming pattern, but you must explicitly set the DataExtent so that the reader will know what range of slices to load.
virtual char* vtkImageReader2::GetFilePrefix | ( | ) | [virtual] |
Specify file prefix for the image file or files. This can be used in place of SetFileName or SetFileNames if the filenames follow a specific naming pattern, but you must explicitly set the DataExtent so that the reader will know what range of slices to load.
virtual void vtkImageReader2::SetFilePattern | ( | const char * | ) | [virtual] |
The sprintf-style format string used to build filename from FilePrefix and slice number.
virtual char* vtkImageReader2::GetFilePattern | ( | ) | [virtual] |
The sprintf-style format string used to build filename from FilePrefix and slice 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 100 of file vtkImageReader2.h.
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 101 of file vtkImageReader2.h.
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 102 of file vtkImageReader2.h.
virtual void vtkImageReader2::SetDataScalarTypeToUnsignedInt | ( | ) | [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 103 of file vtkImageReader2.h.
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 104 of file vtkImageReader2.h.
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 105 of file vtkImageReader2.h.
virtual void vtkImageReader2::SetDataScalarTypeToChar | ( | ) | [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 107 of file vtkImageReader2.h.
virtual void vtkImageReader2::SetDataScalarTypeToSignedChar | ( | ) | [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 109 of file vtkImageReader2.h.
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 111 of file vtkImageReader2.h.
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
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 135 of file vtkImageReader2.h.
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.
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.
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).
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.
Reimplemented in vtkMetaImageReader.
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 197 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 202 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::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 * | vtkNotUsedfname | ) | [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 230 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 vtkDICOMImageReader, vtkMINCImageReader, vtkMetaImageReader, vtkBMPReader, vtkSLCReader, vtkPNMReader, vtkTIFFReader, vtkGESignaReader, vtkJPEGReader, and vtkPNGReader.
Definition at line 239 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 vtkDICOMImageReader, vtkMINCImageReader, vtkMetaImageReader, vtkBMPReader, vtkSLCReader, vtkPNMReader, vtkTIFFReader, vtkGESignaReader, vtkJPEGReader, and vtkPNGReader.
Definition at line 248 of file vtkImageReader2.h.
virtual int vtkImageReader2::RequestInformation | ( | vtkInformation * | request, |
vtkInformationVector ** | inputVector, | ||
vtkInformationVector * | outputVector | ||
) | [protected, virtual] |
Reimplemented from vtkImageAlgorithm.
Reimplemented in vtkMetaImageReader, vtkImageReader, vtkSLCReader, and vtkPNrrdReader.
virtual void vtkImageReader2::ExecuteInformation | ( | ) | [protected, virtual] |
Reimplemented in vtkMINCImageReader, vtkDICOMImageReader, vtkMetaImageReader, vtkTIFFReader, vtkBMPReader, vtkPNMReader, vtkGESignaReader, vtkPNGReader, and vtkJPEGReader.
virtual void vtkImageReader2::ExecuteData | ( | vtkDataObject * | output | ) | [protected, virtual] |
This method is the old style execute method
Reimplemented from vtkImageAlgorithm.
Reimplemented in vtkMINCImageReader, vtkDICOMImageReader, vtkMetaImageReader, vtkTIFFReader, vtkBMPReader, vtkImageReader, vtkMPIImageReader, vtkSLCReader, vtkGESignaReader, vtkPNGReader, and vtkJPEGReader.
virtual void vtkImageReader2::ComputeDataIncrements | ( | ) | [protected, virtual] |
Reimplemented in vtkBMPReader.
vtkStringArray* vtkImageReader2::FileNames [protected] |
Definition at line 257 of file vtkImageReader2.h.
char* vtkImageReader2::InternalFileName [protected] |
Definition at line 259 of file vtkImageReader2.h.
char* vtkImageReader2::FileName [protected] |
Definition at line 260 of file vtkImageReader2.h.
char* vtkImageReader2::FilePrefix [protected] |
Definition at line 261 of file vtkImageReader2.h.
char* vtkImageReader2::FilePattern [protected] |
Definition at line 262 of file vtkImageReader2.h.
int vtkImageReader2::NumberOfScalarComponents [protected] |
Definition at line 263 of file vtkImageReader2.h.
int vtkImageReader2::FileLowerLeft [protected] |
Definition at line 264 of file vtkImageReader2.h.
ifstream* vtkImageReader2::File [protected] |
Definition at line 266 of file vtkImageReader2.h.
unsigned long vtkImageReader2::DataIncrements[4] [protected] |
Definition at line 267 of file vtkImageReader2.h.
int vtkImageReader2::DataExtent[6] [protected] |
Definition at line 268 of file vtkImageReader2.h.
int vtkImageReader2::SwapBytes [protected] |
Definition at line 269 of file vtkImageReader2.h.
int vtkImageReader2::FileDimensionality [protected] |
Definition at line 271 of file vtkImageReader2.h.
unsigned long vtkImageReader2::HeaderSize [protected] |
Definition at line 272 of file vtkImageReader2.h.
int vtkImageReader2::DataScalarType [protected] |
Definition at line 273 of file vtkImageReader2.h.
unsigned long vtkImageReader2::ManualHeaderSize [protected] |
Definition at line 274 of file vtkImageReader2.h.
double vtkImageReader2::DataSpacing[3] [protected] |
Definition at line 276 of file vtkImageReader2.h.
double vtkImageReader2::DataOrigin[3] [protected] |
Definition at line 277 of file vtkImageReader2.h.
int vtkImageReader2::FileNameSliceOffset [protected] |
Definition at line 279 of file vtkImageReader2.h.
int vtkImageReader2::FileNameSliceSpacing [protected] |
Definition at line 280 of file vtkImageReader2.h.