ITK
4.1.0
Insight Segmentation and Registration Toolkit
|
#include <itkImageFileWriter.h>
Public Types | |
typedef SmartPointer< const Self > | ConstPointer |
typedef InputImageType::PixelType | InputImagePixelType |
typedef InputImageType::Pointer | InputImagePointer |
typedef InputImageType::RegionType | InputImageRegionType |
typedef TInputImage | InputImageType |
typedef SmartPointer< Self > | Pointer |
typedef ImageFileWriter | Self |
typedef ProcessObject | Superclass |
Public Member Functions | |
virtual ::itk::LightObject::Pointer | CreateAnother (void) const |
virtual ImageIOBase * | GetImageIO () |
const InputImageType * | GetInput (void) |
const InputImageType * | GetInput (unsigned int idx) |
const ImageIORegion & | GetIORegion (void) const |
virtual const char * | GetNameOfClass () const |
void | SetInput (const InputImageType *input) |
void | SetIORegion (const ImageIORegion ®ion) |
virtual void | Update () |
virtual void | UpdateLargestPossibleRegion () |
virtual void | Write (void) |
virtual void | SetFileName (const char *_arg) |
virtual const char * | GetFileName () const |
void | SetImageIO (ImageIOBase *io) |
virtual void | SetNumberOfStreamDivisions (unsigned int _arg) |
virtual const unsigned int & | GetNumberOfStreamDivisions () |
virtual void | SetUseCompression (bool _arg) |
virtual const bool & | GetUseCompression () |
virtual void | UseCompressionOn () |
virtual void | UseCompressionOff () |
Static Public Member Functions | |
static Pointer | New () |
Protected Member Functions | |
void | GenerateData (void) |
Private Member Functions | |
ImageFileWriter (const Self &) | |
void | operator= (const Self &) |
Private Attributes | |
bool | m_FactorySpecifiedImageIO |
std::string | m_FileName |
ImageIOBase::Pointer | m_ImageIO |
unsigned int | m_NumberOfStreamDivisions |
ImageIORegion | m_PasteIORegion |
bool | m_UseCompression |
bool | m_UseInputMetaDataDictionary |
bool | m_UserSpecifiedImageIO |
bool | m_UserSpecifiedIORegion |
virtual void | SetUseInputMetaDataDictionary (bool _arg) |
virtual const bool & | GetUseInputMetaDataDictionary () |
virtual void | UseInputMetaDataDictionaryOn () |
virtual void | UseInputMetaDataDictionaryOff () |
ImageFileWriter () | |
~ImageFileWriter () | |
void | PrintSelf (std::ostream &os, Indent indent) const |
Writes image data to a single file.
ImageFileWriter writes its input data to a single output file. ImageFileWriter interfaces with an ImageIO class to write out the data. If you wish to write data into a series of files (e.g., a slice per file) use ImageSeriesWriter.
A pluggable factory pattern is used that allows different kinds of writers to be registered (even at run time) without having to modify the code in this class. You can either manually instantiate the ImageIO object and associate it with the ImageFileWriter, or let the class figure it out from the extension. Normally just setting the filename with a suitable suffix (".png", ".jpg", etc) and setting the input to the writer is enough to get the writer to work properly.
Definition at line 81 of file itkImageFileWriter.h.
typedef SmartPointer< const Self > itk::ImageFileWriter< TInputImage >::ConstPointer |
Reimplemented from itk::ProcessObject.
Definition at line 88 of file itkImageFileWriter.h.
typedef InputImageType::PixelType itk::ImageFileWriter< TInputImage >::InputImagePixelType |
Definition at line 100 of file itkImageFileWriter.h.
typedef InputImageType::Pointer itk::ImageFileWriter< TInputImage >::InputImagePointer |
Definition at line 98 of file itkImageFileWriter.h.
typedef InputImageType::RegionType itk::ImageFileWriter< TInputImage >::InputImageRegionType |
Definition at line 99 of file itkImageFileWriter.h.
typedef TInputImage itk::ImageFileWriter< TInputImage >::InputImageType |
Some convenient typedefs.
Definition at line 94 of file itkImageFileWriter.h.
typedef SmartPointer< Self > itk::ImageFileWriter< TInputImage >::Pointer |
Reimplemented from itk::ProcessObject.
Definition at line 87 of file itkImageFileWriter.h.
typedef ImageFileWriter itk::ImageFileWriter< TInputImage >::Self |
Standard class typedefs.
Reimplemented from itk::ProcessObject.
Definition at line 85 of file itkImageFileWriter.h.
typedef ProcessObject itk::ImageFileWriter< TInputImage >::Superclass |
Reimplemented from itk::ProcessObject.
Definition at line 86 of file itkImageFileWriter.h.
itk::ImageFileWriter< TInputImage >::ImageFileWriter | ( | ) | [protected] |
By default the MetaDataDictionary is taken from the input image and passed to the ImageIO. In some cases, however, a user may prefer to introduce her/his own MetaDataDictionary. This is often the case of the ImageSeriesWriter. This flag defined whether the MetaDataDictionary to use will be the one from the input image or the one already set in the ImageIO object.
itk::ImageFileWriter< TInputImage >::~ImageFileWriter | ( | ) | [protected] |
By default the MetaDataDictionary is taken from the input image and passed to the ImageIO. In some cases, however, a user may prefer to introduce her/his own MetaDataDictionary. This is often the case of the ImageSeriesWriter. This flag defined whether the MetaDataDictionary to use will be the one from the input image or the one already set in the ImageIO object.
itk::ImageFileWriter< TInputImage >::ImageFileWriter | ( | const Self & | ) | [private] |
virtual::itk::LightObject::Pointer itk::ImageFileWriter< TInputImage >::CreateAnother | ( | void | ) | const [virtual] |
Create an object from an instance, potentially deferring to a factory. This method allows you to create an instance of an object that is exactly the same type as the referring object. This is useful in cases where an object has been cast back to a base class.
Reimplemented from itk::Object.
void itk::ImageFileWriter< TInputImage >::GenerateData | ( | void | ) | [protected, virtual] |
Does the real work.
Reimplemented from itk::ProcessObject.
virtual const char* itk::ImageFileWriter< TInputImage >::GetFileName | ( | ) | const [virtual] |
Specify the name of the output file to write.
virtual ImageIOBase* itk::ImageFileWriter< TInputImage >::GetImageIO | ( | ) | [virtual] |
const InputImageType* itk::ImageFileWriter< TInputImage >::GetInput | ( | void | ) |
const InputImageType* itk::ImageFileWriter< TInputImage >::GetInput | ( | unsigned int | idx | ) |
const ImageIORegion& itk::ImageFileWriter< TInputImage >::GetIORegion | ( | void | ) | const [inline] |
Definition at line 151 of file itkImageFileWriter.h.
virtual const char* itk::ImageFileWriter< TInputImage >::GetNameOfClass | ( | ) | const [virtual] |
Run-time type information (and related methods).
Reimplemented from itk::ProcessObject.
virtual const unsigned int& itk::ImageFileWriter< TInputImage >::GetNumberOfStreamDivisions | ( | ) | [virtual] |
Set/Get the number of pieces to divide the input. The upstream pipeline will try to be executed this many times.
virtual const bool& itk::ImageFileWriter< TInputImage >::GetUseCompression | ( | ) | [virtual] |
Set the compression On or Off
virtual const bool& itk::ImageFileWriter< TInputImage >::GetUseInputMetaDataDictionary | ( | ) | [virtual] |
By default the MetaDataDictionary is taken from the input image and passed to the ImageIO. In some cases, however, a user may prefer to introduce her/his own MetaDataDictionary. This is often the case of the ImageSeriesWriter. This flag defined whether the MetaDataDictionary to use will be the one from the input image or the one already set in the ImageIO object.
static Pointer itk::ImageFileWriter< TInputImage >::New | ( | ) | [static] |
Method for creation through the object factory.
Reimplemented from itk::Object.
void itk::ImageFileWriter< TInputImage >::operator= | ( | const Self & | ) | [private] |
Time when GenerateOutputInformation was last called.
Reimplemented from itk::ProcessObject.
void itk::ImageFileWriter< TInputImage >::PrintSelf | ( | std::ostream & | os, |
Indent | indent | ||
) | const [protected, virtual] |
By default the MetaDataDictionary is taken from the input image and passed to the ImageIO. In some cases, however, a user may prefer to introduce her/his own MetaDataDictionary. This is often the case of the ImageSeriesWriter. This flag defined whether the MetaDataDictionary to use will be the one from the input image or the one already set in the ImageIO object.
Reimplemented from itk::ProcessObject.
virtual void itk::ImageFileWriter< TInputImage >::SetFileName | ( | const char * | _arg | ) | [virtual] |
Specify the name of the output file to write.
void itk::ImageFileWriter< TInputImage >::SetImageIO | ( | ImageIOBase * | io | ) | [inline] |
Set/Get the ImageIO helper class. Usually this is created via the object factory mechanism that determines whether a particular ImageIO can write a certain file. This method provides a way to get the ImageIO instance that is created, or one can be manually set where the IO factory mechanism may not work (for example, raw image files or image files with non-standard filename suffix's. If the user specifies the ImageIO, we assume she makes the correct choice and will allow a file to be created regardless of the file extension. If the factory has set the ImageIO, the extension must be supported by the specified ImageIO.
Definition at line 125 of file itkImageFileWriter.h.
void itk::ImageFileWriter< TInputImage >::SetInput | ( | const InputImageType * | input | ) |
void itk::ImageFileWriter< TInputImage >::SetIORegion | ( | const ImageIORegion & | region | ) |
Specify the region to write. If left NULL, then the whole image is written.
virtual void itk::ImageFileWriter< TInputImage >::SetNumberOfStreamDivisions | ( | unsigned int | _arg | ) | [virtual] |
Set/Get the number of pieces to divide the input. The upstream pipeline will try to be executed this many times.
virtual void itk::ImageFileWriter< TInputImage >::SetUseCompression | ( | bool | _arg | ) | [virtual] |
Set the compression On or Off
virtual void itk::ImageFileWriter< TInputImage >::SetUseInputMetaDataDictionary | ( | bool | _arg | ) | [virtual] |
By default the MetaDataDictionary is taken from the input image and passed to the ImageIO. In some cases, however, a user may prefer to introduce her/his own MetaDataDictionary. This is often the case of the ImageSeriesWriter. This flag defined whether the MetaDataDictionary to use will be the one from the input image or the one already set in the ImageIO object.
virtual void itk::ImageFileWriter< TInputImage >::Update | ( | void | ) | [inline, virtual] |
Aliased to the Write() method to be consistent with the rest of the pipeline.
Reimplemented from itk::ProcessObject.
Definition at line 164 of file itkImageFileWriter.h.
virtual void itk::ImageFileWriter< TInputImage >::UpdateLargestPossibleRegion | ( | ) | [inline, virtual] |
Writes the entire image to file.
Updates the pipeline, streaming it the NumberOfStreamDivisions times. Existing PasteIORegion is reset.
Reimplemented from itk::ProcessObject.
Definition at line 174 of file itkImageFileWriter.h.
virtual void itk::ImageFileWriter< TInputImage >::UseCompressionOff | ( | ) | [virtual] |
Set the compression On or Off
virtual void itk::ImageFileWriter< TInputImage >::UseCompressionOn | ( | ) | [virtual] |
Set the compression On or Off
virtual void itk::ImageFileWriter< TInputImage >::UseInputMetaDataDictionaryOff | ( | ) | [virtual] |
By default the MetaDataDictionary is taken from the input image and passed to the ImageIO. In some cases, however, a user may prefer to introduce her/his own MetaDataDictionary. This is often the case of the ImageSeriesWriter. This flag defined whether the MetaDataDictionary to use will be the one from the input image or the one already set in the ImageIO object.
virtual void itk::ImageFileWriter< TInputImage >::UseInputMetaDataDictionaryOn | ( | ) | [virtual] |
By default the MetaDataDictionary is taken from the input image and passed to the ImageIO. In some cases, however, a user may prefer to introduce her/his own MetaDataDictionary. This is often the case of the ImageSeriesWriter. This flag defined whether the MetaDataDictionary to use will be the one from the input image or the one already set in the ImageIO object.
virtual void itk::ImageFileWriter< TInputImage >::Write | ( | void | ) | [virtual] |
A special version of the Update() method for writers. It invokes start and end events and handles releasing data. It eventually calls GenerateData() which does the actual writing. Note: the write method will write data specified by the IORegion. If not set, then then the whole image is written. Note that the region will be cropped to fit the input image's LargestPossibleRegion.
bool itk::ImageFileWriter< TInputImage >::m_FactorySpecifiedImageIO [private] |
Definition at line 219 of file itkImageFileWriter.h.
std::string itk::ImageFileWriter< TInputImage >::m_FileName [private] |
Definition at line 209 of file itkImageFileWriter.h.
ImageIOBase::Pointer itk::ImageFileWriter< TInputImage >::m_ImageIO [private] |
Definition at line 211 of file itkImageFileWriter.h.
unsigned int itk::ImageFileWriter< TInputImage >::m_NumberOfStreamDivisions [private] |
Definition at line 216 of file itkImageFileWriter.h.
ImageIORegion itk::ImageFileWriter< TInputImage >::m_PasteIORegion [private] |
Definition at line 215 of file itkImageFileWriter.h.
bool itk::ImageFileWriter< TInputImage >::m_UseCompression [private] |
Definition at line 221 of file itkImageFileWriter.h.
bool itk::ImageFileWriter< TInputImage >::m_UseInputMetaDataDictionary [private] |
Definition at line 222 of file itkImageFileWriter.h.
bool itk::ImageFileWriter< TInputImage >::m_UserSpecifiedImageIO [private] |
Definition at line 212 of file itkImageFileWriter.h.
bool itk::ImageFileWriter< TInputImage >::m_UserSpecifiedIORegion [private] |
Definition at line 217 of file itkImageFileWriter.h.