#include <itkImageFileReader.h>
Inheritance diagram for itk::ImageFileReader< TOutputImage, ConvertPixelTraits >:
Public Types | |
typedef ImageFileReader | Self |
typedef ImageSource< TOutputImage > | Superclass |
typedef SmartPointer< Self > | Pointer |
typedef TOutputImage::SizeType | SizeType |
typedef TOutputImage::RegionType | ImageRegionType |
typedef TOutputImage::InternalPixelType | OutputImagePixelType |
Public Member Functions | |
virtual const char * | GetNameOfClass () const |
virtual void | GenerateOutputInformation (void) |
virtual void | EnlargeOutputRequestedRegion (DataObject *output) |
virtual void | SetFileName (const char *_arg) |
virtual const char * | GetFileName () const |
void | SetImageIO (ImageIOBase *imageIO) |
virtual ImageIOBase * | GetImageIO () |
Static Public Member Functions | |
Pointer | New () |
Protected Member Functions | |
ImageFileReader () | |
~ImageFileReader () | |
void | PrintSelf (std::ostream &os, Indent indent) const |
void | DoConvertBuffer (void *buffer, unsigned long numberOfPixels) |
void | TestFileExistanceAndReadability () |
virtual void | GenerateData () |
Protected Attributes | |
ImageIOBase::Pointer | m_ImageIO |
bool | m_UserSpecifiedImageIO |
std::string | m_FileName |
This source object is a general filter to read data from a variety of file formats. It works with a ImageIOBase subclass to actually do the reading of the data. Object factory machinery can be used to automatically create the ImageIOBase, or the ImageIOBase can be manually created and set. Note that this class reads data from a single file; if you wish to read data from a series of files use ImageSeriesReader.
TOutputImage is the type expected by the external users of the filter. If data stored in the file is stored in a different format then specified by TOutputImage, than this filter converts data between the file type and the external expected type. The ConvertTraits template argument is used to do the conversion.
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. Normally just setting the FileName with the appropriate suffix is enough to get the reader to instantiate the correct ImageIO and read the file properly. However, some files (like raw binary format) have no accepted suffix, so you will have to manually create the ImageIO instance of the write type.
Definition at line 89 of file itkImageFileReader.h.
|
The region of the output image. Definition at line 107 of file itkImageFileReader.h. |
|
The pixel type of the output image. Reimplemented from itk::ImageSource< TOutputImage >. Definition at line 110 of file itkImageFileReader.h. |
|
Reimplemented from itk::ImageSource< TOutputImage >. Definition at line 95 of file itkImageFileReader.h. |
|
Standard class typedefs. Reimplemented from itk::ImageSource< TOutputImage >. Definition at line 93 of file itkImageFileReader.h. |
|
The size of the output image. Definition at line 104 of file itkImageFileReader.h. |
|
Reimplemented from itk::ImageSource< TOutputImage >. Definition at line 94 of file itkImageFileReader.h. |
|
|
|
|
|
Convert a block of pixels from one type to another. |
|
Give the reader a chance to indicate that it will produce more output than it was requested to produce. ImageFileReader cannot currently read a portion of an image (since the ImageIO objects cannot read a portion of an image), so the ImageFileReader must enlarge the RequestedRegion to the size of the image on disk. Reimplemented from itk::ProcessObject. |
|
Does the real work. Reimplemented from itk::ImageSource< TOutputImage >. |
|
Prepare the allocation of the output image during the first back propagation of the pipeline. Reimplemented from itk::ProcessObject. |
|
Specify the file to read. This is forwarded to the IO instance. |
|
Set/Get the ImageIO helper class. Often this is created via the object factory mechanism that determines whether a particular ImageIO can read a certain file. This method provides a way to get the ImageIO instance that is created. Or you can directly specify the ImageIO to use to read a particular file in case the factory mechanism will not work properly (e.g., unknown or unusual extension). |
|
Run-time type information (and related methods). Reimplemented from itk::ImageSource< TOutputImage >. |
|
Method for creation through the object factory. Reimplemented from itk::Object. |
|
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::ProcessObject. |
|
Specify the file to read. This is forwarded to the IO instance. |
|
Set/Get the ImageIO helper class. Often this is created via the object factory mechanism that determines whether a particular ImageIO can read a certain file. This method provides a way to get the ImageIO instance that is created. Or you can directly specify the ImageIO to use to read a particular file in case the factory mechanism will not work properly (e.g., unknown or unusual extension). |
|
Test whether the given filename exist and it is readable, this is intended to be called before attempting to use ImageIO classes for actually reading the file. If the file doesn't exist or it is not readable, and exception with an approriate message will be thrown. |
|
The file to be read. Definition at line 162 of file itkImageFileReader.h. |
|
Definition at line 158 of file itkImageFileReader.h. |
|
Definition at line 159 of file itkImageFileReader.h. |