Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itk::ImageIOBase Class Reference
[Input and Output Filters]

Abstract superclass defines image IO interface. More...

#include <itkImageIOBase.h>

Inheritance diagram for itk::ImageIOBase:

Inheritance graph
[legend]
Collaboration diagram for itk::ImageIOBase:

Collaboration graph
[legend]
List of all members.

Public Types

typedef ImageIOBase Self
typedef LightProcessObject Superclass
typedef SmartPointer< SelfPointer
enum  IOPixelType {
  UNKNOWNPIXELTYPE, SCALAR, RGB, RGBA,
  OFFSET, VECTOR, POINT, COVARIANTVECTOR,
  SYMMETRICSECONDRANKTENSOR, DIFFUSIONTENSOR3D, COMPLEX, FIXEDARRAY
}
enum  IOComponentType {
  UNKNOWNCOMPONENTTYPE, UCHAR, CHAR, USHORT,
  SHORT, UINT, INT, ULONG,
  LONG, FLOAT, DOUBLE
}
enum  FileType { ASCII, Binary, TypeNotApplicable }
enum  ByteOrder { BigEndian, LittleEndian, OrderNotApplicable }

Public Member Functions

virtual const char * GetNameOfClass () const
virtual bool SetPixelTypeInfo (const std::type_info &ptype)
std::string GetComponentTypeAsString (IOComponentType) const
std::string GetPixelTypeAsString (IOPixelType) const
std::string GetFileTypeAsString (FileType) const
std::string GetByteOrderAsString (ByteOrder) const
virtual unsigned int GetPixelStride () const
unsigned int GetImageSizeInPixels () const
unsigned int GetImageSizeInBytes () const
unsigned int GetImageSizeInComponents () const
virtual bool CanReadFile (const char *)=0
virtual bool CanStreamRead ()
virtual void ReadImageInformation ()=0
virtual void Read (void *buffer)=0
virtual bool CanWriteFile (const char *)=0
virtual bool CanStreamWrite ()
virtual void WriteImageInformation ()=0
virtual void Write (const void *buffer)=0
virtual bool SupportsDimension (unsigned long dim)
virtual void SetFileName (const char *_arg)
virtual const char * GetFileName () const
void SetNumberOfDimensions (unsigned int)
virtual unsigned int GetNumberOfDimensions ()
virtual void SetDimensions (unsigned int i, unsigned int dim)
virtual unsigned int GetDimensions (unsigned int i) const
virtual void SetOrigin (unsigned int i, double origin)
virtual double GetOrigin (unsigned int i) const
virtual void SetSpacing (unsigned int i, double spacing)
virtual double GetSpacing (unsigned int i) const
virtual void SetDirection (unsigned int i, std::vector< double > &direction)
virtual void SetDirection (unsigned int i, vnl_vector< double > &direction)
virtual std::vector< double > GetDirection (unsigned int i) const
virtual void SetIORegion (ImageIORegion _arg)
virtual ImageIORegion GetIORegion ()
virtual void SetPixelType (IOPixelType _arg)
virtual const IOPixelTypeGetPixelType ()
virtual void SetComponentType (IOComponentType _arg)
virtual const IOComponentTypeGetComponentType ()
virtual const std::type_info & GetComponentTypeInfo () const
virtual void SetNumberOfComponents (unsigned int _arg)
virtual const unsigned int & GetNumberOfComponents ()
virtual void SetUseCompression (bool _arg)
virtual const bool & GetUseCompression ()
virtual void SetFileType (FileType _arg)
virtual const FileTypeGetFileType ()
void SetFileTypeToASCII ()
void SetFileTypeToBinary ()
virtual void SetByteOrder (ByteOrder _arg)
virtual const ByteOrderGetByteOrder ()
void SetByteOrderToBigEndian ()
void SetByteOrderToLittleEndian ()

Protected Member Functions

 ImageIOBase ()
 ~ImageIOBase ()
void PrintSelf (std::ostream &os, Indent indent) const
virtual void Reset (const bool freeDynamic=true)
void Resize (const unsigned int numDimensions, const unsigned int *dimensions)
void ComputeStrides ()
virtual unsigned int GetPixelSize () const
virtual unsigned int GetComponentSize () const
unsigned int GetComponentStride () const
unsigned int GetRowStride () const
unsigned int GetSliceStride () const
void WriteBufferAsASCII (std::ostream &os, const void *buffer, IOComponentType ctype, unsigned int numComp)
void ReadBufferAsASCII (std::istream &os, void *buffer, IOComponentType ctype, unsigned int numComp)
bool ReadBufferAsBinary (std::istream &os, void *buffer, unsigned int numComp)

