ITK
4.1.0
Insight Segmentation and Registration Toolkit
|
#include <itkImageIOBase.h>
Classes | |
struct | MapPixelType |
class | UnknownType |
Public Types | |
typedef std::vector< std::string > | ArrayOfExtensionsType |
typedef ::itk::OffsetValueType | BufferSizeType |
enum | ByteOrder { BigEndian, LittleEndian, OrderNotApplicable } |
enum | FileType { ASCII, Binary, TypeNotApplicable } |
typedef ::itk::IndexValueType | IndexValueType |
enum | IOComponentType { UNKNOWNCOMPONENTTYPE, UCHAR, CHAR, USHORT, SHORT, UINT, INT, ULONG, LONG, FLOAT, DOUBLE } |
enum | IOPixelType { UNKNOWNPIXELTYPE, SCALAR, RGB, RGBA, OFFSET, VECTOR, POINT, COVARIANTVECTOR, SYMMETRICSECONDRANKTENSOR, DIFFUSIONTENSOR3D, COMPLEX, FIXEDARRAY, MATRIX } |
typedef SmartPointer< Self > | Pointer |
typedef ImageIOBase | Self |
typedef ::itk::intmax_t | SizeType |
typedef ::itk::SizeValueType | SizeValueType |
typedef LightProcessObject | Superclass |
Public Member Functions | |
virtual bool | CanReadFile (const char *)=0 |
virtual bool | CanStreamRead () |
virtual bool | CanStreamWrite () |
virtual bool | CanWriteFile (const char *)=0 |
virtual ImageIORegion | GenerateStreamableReadRegionFromRequestedRegion (const ImageIORegion &requested) const |
virtual unsigned int | GetActualNumberOfSplitsForWriting (unsigned int numberOfRequestedSplits, const ImageIORegion &pasteRegion, const ImageIORegion &largestPossibleRegion) |
std::string | GetByteOrderAsString (ByteOrder) const |
virtual unsigned int | GetComponentSize () const |
virtual IOComponentType | GetComponentType () const |
virtual const std::type_info & | GetComponentTypeInfo () const |
virtual std::vector< double > | GetDefaultDirection (unsigned int i) const |
virtual unsigned int | GetDimensions (unsigned int i) const |
virtual std::vector< double > | GetDirection (unsigned int i) const |
std::string | GetFileTypeAsString (FileType) const |
SizeType | GetImageSizeInBytes () const |
SizeType | GetImageSizeInComponents () const |
SizeType | GetImageSizeInPixels () const |
virtual const char * | GetNameOfClass () const |
virtual unsigned int | GetNumberOfDimensions () const |
virtual double | GetOrigin (unsigned int i) const |
virtual SizeType | GetPixelStride () const |
virtual double | GetSpacing (unsigned int i) const |
virtual ImageIORegion | GetSplitRegionForWriting (unsigned int ithPiece, unsigned int numberOfActualSplits, const ImageIORegion &pasteRegion, const ImageIORegion &largestPossibleRegion) |
const ArrayOfExtensionsType & | GetSupportedReadExtensions () const |
const ArrayOfExtensionsType & | GetSupportedWriteExtensions () const |
virtual void | Read (void *buffer)=0 |
virtual void | ReadImageInformation ()=0 |
void | SetByteOrderToLittleEndian () |
virtual void | SetComponentType (const IOComponentType _arg) |
virtual void | SetDirection (unsigned int i, std::vector< double > &direction) |
virtual void | SetDirection (unsigned int i, vnl_vector< double > &direction) |
void | SetFileTypeToBinary () |
void | SetNumberOfDimensions (unsigned int) |
virtual void | SetOrigin (unsigned int i, double origin) |
template<class TPixel , unsigned VLength> | |
void | SetPixelTypeInfo (const SymmetricSecondRankTensor< TPixel, VLength > *) |
template<typename TPixel > | |
void | SetPixelTypeInfo (const DiffusionTensor3D< TPixel > *) |
template<typename TPixel , unsigned VLength> | |
void | SetPixelTypeInfo (const Matrix< TPixel, VLength, VLength > *) |
template<typename TPixel > | |
void | SetPixelTypeInfo (const std::complex< TPixel > *) |
template<unsigned VLength> | |
void | SetPixelTypeInfo (const Offset< VLength > *) |
virtual void | SetSpacing (unsigned int i, double spacing) |
template<typename TPixel > | |
void | SetTypeInfo (const TPixel *) |
virtual bool | SupportsDimension (unsigned long dim) |
virtual void | Write (const void *buffer)=0 |
virtual void | WriteImageInformation ()=0 |
virtual void | SetFileName (const char *_arg) |
virtual const char * | GetFileName () const |
virtual void | SetDimensions (unsigned int i, unsigned int dim) |
virtual void | SetIORegion (ImageIORegion _arg) |
virtual const ImageIORegion & | GetIORegion () |
virtual void | SetPixelType (const IOPixelType _arg) |
virtual IOPixelType | GetPixelType () const |
virtual void | SetNumberOfComponents (unsigned int _arg) |
virtual const unsigned int & | GetNumberOfComponents () |
virtual void | SetUseCompression (bool _arg) |
virtual bool | GetUseCompression () const |
virtual void | UseCompressionOn () |
virtual void | UseCompressionOff () |
virtual void | SetUseStreamedReading (bool _arg) |
virtual bool | GetUseStreamedReading () const |
virtual void | UseStreamedReadingOn () |
virtual void | UseStreamedReadingOff () |
virtual void | SetUseStreamedWriting (bool _arg) |
virtual bool | GetUseStreamedWriting () const |
virtual void | UseStreamedWritingOn () |
virtual void | UseStreamedWritingOff () |
virtual void | SetFileType (const FileType _arg) |
virtual FileType | GetFileType () const |
void | SetFileTypeToASCII () |
virtual void | SetByteOrder (const ByteOrder _arg) |
virtual ByteOrder | GetByteOrder () const |
void | SetByteOrderToBigEndian () |
template<typename TPixel > | |
void | SetPixelTypeInfo (const TPixel *) |
template<typename TPixel > | |
void | SetPixelTypeInfo (const RGBPixel< TPixel > *) |
template<typename TPixel > | |
void | SetPixelTypeInfo (const RGBAPixel< TPixel > *) |
template<typename TPixel , unsigned VLength> | |
void | SetPixelTypeInfo (const Vector< TPixel, VLength > *) |
template<typename TPixel > | |
void | SetPixelTypeInfo (const VariableLengthVector< TPixel > *) |
template<typename TPixel , unsigned VLength> | |
void | SetPixelTypeInfo (const CovariantVector< TPixel, VLength > *) |
template<typename TPixel , unsigned VLength> | |
void | SetPixelTypeInfo (const FixedArray< TPixel, VLength > *) |
Static Public Member Functions | |
static std::string | GetComponentTypeAsString (IOComponentType) |
static IOComponentType | GetComponentTypeFromString (const std::string &typeString) |
static std::string | GetPixelTypeAsString (IOPixelType) |
static IOPixelType | GetPixelTypeFromString (const std::string &pixelString) |
Protected Member Functions | |
void | AddSupportedReadExtension (const char *extension) |
void | AddSupportedWriteExtension (const char *extension) |
void | ComputeStrides () |
virtual unsigned int | GetActualNumberOfSplitsForWritingCanStreamWrite (unsigned int numberOfRequestedSplits, const ImageIORegion &pasteRegion) const |
SizeType | GetComponentStride () const |
virtual unsigned int | GetPixelSize () const |
SizeType | GetRowStride () const |
SizeType | GetSliceStride () const |
virtual ImageIORegion | GetSplitRegionForWritingCanStreamWrite (unsigned int ithPiece, unsigned int numberOfActualSplits, const ImageIORegion &pasteRegion) const |
ImageIOBase () | |
void | PrintSelf (std::ostream &os, Indent indent) const |
virtual void | ReadBufferAsASCII (std::istream &os, void *buffer, IOComponentType ctype, SizeType numberOfBytesToBeRead) |
bool | ReadBufferAsBinary (std::istream &os, void *buffer, SizeType numberOfBytesToBeRead) |
virtual void | Reset (const bool freeDynamic=true) |
void | Resize (const unsigned int numDimensions, const unsigned int *dimensions) |
virtual void | WriteBufferAsASCII (std::ostream &os, const void *buffer, IOComponentType ctype, SizeType numberOfBytesToWrite) |
~ImageIOBase () | |
Protected Attributes | |
ByteOrder | m_ByteOrder |
IOComponentType | m_ComponentType |
std::vector< SizeValueType > | m_Dimensions |
std::vector< std::vector < double > > | m_Direction |
std::string | m_FileName |
FileType | m_FileType |
bool | m_Initialized |
ImageIORegion | m_IORegion |
unsigned int | m_NumberOfComponents |
unsigned int | m_NumberOfDimensions |
std::vector< double > | m_Origin |
IOPixelType | m_PixelType |
std::vector< double > | m_Spacing |
std::vector< SizeType > | m_Strides |
bool | m_UseCompression |
bool | m_UseStreamedReading |
bool | m_UseStreamedWriting |
Private Member Functions | |
ImageIOBase (const Self &) | |
void | operator= (const Self &) |
Private Attributes | |
ArrayOfExtensionsType | m_SupportedReadExtensions |
ArrayOfExtensionsType | m_SupportedWriteExtensions |
Abstract superclass defines image IO interface.
ImageIOBase is a class that reads and/or writes image data of a particular format (such as PNG or raw binary). The ImageIOBase encapsulates both the reading and writing of data. The ImageIOBase is used by the ImageFileReader class (to read data) and the ImageFileWriter (to write data) into a single file. The ImageSeriesReader and ImageSeriesWriter classes are used to read and write data (in conjunction with ImageIOBase) when the data is represented by a series of files. Normally the user does not directly manipulate this class other than to instantiate it, set the FileName, and assign it to a ImageFileReader/ImageFileWriter or ImageSeriesReader/ImageSeriesWriter.
A Pluggable factory pattern is used this allows different kinds of readers to be registered (even at run time) without having to modify the code in this class.
Definition at line 67 of file itkImageIOBase.h.
typedef std::vector< std::string > itk::ImageIOBase::ArrayOfExtensionsType |
Type for the list of strings to be used for extensions.
Definition at line 418 of file itkImageIOBase.h.
Type for representing size of bytes, and or positions along a memory buffer
Definition at line 288 of file itkImageIOBase.h.
Types for managing image size and image index components.
Reimplemented in itk::JPEG2000ImageIO.
Definition at line 80 of file itkImageIOBase.h.
typedef SmartPointer< Self > itk::ImageIOBase::Pointer |
Reimplemented from itk::LightProcessObject.
Reimplemented in itk::Bruker2DSEQImageIO, itk::AnalyzeImageIO, itk::GDCMImageIO, itk::HDF5ImageIO, itk::StimulateImageIO, itk::MINC2ImageIO, itk::MRCImageIO, itk::GE4ImageIO, itk::StreamingImageIOBase, itk::GE5ImageIO, itk::VoxBoCUBImageIO, itk::BioRadImageIO, itk::VTKImageIO, itk::IPLCommonImageIO, itk::SiemensVisionImageIO, itk::JPEG2000ImageIO, itk::VideoIOBase, itk::GEAdwImageIO, itk::RawImageIO< TPixel, VImageDimension >, itk::LSMImageIO, itk::NiftiImageIO, itk::TIFFImageIO, itk::GiplImageIO, itk::DicomImageIO, itk::FileListVideoIO, itk::BMPImageIO, itk::NrrdImageIO, itk::MetaImageIO, itk::DICOMImageIO2, itk::JPEGImageIO, and itk::PNGImageIO.
Definition at line 73 of file itkImageIOBase.h.
typedef ImageIOBase itk::ImageIOBase::Self |
Standard class typedefs.
Reimplemented from itk::LightProcessObject.
Reimplemented in itk::Bruker2DSEQImageIO, itk::AnalyzeImageIO, itk::GDCMImageIO, itk::HDF5ImageIO, itk::StimulateImageIO, itk::MINC2ImageIO, itk::MRCImageIO, itk::GE4ImageIO, itk::StreamingImageIOBase, itk::GE5ImageIO, itk::VoxBoCUBImageIO, itk::BioRadImageIO, itk::VTKImageIO, itk::IPLCommonImageIO, itk::SiemensVisionImageIO, itk::JPEG2000ImageIO, itk::VideoIOBase, itk::GEAdwImageIO, itk::RawImageIO< TPixel, VImageDimension >, itk::LSMImageIO, itk::NiftiImageIO, itk::TIFFImageIO, itk::GiplImageIO, itk::DicomImageIO, itk::FileListVideoIO, itk::BMPImageIO, itk::NrrdImageIO, itk::MetaImageIO, itk::DICOMImageIO2, itk::JPEGImageIO, and itk::PNGImageIO.
Definition at line 71 of file itkImageIOBase.h.
typedef ::itk::intmax_t itk::ImageIOBase::SizeType |
Type for representing size of bytes, and or positions along a file
Definition at line 284 of file itkImageIOBase.h.
Reimplemented in itk::JPEG2000ImageIO, itk::RawImageIO< TPixel, VImageDimension >, and itk::VideoIOBase.
Definition at line 85 of file itkImageIOBase.h.
Reimplemented from itk::LightProcessObject.
Reimplemented in itk::Bruker2DSEQImageIO, itk::AnalyzeImageIO, itk::GDCMImageIO, itk::HDF5ImageIO, itk::StimulateImageIO, itk::MINC2ImageIO, itk::MRCImageIO, itk::GE4ImageIO, itk::StreamingImageIOBase, itk::GE5ImageIO, itk::VoxBoCUBImageIO, itk::BioRadImageIO, itk::VTKImageIO, itk::IPLCommonImageIO, itk::SiemensVisionImageIO, itk::JPEG2000ImageIO, itk::VideoIOBase, itk::GEAdwImageIO, itk::RawImageIO< TPixel, VImageDimension >, itk::LSMImageIO, itk::NiftiImageIO, itk::TIFFImageIO, itk::GiplImageIO, itk::DicomImageIO, itk::FileListVideoIO, itk::BMPImageIO, itk::NrrdImageIO, itk::MetaImageIO, itk::DICOMImageIO2, itk::JPEGImageIO, and itk::PNGImageIO.
Definition at line 72 of file itkImageIOBase.h.
Enums used to specify byte order; whether Big Endian or Little Endian. Some subclasses use this, some ignore it.
Definition at line 234 of file itkImageIOBase.h.
Enums used to specify write style: whether binary or ASCII. Some subclasses use this, some ignore it.
Definition at line 230 of file itkImageIOBase.h.
Enums used to manipulate the component type. The component type refers to the actual storage class associated with either a SCALAR pixel type or elements of a compound pixel.
Definition at line 105 of file itkImageIOBase.h.
Enums used to manipulate the pixel type. The pixel type provides context for automatic data conversions (for instance, RGB to SCALAR, VECTOR to SCALAR).
UNKNOWNPIXELTYPE | |
SCALAR | |
RGB | |
RGBA | |
OFFSET | |
VECTOR | |
POINT | |
COVARIANTVECTOR | |
SYMMETRICSECONDRANKTENSOR | |
DIFFUSIONTENSOR3D | |
COMPLEX | |
FIXEDARRAY | |
MATRIX |
Definition at line 97 of file itkImageIOBase.h.
itk::ImageIOBase::ImageIOBase | ( | ) | [protected] |
itk::ImageIOBase::~ImageIOBase | ( | ) | [protected] |
itk::ImageIOBase::ImageIOBase | ( | const Self & | ) | [private] |
void itk::ImageIOBase::AddSupportedReadExtension | ( | const char * | extension | ) | [protected] |
Insert an extension to the list of supported extensions for reading.
void itk::ImageIOBase::AddSupportedWriteExtension | ( | const char * | extension | ) | [protected] |
Insert an extension to the list of supported extensions for writing.
virtual bool itk::ImageIOBase::CanReadFile | ( | const char * | ) | [pure virtual] |
Determine the file type. Returns true if this ImageIO can read the file specified.
Implemented in itk::Bruker2DSEQImageIO, itk::AnalyzeImageIO, itk::HDF5ImageIO, itk::GDCMImageIO, itk::RawImageIO< TPixel, VImageDimension >, itk::IPLCommonImageIO, itk::MINC2ImageIO, itk::MRCImageIO, itk::StimulateImageIO, itk::VTKImageIO, itk::GE4ImageIO, itk::GE5ImageIO, itk::SiemensVisionImageIO, itk::GEAdwImageIO, itk::FileListVideoIO, itk::VoxBoCUBImageIO, itk::BioRadImageIO, itk::JPEG2000ImageIO, itk::NiftiImageIO, itk::LSMImageIO, itk::MetaImageIO, itk::JPEGImageIO, itk::TIFFImageIO, itk::NrrdImageIO, itk::PNGImageIO, itk::BMPImageIO, itk::GiplImageIO, and itk::DICOMImageIO2.
virtual bool itk::ImageIOBase::CanStreamRead | ( | void | ) | [inline, virtual] |
Determine if the ImageIO can stream reading from the current settings. Default is false. If this is queried after the header of the file has been read then it will indicate if that file can be streamed
Reimplemented in itk::MetaImageIO, itk::VTKImageIO, and itk::StreamingImageIOBase.
Definition at line 324 of file itkImageIOBase.h.
virtual bool itk::ImageIOBase::CanStreamWrite | ( | void | ) | [inline, virtual] |
Determine if the ImageIO can stream write from the current settings.
There are two types of non exclusive streaming: pasteing subregions, and iterative
Reimplemented in itk::MetaImageIO, itk::JPEG2000ImageIO, itk::VTKImageIO, and itk::StreamingImageIOBase.
Definition at line 348 of file itkImageIOBase.h.
virtual bool itk::ImageIOBase::CanWriteFile | ( | const char * | ) | [pure virtual] |
Determine the file type. Returns true if this ImageIO can read the file specified.
Implemented in itk::Bruker2DSEQImageIO, itk::AnalyzeImageIO, itk::RawImageIO< TPixel, VImageDimension >, itk::HDF5ImageIO, itk::GDCMImageIO, itk::FileListVideoIO, itk::IPLCommonImageIO, itk::MRCImageIO, itk::MINC2ImageIO, itk::StimulateImageIO, itk::VTKImageIO, itk::NiftiImageIO, itk::VoxBoCUBImageIO, itk::BioRadImageIO, itk::JPEG2000ImageIO, itk::TIFFImageIO, itk::MetaImageIO, itk::JPEGImageIO, itk::LSMImageIO, itk::PNGImageIO, itk::DICOMImageIO2, itk::NrrdImageIO, itk::BMPImageIO, and itk::GiplImageIO.
void itk::ImageIOBase::ComputeStrides | ( | ) | [protected] |
Calculates the different strides (distance from one thing to the next). Upon return, strides[0] = bytes to get to the next component of a pixel, strides[1] = bytes to get to the next pixel in x direction, strides[2] = bytes to get to the next row in y direction, strides[3] = bytes to get to the next slice in z direction, etc.
virtual ImageIORegion itk::ImageIOBase::GenerateStreamableReadRegionFromRequestedRegion | ( | const ImageIORegion & | requested | ) | const [virtual] |
Method for supporting streaming. Given a requested region, determine what could be the region that we can read from the file. This is called the streamable region, which will be equal or smaller than the LargestPossibleRegion (unless it was dimensionaly clipped) and greater or equal to the RequestedRegion
the resulting IORegion may be a greater dimensions the the requested IORegion, if the the derived class is unable to read the requested region. For example if the file has a size of [ 10, 10, 10] but the requested region is [10, 10] the return may be 3 dimensions.
Reimplemented in itk::MetaImageIO, itk::NiftiImageIO, itk::JPEG2000ImageIO, and itk::StreamingImageIOBase.
virtual unsigned int itk::ImageIOBase::GetActualNumberOfSplitsForWriting | ( | unsigned int | numberOfRequestedSplits, |
const ImageIORegion & | pasteRegion, | ||
const ImageIORegion & | largestPossibleRegion | ||
) | [virtual] |
Before this method is called all the configuration will be done, that is Streaming/PasteRegion/Compression/Filename etc If pasting is being used the number of requested splits is for that region not the largest. The derived ImageIO class should verify that the file is capable of being writen with this configuration. If pasted is enabled and is not support or does not work with the file, then an excepetion should be thrown.
The default implementation depends on CanStreamWrite. If false then 1 is returned (unless pasting is indicated), so that the whole file will be updated in one region. If true then its assumed that any arbitrary region can be writen to any file. So the users request will be respected. If a derived class has more restictive conditions then they should be checked
Reimplemented in itk::MetaImageIO, and itk::StreamingImageIOBase.
virtual unsigned int itk::ImageIOBase::GetActualNumberOfSplitsForWritingCanStreamWrite | ( | unsigned int | numberOfRequestedSplits, |
const ImageIORegion & | pasteRegion | ||
) | const [protected, virtual] |
an implementation of ImageRegionSplitter:GetNumberOfSplits
virtual ByteOrder itk::ImageIOBase::GetByteOrder | ( | ) | const [virtual] |
These methods 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. Note: most UNIX machines are BigEndian while PC's and VAX's are LittleEndian. So if the file you are reading in was generated on a VAX or PC, SetByteOrderToLittleEndian() otherwise SetByteOrderToBigEndian(). Some ImageIOBase subclasses ignore these methods.
std::string itk::ImageIOBase::GetByteOrderAsString | ( | ByteOrder | ) | const |
Convenience method returns the ByteOrder as a string. This can be used for writing output files.
virtual unsigned int itk::ImageIOBase::GetComponentSize | ( | ) | const [virtual] |
Compute the size (in bytes) of the components of a pixel. For example, and RGB pixel of unsigned char would have a component size of 1 byte. This method can be invoked only after the component type is set.
Reimplemented in itk::IPLCommonImageIO.
SizeType itk::ImageIOBase::GetComponentStride | ( | ) | const [protected] |
Convenient method for accessing number of bytes to get to the next pixel component. Returns m_Strides[0].
virtual IOComponentType itk::ImageIOBase::GetComponentType | ( | ) | const [virtual] |
static std::string itk::ImageIOBase::GetComponentTypeAsString | ( | IOComponentType | ) | [static] |
Convenience method returns the IOComponentType as a string. This can be used for writing output files.
static IOComponentType itk::ImageIOBase::GetComponentTypeFromString | ( | const std::string & | typeString | ) | [static] |
Convenience method returns the IOComponentType corresponding to a string.
virtual const std::type_info& itk::ImageIOBase::GetComponentTypeInfo | ( | ) | const [virtual] |
get the type_info for the current pixel component type. This function is DEPRECATED and only provided for backwards compatibility. There is no use for this method that can't be satisfied by calling GetComponentType.
virtual std::vector< double > itk::ImageIOBase::GetDefaultDirection | ( | unsigned int | i | ) | const [virtual] |
Return the directions to be assigned by default to recipient images whose dimension is smaller than the image dimension in file.
Reimplemented in itk::AnalyzeImageIO.
virtual unsigned int itk::ImageIOBase::GetDimensions | ( | unsigned int | i | ) | const [inline, virtual] |
Definition at line 121 of file itkImageIOBase.h.
virtual std::vector< double > itk::ImageIOBase::GetDirection | ( | unsigned int | i | ) | const [inline, virtual] |
Reimplemented in itk::AnalyzeImageIO, and itk::FileListVideoIO.
Definition at line 148 of file itkImageIOBase.h.
virtual const char* itk::ImageIOBase::GetFileName | ( | ) | const [virtual] |
Set/Get the name of the file to be read.
virtual FileType itk::ImageIOBase::GetFileType | ( | ) | const [virtual] |
These methods control whether the file is written binary or ASCII. Many file formats (i.e., subclasses) ignore this flag.
std::string itk::ImageIOBase::GetFileTypeAsString | ( | FileType | ) | const |
Convenience method returns the FileType as a string. This can be used for writing output files.
Return the number of bytes in the image.
Return the number of pixels times the number of components in the image.
Return the number of pixels in the image.
virtual const ImageIORegion& itk::ImageIOBase::GetIORegion | ( | ) | [virtual] |
Specify the region of the image data to either read or write. The IORegion specifies the part of the image to read or write. Regions are defined with an index and a size vector. These vectors define the start (lower-left corner) and length of the region within the image. Make sure that the IORegion lies within the image.
virtual const char* itk::ImageIOBase::GetNameOfClass | ( | ) | const [virtual] |
Run-time type information (and related methods).
Reimplemented from itk::LightProcessObject.
Reimplemented in itk::Bruker2DSEQImageIO, itk::AnalyzeImageIO, itk::GDCMImageIO, itk::HDF5ImageIO, itk::MINC2ImageIO, itk::StimulateImageIO, itk::IPLCommonImageIO, itk::MRCImageIO, itk::GE4ImageIO, itk::VideoIOBase, itk::VTKImageIO, itk::GE5ImageIO, itk::VoxBoCUBImageIO, itk::BioRadImageIO, itk::SiemensVisionImageIO, itk::JPEG2000ImageIO, itk::StreamingImageIOBase, itk::GEAdwImageIO, itk::RawImageIO< TPixel, VImageDimension >, itk::LSMImageIO, itk::NiftiImageIO, itk::TIFFImageIO, itk::BMPImageIO, itk::GiplImageIO, itk::DicomImageIO, itk::FileListVideoIO, itk::NrrdImageIO, itk::MetaImageIO, itk::DICOMImageIO2, itk::JPEGImageIO, and itk::PNGImageIO.
virtual const unsigned int& itk::ImageIOBase::GetNumberOfComponents | ( | ) | [virtual] |
Set/Get the number of components per pixel in the image. This may be set by the reading process. For SCALAR pixel types, NumberOfComponents will be 1. For other pixel types, NumberOfComponents will be greater than or equal to one.
virtual unsigned int itk::ImageIOBase::GetNumberOfDimensions | ( | ) | const [virtual] |
virtual double itk::ImageIOBase::GetOrigin | ( | unsigned int | i | ) | const [inline, virtual] |
Reimplemented in itk::FileListVideoIO.
Definition at line 128 of file itkImageIOBase.h.
virtual unsigned int itk::ImageIOBase::GetPixelSize | ( | ) | const [protected, virtual] |
Compute the size (in bytes) of the pixel. For example, and RGB pixel of unsigned char would have size 3 bytes.
virtual SizeType itk::ImageIOBase::GetPixelStride | ( | ) | const [virtual] |
Convenient method for accessing the number of bytes to get to the next pixel. Returns m_Strides[1];
Please note that this methods depends the private methods ComputeStrides being called, otherwise this is the incorrect value.
virtual IOPixelType itk::ImageIOBase::GetPixelType | ( | ) | const [virtual] |
Set/Get the type of the pixel. The PixelTypes provides context to the IO mechanisms for data conversions. PixelTypes can be SCALAR, RGB, RGBA, VECTOR, COVARIANTVECTOR, POINT, INDEX. If the PIXELTYPE is SCALAR, then the NumberOfComponents should be 1. Anyother of PIXELTYPE will have more than one component.
static std::string itk::ImageIOBase::GetPixelTypeAsString | ( | IOPixelType | ) | [static] |
Convenience method returns the IOPixelType as a string. This can be used for writing output files.
static IOPixelType itk::ImageIOBase::GetPixelTypeFromString | ( | const std::string & | pixelString | ) | [static] |
Convenience method returns the IOPixelType corresponding to a string.
SizeType itk::ImageIOBase::GetRowStride | ( | ) | const [protected] |
Convenient method for accessing the number of bytes to get to the next row. Returns m_Strides[2].
SizeType itk::ImageIOBase::GetSliceStride | ( | ) | const [protected] |
Convenient method for accessing the number of bytes to get to the next slice. Returns m_Strides[3].
virtual double itk::ImageIOBase::GetSpacing | ( | unsigned int | i | ) | const [inline, virtual] |
Reimplemented in itk::FileListVideoIO.
Definition at line 137 of file itkImageIOBase.h.
virtual ImageIORegion itk::ImageIOBase::GetSplitRegionForWriting | ( | unsigned int | ithPiece, |
unsigned int | numberOfActualSplits, | ||
const ImageIORegion & | pasteRegion, | ||
const ImageIORegion & | largestPossibleRegion | ||
) | [virtual] |
returns the ith IORegion
numberOfActualSplits should be the value returned from GetActualNumberOfSplitsForWriting with the same parameters
Derieved classes should overload this method to return a compatible region
Reimplemented in itk::MetaImageIO.
virtual ImageIORegion itk::ImageIOBase::GetSplitRegionForWritingCanStreamWrite | ( | unsigned int | ithPiece, |
unsigned int | numberOfActualSplits, | ||
const ImageIORegion & | pasteRegion | ||
) | const [protected, virtual] |
an implementation of ImageRegionSplitter:GetSplit
const ArrayOfExtensionsType& itk::ImageIOBase::GetSupportedReadExtensions | ( | ) | const |
This method returns an array with the list of filename extensions supported for reading by this ImageIO class. This is intended to facilitate GUI and application level integration.
const ArrayOfExtensionsType& itk::ImageIOBase::GetSupportedWriteExtensions | ( | ) | const |
This method returns an array with the list of filename extensions supported for writing by this ImageIO class. This is intended to facilitate GUI and application level integration.
virtual bool itk::ImageIOBase::GetUseCompression | ( | ) | const [virtual] |
Set/Get a boolean to use the compression or not.
virtual bool itk::ImageIOBase::GetUseStreamedReading | ( | ) | const [virtual] |
Set/Get a boolean to use streaming while reading or not.
virtual bool itk::ImageIOBase::GetUseStreamedWriting | ( | ) | const [virtual] |
Set/Get a boolean to use streaming while writing or not.
void itk::ImageIOBase::operator= | ( | const Self & | ) | [private] |
This method causes the filter to generate its output.
Reimplemented from itk::LightProcessObject.
Reimplemented in itk::SiemensVisionImageIO, itk::GDCMImageIO, itk::AnalyzeImageIO, itk::Bruker2DSEQImageIO, itk::IPLCommonImageIO, itk::StreamingImageIOBase, itk::TIFFImageIO, itk::MetaImageIO, itk::MINC2ImageIO, itk::RawImageIO< TPixel, VImageDimension >, itk::FileListVideoIO, itk::HDF5ImageIO, itk::VTKImageIO, itk::StimulateImageIO, itk::VideoIOBase, itk::NiftiImageIO, itk::DICOMImageIO2, itk::GE4ImageIO, itk::GE5ImageIO, itk::MRCImageIO, itk::GEAdwImageIO, itk::JPEG2000ImageIO, itk::BioRadImageIO, itk::JPEGImageIO, itk::PNGImageIO, itk::VoxBoCUBImageIO, itk::LSMImageIO, itk::NrrdImageIO, itk::BMPImageIO, itk::GiplImageIO, and itk::DicomImageIO.
void itk::ImageIOBase::PrintSelf | ( | std::ostream & | os, |
Indent | indent | ||
) | const [protected, 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 itk::LightProcessObject.
Reimplemented in itk::GDCMImageIO, itk::Bruker2DSEQImageIO, itk::MetaImageIO, itk::AnalyzeImageIO, itk::RawImageIO< TPixel, VImageDimension >, itk::HDF5ImageIO, itk::FileListVideoIO, itk::TIFFImageIO, itk::IPLCommonImageIO, itk::StimulateImageIO, itk::VideoIOBase, itk::DICOMImageIO2, itk::JPEG2000ImageIO, itk::MINC2ImageIO, itk::MRCImageIO, itk::VTKImageIO, itk::NiftiImageIO, itk::BioRadImageIO, itk::VoxBoCUBImageIO, itk::JPEGImageIO, itk::StreamingImageIOBase, itk::LSMImageIO, itk::PNGImageIO, itk::NrrdImageIO, itk::BMPImageIO, and itk::GiplImageIO.
virtual void itk::ImageIOBase::Read | ( | void * | buffer | ) | [pure virtual] |
Reads the data from disk into the memory buffer provided.
Implemented in itk::Bruker2DSEQImageIO, itk::AnalyzeImageIO, itk::HDF5ImageIO, itk::GDCMImageIO, itk::RawImageIO< TPixel, VImageDimension >, itk::IPLCommonImageIO, itk::MINC2ImageIO, itk::MRCImageIO, itk::StimulateImageIO, itk::VTKImageIO, itk::FileListVideoIO, itk::VoxBoCUBImageIO, itk::BioRadImageIO, itk::JPEG2000ImageIO, itk::NiftiImageIO, itk::LSMImageIO, itk::MetaImageIO, itk::JPEGImageIO, itk::TIFFImageIO, itk::NrrdImageIO, itk::PNGImageIO, itk::BMPImageIO, itk::GiplImageIO, and itk::DICOMImageIO2.
virtual void itk::ImageIOBase::ReadBufferAsASCII | ( | std::istream & | os, |
void * | buffer, | ||
IOComponentType | ctype, | ||
SizeType | numberOfBytesToBeRead | ||
) | [protected, virtual] |
Convenient method to read a buffer as ASCII text.
Reimplemented in itk::VTKImageIO.
bool itk::ImageIOBase::ReadBufferAsBinary | ( | std::istream & | os, |
void * | buffer, | ||
SizeType | numberOfBytesToBeRead | ||
) | [protected] |
Convenient method to read a buffer as binary. Return true on success.
Reimplemented in itk::StreamingImageIOBase.
virtual void itk::ImageIOBase::ReadImageInformation | ( | ) | [pure virtual] |
Read the spacing and dimentions of the image. Assumes SetFileName has been called with a valid file name.
Implemented in itk::Bruker2DSEQImageIO, itk::AnalyzeImageIO, itk::HDF5ImageIO, itk::GDCMImageIO, itk::RawImageIO< TPixel, VImageDimension >, itk::IPLCommonImageIO, itk::MINC2ImageIO, itk::MRCImageIO, itk::StimulateImageIO, itk::VTKImageIO, itk::FileListVideoIO, itk::VoxBoCUBImageIO, itk::BioRadImageIO, itk::JPEG2000ImageIO, itk::NiftiImageIO, itk::LSMImageIO, itk::MetaImageIO, itk::JPEGImageIO, itk::TIFFImageIO, itk::NrrdImageIO, itk::PNGImageIO, itk::BMPImageIO, itk::GiplImageIO, and itk::DICOMImageIO2.
virtual void itk::ImageIOBase::Reset | ( | const bool | freeDynamic = true | ) | [protected, virtual] |
Return the object to an initialized state, ready to be used
void itk::ImageIOBase::Resize | ( | const unsigned int | numDimensions, |
const unsigned int * | dimensions | ||
) | [protected] |
Resize the ImageIOBase object to new dimensions.
virtual void itk::ImageIOBase::SetByteOrder | ( | const ByteOrder | _arg | ) | [virtual] |
These methods 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. Note: most UNIX machines are BigEndian while PC's and VAX's are LittleEndian. So if the file you are reading in was generated on a VAX or PC, SetByteOrderToLittleEndian() otherwise SetByteOrderToBigEndian(). Some ImageIOBase subclasses ignore these methods.
void itk::ImageIOBase::SetByteOrderToBigEndian | ( | ) | [inline] |
These methods 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. Note: most UNIX machines are BigEndian while PC's and VAX's are LittleEndian. So if the file you are reading in was generated on a VAX or PC, SetByteOrderToLittleEndian() otherwise SetByteOrderToBigEndian(). Some ImageIOBase subclasses ignore these methods.
Definition at line 264 of file itkImageIOBase.h.
void itk::ImageIOBase::SetByteOrderToLittleEndian | ( | ) | [inline] |
Definition at line 270 of file itkImageIOBase.h.
virtual void itk::ImageIOBase::SetComponentType | ( | const IOComponentType | _arg | ) | [virtual] |
Set/Get the component type of the image. This is always a native type.
virtual void itk::ImageIOBase::SetDimensions | ( | unsigned int | i, |
unsigned int | dim | ||
) | [virtual] |
Set/Get the image dimensions in the x, y, z, etc. directions. GetDimensions() is typically used after reading the data; the SetDimensions() is used prior to writing the data.
virtual void itk::ImageIOBase::SetDirection | ( | unsigned int | i, |
std::vector< double > & | direction | ||
) | [virtual] |
Set/Get the image direction on an axis-by-axis basis. The SetDirection() method is required when writing the image.
virtual void itk::ImageIOBase::SetDirection | ( | unsigned int | i, |
vnl_vector< double > & | direction | ||
) | [virtual] |
virtual void itk::ImageIOBase::SetFileName | ( | const char * | _arg | ) | [virtual] |
Set/Get the name of the file to be read.
Reimplemented in itk::FileListVideoIO.
virtual void itk::ImageIOBase::SetFileType | ( | const FileType | _arg | ) | [virtual] |
These methods control whether the file is written binary or ASCII. Many file formats (i.e., subclasses) ignore this flag.
void itk::ImageIOBase::SetFileTypeToASCII | ( | ) | [inline] |
These methods control whether the file is written binary or ASCII. Many file formats (i.e., subclasses) ignore this flag.
Definition at line 240 of file itkImageIOBase.h.
void itk::ImageIOBase::SetFileTypeToBinary | ( | ) | [inline] |
Definition at line 246 of file itkImageIOBase.h.
virtual void itk::ImageIOBase::SetIORegion | ( | ImageIORegion | _arg | ) | [virtual] |
Specify the region of the image data to either read or write. The IORegion specifies the part of the image to read or write. Regions are defined with an index and a size vector. These vectors define the start (lower-left corner) and length of the region within the image. Make sure that the IORegion lies within the image.
virtual void itk::ImageIOBase::SetNumberOfComponents | ( | unsigned int | _arg | ) | [virtual] |
Set/Get the number of components per pixel in the image. This may be set by the reading process. For SCALAR pixel types, NumberOfComponents will be 1. For other pixel types, NumberOfComponents will be greater than or equal to one.
void itk::ImageIOBase::SetNumberOfDimensions | ( | unsigned | int | ) |
Set/Get the number of independent variables (dimensions) in the image being read or written. Note this is not necessarily what is written, rather the IORegion controls that.
virtual void itk::ImageIOBase::SetOrigin | ( | unsigned int | i, |
double | origin | ||
) | [virtual] |
Set/Get the image origin on a axis-by-axis basis. The SetOrigin() method is required when writing the image.
virtual void itk::ImageIOBase::SetPixelType | ( | const IOPixelType | _arg | ) | [virtual] |
Set/Get the type of the pixel. The PixelTypes provides context to the IO mechanisms for data conversions. PixelTypes can be SCALAR, RGB, RGBA, VECTOR, COVARIANTVECTOR, POINT, INDEX. If the PIXELTYPE is SCALAR, then the NumberOfComponents should be 1. Anyother of PIXELTYPE will have more than one component.
void itk::ImageIOBase::SetPixelTypeInfo | ( | const TPixel * | ) | [inline] |
Definition at line 443 of file itkImageIOBase.h.
void itk::ImageIOBase::SetPixelTypeInfo | ( | const RGBPixel< TPixel > * | ) | [inline] |
Definition at line 450 of file itkImageIOBase.h.
void itk::ImageIOBase::SetPixelTypeInfo | ( | const RGBAPixel< TPixel > * | ) | [inline] |
Definition at line 457 of file itkImageIOBase.h.
void itk::ImageIOBase::SetPixelTypeInfo | ( | const Vector< TPixel, VLength > * | ) | [inline] |
Definition at line 464 of file itkImageIOBase.h.
void itk::ImageIOBase::SetPixelTypeInfo | ( | const VariableLengthVector< TPixel > * | ) | [inline] |
Definition at line 471 of file itkImageIOBase.h.
void itk::ImageIOBase::SetPixelTypeInfo | ( | const CovariantVector< TPixel, VLength > * | ) | [inline] |
Definition at line 478 of file itkImageIOBase.h.
void itk::ImageIOBase::SetPixelTypeInfo | ( | const FixedArray< TPixel, VLength > * | ) | [inline] |
Definition at line 485 of file itkImageIOBase.h.
void itk::ImageIOBase::SetPixelTypeInfo | ( | const SymmetricSecondRankTensor< TPixel, VLength > * | ) | [inline] |
Definition at line 494 of file itkImageIOBase.h.
void itk::ImageIOBase::SetPixelTypeInfo | ( | const DiffusionTensor3D< TPixel > * | ) | [inline] |
Definition at line 502 of file itkImageIOBase.h.
void itk::ImageIOBase::SetPixelTypeInfo | ( | const Matrix< TPixel, VLength, VLength > * | ) | [inline] |
Definition at line 510 of file itkImageIOBase.h.
void itk::ImageIOBase::SetPixelTypeInfo | ( | const std::complex< TPixel > * | ) | [inline] |
Definition at line 518 of file itkImageIOBase.h.
void itk::ImageIOBase::SetPixelTypeInfo | ( | const Offset< VLength > * | ) | [inline] |
Definition at line 526 of file itkImageIOBase.h.
virtual void itk::ImageIOBase::SetSpacing | ( | unsigned int | i, |
double | spacing | ||
) | [virtual] |
Set/Get the image spacing on an axis-by-axis basis. The SetSpacing() method is required when writing the image.
void itk::ImageIOBase::SetTypeInfo | ( | const TPixel * | ) |
virtual void itk::ImageIOBase::SetUseCompression | ( | bool | _arg | ) | [virtual] |
Set/Get a boolean to use the compression or not.
virtual void itk::ImageIOBase::SetUseStreamedReading | ( | bool | _arg | ) | [virtual] |
Set/Get a boolean to use streaming while reading or not.
virtual void itk::ImageIOBase::SetUseStreamedWriting | ( | bool | _arg | ) | [virtual] |
Set/Get a boolean to use streaming while writing or not.
virtual bool itk::ImageIOBase::SupportsDimension | ( | unsigned long | dim | ) | [inline, virtual] |
The different types of ImageIO's can support data of varying dimensionality. For example, some file formats are strictly 2D while others can support 2D, 3D, or even n-D. This method returns true/false as to whether the ImageIO can support the dimension indicated.
Reimplemented in itk::RawImageIO< TPixel, VImageDimension >, itk::MetaImageIO, and itk::NrrdImageIO.
Definition at line 369 of file itkImageIOBase.h.
virtual void itk::ImageIOBase::UseCompressionOff | ( | ) | [virtual] |
Set/Get a boolean to use the compression or not.
virtual void itk::ImageIOBase::UseCompressionOn | ( | ) | [virtual] |
Set/Get a boolean to use the compression or not.
virtual void itk::ImageIOBase::UseStreamedReadingOff | ( | ) | [virtual] |
Set/Get a boolean to use streaming while reading or not.
virtual void itk::ImageIOBase::UseStreamedReadingOn | ( | ) | [virtual] |
Set/Get a boolean to use streaming while reading or not.
virtual void itk::ImageIOBase::UseStreamedWritingOff | ( | ) | [virtual] |
Set/Get a boolean to use streaming while writing or not.
virtual void itk::ImageIOBase::UseStreamedWritingOn | ( | ) | [virtual] |
Set/Get a boolean to use streaming while writing or not.
virtual void itk::ImageIOBase::Write | ( | const void * | buffer | ) | [pure virtual] |
Writes the data to disk from the memory buffer provided. Make sure that the IORegions has been set properly. The buffer is cast to a pointer to the beginning of the image data.
Implemented in itk::Bruker2DSEQImageIO, itk::AnalyzeImageIO, itk::RawImageIO< TPixel, VImageDimension >, itk::HDF5ImageIO, itk::GDCMImageIO, itk::FileListVideoIO, itk::IPLCommonImageIO, itk::MINC2ImageIO, itk::StimulateImageIO, itk::VTKImageIO, itk::MRCImageIO, itk::NiftiImageIO, itk::BioRadImageIO, itk::VoxBoCUBImageIO, itk::TIFFImageIO, itk::JPEG2000ImageIO, itk::JPEGImageIO, itk::MetaImageIO, itk::LSMImageIO, itk::PNGImageIO, itk::DICOMImageIO2, itk::NrrdImageIO, itk::BMPImageIO, and itk::GiplImageIO.
virtual void itk::ImageIOBase::WriteBufferAsASCII | ( | std::ostream & | os, |
const void * | buffer, | ||
IOComponentType | ctype, | ||
SizeType | numberOfBytesToWrite | ||
) | [protected, virtual] |
Convenient method to write a buffer as ASCII text.
Reimplemented in itk::VTKImageIO.
virtual void itk::ImageIOBase::WriteImageInformation | ( | ) | [pure virtual] |
Writes the spacing and dimentions of the image. Assumes SetFileName has been called with a valid file name.
Implemented in itk::Bruker2DSEQImageIO, itk::AnalyzeImageIO, itk::RawImageIO< TPixel, VImageDimension >, itk::HDF5ImageIO, itk::GDCMImageIO, itk::FileListVideoIO, itk::IPLCommonImageIO, itk::MINC2ImageIO, itk::StimulateImageIO, itk::VTKImageIO, itk::NiftiImageIO, itk::BioRadImageIO, itk::VoxBoCUBImageIO, itk::TIFFImageIO, itk::JPEG2000ImageIO, itk::JPEGImageIO, itk::MetaImageIO, itk::LSMImageIO, itk::PNGImageIO, itk::DICOMImageIO2, itk::MRCImageIO, itk::NrrdImageIO, itk::BMPImageIO, and itk::GiplImageIO.
ByteOrder itk::ImageIOBase::m_ByteOrder [protected] |
Big or Little Endian, and the type of the file. (May be ignored.)
Definition at line 545 of file itkImageIOBase.h.
IOComponentType itk::ImageIOBase::m_ComponentType [protected] |
Used internally to keep track of the type of the component. It is set when ComputeStrides() is invoked.
Definition at line 542 of file itkImageIOBase.h.
std::vector< SizeValueType > itk::ImageIOBase::m_Dimensions [protected] |
The array which stores the number of pixels in the x, y, z directions.
Definition at line 576 of file itkImageIOBase.h.
std::vector< std::vector< double > > itk::ImageIOBase::m_Direction [protected] |
The arrays which store the direction cosines of the image.
Definition at line 586 of file itkImageIOBase.h.
std::string itk::ImageIOBase::m_FileName [protected] |
Filename to read
Definition at line 553 of file itkImageIOBase.h.
FileType itk::ImageIOBase::m_FileType [protected] |
Definition at line 547 of file itkImageIOBase.h.
bool itk::ImageIOBase::m_Initialized [protected] |
Does the ImageIOBase object have enough info to be of use?
Definition at line 550 of file itkImageIOBase.h.
ImageIORegion itk::ImageIOBase::m_IORegion [protected] |
The region to read or write. The region contains information about the data within the region to read or write.
Definition at line 573 of file itkImageIOBase.h.
unsigned int itk::ImageIOBase::m_NumberOfComponents [protected] |
Stores the number of components per pixel. This will be 1 for grayscale images, 3 for RGBPixel images, and 4 for RGBPixelA images.
Definition at line 557 of file itkImageIOBase.h.
unsigned int itk::ImageIOBase::m_NumberOfDimensions [protected] |
The number of independent dimensions in the image.
Definition at line 560 of file itkImageIOBase.h.
std::vector< double > itk::ImageIOBase::m_Origin [protected] |
The array which stores the origin of the image.
Definition at line 583 of file itkImageIOBase.h.
IOPixelType itk::ImageIOBase::m_PixelType [protected] |
Used internally to keep track of the type of the pixel.
Definition at line 538 of file itkImageIOBase.h.
std::vector< double > itk::ImageIOBase::m_Spacing [protected] |
The array which stores the spacing of pixels in the x, y, z directions.
Definition at line 580 of file itkImageIOBase.h.
std::vector< SizeType > itk::ImageIOBase::m_Strides [protected] |
Stores the number of bytes it takes to get to the next 'thing' e.g. component, pixel, row, slice, etc.
Definition at line 590 of file itkImageIOBase.h.
Definition at line 657 of file itkImageIOBase.h.
Definition at line 658 of file itkImageIOBase.h.
bool itk::ImageIOBase::m_UseCompression [protected] |
Should we compress the data?
Definition at line 563 of file itkImageIOBase.h.
bool itk::ImageIOBase::m_UseStreamedReading [protected] |
Should we use streaming for reading
Definition at line 566 of file itkImageIOBase.h.
bool itk::ImageIOBase::m_UseStreamedWriting [protected] |
Should we use streaming for writing
Definition at line 569 of file itkImageIOBase.h.