Protected Attributes

IOPixelType m_PixelType
IOComponentType m_ComponentType
ByteOrder m_ByteOrder
FileType m_FileType
bool m_Initialized
std::string m_FileName
unsigned int m_NumberOfComponents
unsigned int m_NumberOfDimensions
bool m_UseCompression
ImageIORegion m_IORegion
std::vector< unsigned int > m_Dimensions
std::vector< double > m_Spacing
std::vector< double > m_Origin
std::vector< std::vector<
double > > 
m_Direction
std::vector< unsigned int > m_Strides

Detailed Description

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.

See also:
ImageFileWriter

ImageFileReader

ImageSeriesWriter

ImageSeriesReader

Definition at line 58 of file itkImageIOBase.h.


Member Typedef Documentation

typedef SmartPointer<Self> itk::ImageIOBase::Pointer
 

Reimplemented from itk::LightProcessObject.

Reimplemented in itk::AnalyzeImageIO, itk::BioRadImageIO, itk::BMPImageIO, itk::Brains2MaskImageIO, itk::DicomImageIO, itk::DICOMImageIO2, itk::GDCMImageIO, itk::GE4ImageIO, itk::GE5ImageIO, itk::GEAdwImageIO, itk::GiplImageIO, itk::IPLCommonImageIO, itk::JPEGImageIO, itk::LSMImageIO, itk::MetaImageIO, itk::NiftiImageIO, itk::NrrdImageIO, itk::PNGImageIO, itk::RawImageIO< TPixel, VImageDimension >, itk::SiemensVisionImageIO, itk::StimulateImageIO, itk::TIFFImageIO, and itk::VTKImageIO.

Definition at line 64 of file itkImageIOBase.h.

Referenced by itk::ImageSeriesReader< TOutputImage >::ImageSeriesReader(), and itk::ImageFileWriter< TInputImage >::Update().

typedef ImageIOBase itk::ImageIOBase::Self
 

Standard class typedefs.

Reimplemented from itk::LightProcessObject.

Reimplemented in itk::AnalyzeImageIO, itk::BioRadImageIO, itk::BMPImageIO, itk::Brains2MaskImageIO, itk::DicomImageIO, itk::DICOMImageIO2, itk::GDCMImageIO, itk::GE4ImageIO, itk::GE5ImageIO, itk::GEAdwImageIO, itk::GiplImageIO, itk::IPLCommonImageIO, itk::JPEGImageIO, itk::LSMImageIO, itk::MetaImageIO, itk::NiftiImageIO, itk::NrrdImageIO, itk::PNGImageIO, itk::RawImageIO< TPixel, VImageDimension >, itk::SiemensVisionImageIO, itk::StimulateImageIO, itk::TIFFImageIO, and itk::VTKImageIO.

Definition at line 62 of file itkImageIOBase.h.

typedef LightProcessObject itk::ImageIOBase::Superclass
 

Reimplemented from itk::LightProcessObject.

Reimplemented in itk::AnalyzeImageIO, itk::BioRadImageIO, itk::BMPImageIO, itk::Brains2MaskImageIO, itk::DicomImageIO, itk::DICOMImageIO2, itk::GDCMImageIO, itk::GE4ImageIO, itk::GE5ImageIO, itk::GEAdwImageIO, itk::GiplImageIO, itk::IPLCommonImageIO, itk::JPEGImageIO, itk::LSMImageIO, itk::MetaImageIO, itk::NiftiImageIO, itk::NrrdImageIO, itk::PNGImageIO, itk::RawImageIO< TPixel, VImageDimension >, itk::SiemensVisionImageIO, itk::StimulateImageIO, itk::TIFFImageIO, and itk::VTKImageIO.

Definition at line 63 of file itkImageIOBase.h.


Member Enumeration Documentation

enum itk::ImageIOBase::ByteOrder
 

Enums used to specify byte order; whether Big Endian or Little Endian. Some subclasses use this, some ignore it.

Enumeration values:
BigEndian 
LittleEndian 
OrderNotApplicable 

Definition at line 189 of file itkImageIOBase.h.

enum itk::ImageIOBase::FileType
 

Enums used to specify write style: whether binary or ASCII. Some subclasses use this, some ignore it.

Enumeration values:
ASCII 
Binary 
TypeNotApplicable 

Definition at line 185 of file itkImageIOBase.h.

enum itk::ImageIOBase::IOComponentType
 

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.

Enumeration values:
UNKNOWNCOMPONENTTYPE 
UCHAR 
CHAR 
USHORT 
SHORT 
UINT 
INT 
ULONG 
LONG 
FLOAT 
DOUBLE 

Definition at line 88 of file itkImageIOBase.h.

enum itk::ImageIOBase::IOPixelType
 

Enums used to manipulate the pixel type. The pixel type provides context for automatic data conversions (for instance, RGB to SCALAR, VECTOR to SCALAR).

Enumeration values:
UNKNOWNPIXELTYPE 
SCALAR 
RGB 
RGBA 
OFFSET 
VECTOR 
POINT 
COVARIANTVECTOR 
SYMMETRICSECONDRANKTENSOR 
DIFFUSIONTENSOR3D 
COMPLEX 
FIXEDARRAY 

Definition at line 80 of file itkImageIOBase.h.


Constructor & Destructor Documentation

itk::ImageIOBase::ImageIOBase  )  [protected]
 

itk::ImageIOBase::~ImageIOBase  )  [protected]
 


Member Function Documentation

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::AnalyzeImageIO, itk::BioRadImageIO, itk::BMPImageIO, itk::Brains2MaskImageIO, itk::DICOMImageIO2, itk::GDCMImageIO, itk::GE4ImageIO, itk::GE5ImageIO, itk::GEAdwImageIO, itk::GiplImageIO, itk::IPLCommonImageIO, itk::JPEGImageIO, itk::LSMImageIO, itk::MetaImageIO, itk::NiftiImageIO, itk::NrrdImageIO, itk::PNGImageIO, itk::RawImageIO< TPixel, VImageDimension >, itk::SiemensVisionImageIO, itk::StimulateImageIO, itk::TIFFImageIO, and itk::VTKImageIO.

virtual bool itk::ImageIOBase::CanStreamRead  )  [inline, virtual]
 

Determine if the ImageIO can stream reading from this file. Default is false.

Definition at line 250 of file itkImageIOBase.h.

virtual bool itk::ImageIOBase::CanStreamWrite  )  [inline, virtual]
 

Determine if the ImageIO can stream writing to this file. Default is false.

Definition at line 268 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::AnalyzeImageIO, itk::BioRadImageIO, itk::BMPImageIO, itk::Brains2MaskImageIO, itk::DICOMImageIO2, itk::GDCMImageIO, itk::GiplImageIO, itk::IPLCommonImageIO, itk::JPEGImageIO, itk::LSMImageIO, itk::MetaImageIO, itk::NiftiImageIO, itk::NrrdImageIO, itk::PNGImageIO, itk::RawImageIO< TPixel, VImageDimension >, itk::StimulateImageIO, itk::TIFFImageIO, and itk::VTKImageIO.

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 const ByteOrder& itk::ImageIOBase::GetByteOrder  )  [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 [protected, 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.

unsigned int itk::ImageIOBase::GetComponentStride  )  const [protected]
 

Convenient method for accessing number of bytes to get to the next pixel component. Returns m_Strides[0].

virtual const IOComponentType& itk::ImageIOBase::GetComponentType  )  [virtual]
 

Set/Get the component type of the image. This is always a native type.

std::string itk::ImageIOBase::GetComponentTypeAsString IOComponentType   )  const
 

Convenience method returns the IOComponentType as a string. This can be used for writing output files.

virtual const std::type_info& itk::ImageIOBase::GetComponentTypeInfo  )  const [virtual]
 

Set/Get the component type of the image. This is always a native type.

Reimplemented in itk::IPLCommonImageIO.

virtual unsigned int itk::ImageIOBase::GetDimensions unsigned int  i  )  const [inline, 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.

Definition at line 102 of file itkImageIOBase.h.

virtual std::vector<double> itk::ImageIOBase::GetDirection unsigned int  i  )  const [inline, virtual]
 

Set/Get the image direction on an axis-by-axis basis. The SetDirection() method is required when writing the image.

Definition at line 124 of file itkImageIOBase.h.

virtual const char* itk::ImageIOBase::GetFileName  )  const [virtual]
 

Set/Get the name of the file to be read.

virtual const FileType& itk::ImageIOBase::GetFileType  )  [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.

unsigned int itk::ImageIOBase::GetImageSizeInBytes  )  const
 

Return the number of bytes in the image.

unsigned int itk::ImageIOBase::GetImageSizeInComponents  )  const
 

Return the number of pixels times the number of components in the image.

unsigned int itk::ImageIOBase::GetImageSizeInPixels  )  const
 

Return the number of pixels in the image.

virtual 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::AnalyzeImageIO, itk::BioRadImageIO, itk::BMPImageIO, itk::Brains2MaskImageIO, itk::DicomImageIO, itk::DICOMImageIO2, itk::GDCMImageIO, itk::GE4ImageIO, itk::GE5ImageIO, itk::GEAdwImageIO, itk::GiplImageIO, itk::IPLCommonImageIO, itk::JPEGImageIO, itk::LSMImageIO, itk::MetaImageIO, itk::NiftiImageIO, itk::NrrdImageIO, itk::PNGImageIO, itk::RawImageIO< TPixel, VImageDimension >, itk::SiemensVisionImageIO, itk::StimulateImageIO, itk::TIFFImageIO, and itk::VTKImageIO.

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  )  [virtual]
 

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 double itk::ImageIOBase::GetOrigin unsigned int  i  )  const [inline, virtual]
 

Set/Get the image origin on a axis-by-axis basis. The SetOrigin() method is required when writing the image.

Definition at line 109 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 unsigned int itk::ImageIOBase::GetPixelStride  )  const [virtual]
 

Convenient method for accessing the number of bytes to get to the next pixel. Returns m_Strides[1];

virtual const IOPixelType& itk::ImageIOBase::GetPixelType  )  [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.

std::string itk::ImageIOBase::GetPixelTypeAsString IOPixelType   )  const
 

Convenience method returns the IOPixelType as a string. This can be used for writing output files.

unsigned int itk::ImageIOBase::GetRowStride  )  const [protected]
 

Convenient method for accessing the number of bytes to get to the next row. Returns m_Strides[2].

unsigned int 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]
 

Set/Get the image spacing on an axis-by-axis basis. The SetSpacing() method is required when writing the image.

Definition at line 116 of file itkImageIOBase.h.

virtual const bool& itk::ImageIOBase::GetUseCompression  )  [virtual]
 

Set/Get a boolean to use the compression or not.

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::AnalyzeImageIO, itk::BioRadImageIO, itk::BMPImageIO, itk::Brains2MaskImageIO, itk::DICOMImageIO2, itk::GDCMImageIO, itk::GiplImageIO, itk::IPLCommonImageIO, itk::JPEGImageIO, itk::LSMImageIO, itk::MetaImageIO, itk::NiftiImageIO, itk::NrrdImageIO, itk::PNGImageIO, itk::RawImageIO< TPixel, VImageDimension >, itk::StimulateImageIO, itk::TIFFImageIO, and itk::VTKImageIO.

virtual void itk::ImageIOBase::Read void *  buffer  )  [pure virtual]
 

Reads the data from disk into the memory buffer provided.

Implemented in itk::AnalyzeImageIO, itk::BioRadImageIO, itk::BMPImageIO, itk::Brains2MaskImageIO, itk::DICOMImageIO2, itk::GDCMImageIO, itk::GiplImageIO, itk::IPLCommonImageIO, itk::JPEGImageIO, itk::LSMImageIO, itk::MetaImageIO, itk::NiftiImageIO, itk::NrrdImageIO, itk::PNGImageIO, itk::RawImageIO< TPixel, VImageDimension >, itk::StimulateImageIO, itk::TIFFImageIO, and itk::VTKImageIO.

void itk::ImageIOBase::ReadBufferAsASCII std::istream &  os,
void *  buffer,
IOComponentType  ctype,
unsigned int  numComp
[protected]
 

Convenient method to read a buffer as ASCII text.

bool itk::ImageIOBase::ReadBufferAsBinary std::istream &  os,
void *  buffer,
unsigned int  numComp
[protected]
 

Convenient method to read a buffer as binary. Return true on success.

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::AnalyzeImageIO, itk::BioRadImageIO, itk::BMPImageIO, itk::Brains2MaskImageIO, itk::DICOMImageIO2, itk::GDCMImageIO, itk::GiplImageIO, itk::IPLCommonImageIO, itk::JPEGImageIO, itk::LSMImageIO, itk::MetaImageIO, itk::NiftiImageIO, itk::NrrdImageIO, itk::PNGImageIO, itk::RawImageIO< TPixel, VImageDimension >, itk::StimulateImageIO, itk::TIFFImageIO, and itk::VTKImageIO.

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 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 214 of file itkImageIOBase.h.

void itk::ImageIOBase::SetByteOrderToLittleEndian  )  [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 216 of file itkImageIOBase.h.

virtual void itk::ImageIOBase::SetComponentType 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,
vnl_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,
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::SetFileName const char *  _arg  )  [virtual]
 

Set/Get the name of the file to be read.

virtual void itk::ImageIOBase::SetFileType 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 195 of file itkImageIOBase.h.

void itk::ImageIOBase::SetFileTypeToBinary  )  [inline]
 

These methods control whether the file is written binary or ASCII. Many file formats (i.e., subclasses) ignore this flag.

Definition at line 197 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 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.

virtual bool itk::ImageIOBase::SetPixelTypeInfo const std::type_info &  ptype  )  [virtual]
 

SetPixelTypeInfo is used by writers to convert from an ITK strongly typed pixel to a ImageIO (weaker) typed pixel. This function sets these PixelType, ComponentType, and NumberOfComponents based on RTTI type_info structure passed in. The function returns false if the pixel type is not supported.

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.

virtual void itk::ImageIOBase::SetUseCompression bool  _arg  )  [virtual]
 

Set/Get a boolean to use the compression 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::MetaImageIO, itk::NrrdImageIO, and itk::RawImageIO< TPixel, VImageDimension >.

Definition at line 286 of file itkImageIOBase.h.

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::AnalyzeImageIO, itk::BioRadImageIO, itk::BMPImageIO, itk::Brains2MaskImageIO, itk::DICOMImageIO2, itk::GDCMImageIO, itk::GiplImageIO, itk::IPLCommonImageIO, itk::JPEGImageIO, itk::LSMImageIO, itk::MetaImageIO, itk::NiftiImageIO, itk::NrrdImageIO, itk::PNGImageIO, itk::RawImageIO< TPixel, VImageDimension >, itk::StimulateImageIO, itk::TIFFImageIO, and itk::VTKImageIO.

void itk::ImageIOBase::WriteBufferAsASCII std::ostream &  os,
const void *  buffer,
IOComponentType  ctype,
unsigned int  numComp
[protected]
 

Convenient method to write a buffer as ASCII text.

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::AnalyzeImageIO, itk::BioRadImageIO, itk::BMPImageIO, itk::Brains2MaskImageIO, itk::DICOMImageIO2, itk::GDCMImageIO, itk::GiplImageIO, itk::IPLCommonImageIO, itk::JPEGImageIO, itk::LSMImageIO, itk::MetaImageIO, itk::NiftiImageIO, itk::NrrdImageIO, itk::PNGImageIO, itk::RawImageIO< TPixel, VImageDimension >, itk::StimulateImageIO, itk::TIFFImageIO, and itk::VTKImageIO.


Member Data Documentation

ByteOrder itk::ImageIOBase::m_ByteOrder [protected]
 

Big or Little Endian, and the type of the file. (May be ignored.)

Definition at line 302 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 299 of file itkImageIOBase.h.

std::vector<unsigned int> itk::ImageIOBase::m_Dimensions [protected]
 

The array which stores the number of pixels in the x, y, z directions.

Definition at line 326 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 336 of file itkImageIOBase.h.

std::string itk::ImageIOBase::m_FileName [protected]
 

Filename to read

Definition at line 309 of file itkImageIOBase.h.

FileType itk::ImageIOBase::m_FileType [protected]
 

Definition at line 303 of file itkImageIOBase.h.

bool itk::ImageIOBase::m_Initialized [protected]
 

Does the ImageIOBase object have enough info to be of use?

Definition at line 306 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 323 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 313 of file itkImageIOBase.h.

unsigned int itk::ImageIOBase::m_NumberOfDimensions [protected]
 

The number of independent dimensions in the image.

Definition at line 316 of file itkImageIOBase.h.

std::vector<double> itk::ImageIOBase::m_Origin [protected]
 

The array which stores the origin of the image.

Definition at line 333 of file itkImageIOBase.h.

IOPixelType itk::ImageIOBase::m_PixelType [protected]
 

Used internally to keep track of the type of the pixel.

Definition at line 295 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 330 of file itkImageIOBase.h.

std::vector<unsigned int> 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 340 of file itkImageIOBase.h.

bool itk::ImageIOBase::m_UseCompression [protected]
 

Should we compress the data?

Definition at line 319 of file itkImageIOBase.h.


The documentation for this class was generated from the following file:
Generated at Thu May 25 01:14:11 2006 for ITK by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2000