ITK
4.8.0
Insight Segmentation and Registration Toolkit
|
#include <itkImageFileWriter.h>
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 85 of file itkImageFileWriter.h.
Static Public Member Functions | |
static Pointer | New () |
Static Public Member Functions inherited from itk::Object | |
static bool | GetGlobalWarningDisplay () |
static void | GlobalWarningDisplayOff () |
static void | GlobalWarningDisplayOn () |
static Pointer | New () |
static void | SetGlobalWarningDisplay (bool flag) |
Static Public Member Functions inherited from itk::LightObject | |
static void | BreakOnError () |
static Pointer | New () |
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 |
Additional Inherited Members | |
Protected Attributes inherited from itk::ProcessObject | |
TimeStamp | m_OutputInformationMTime |
bool | m_Updating |
Protected Attributes inherited from itk::LightObject | |
AtomicInt< int > | m_ReferenceCount |
typedef SmartPointer< const Self > itk::ImageFileWriter< TInputImage >::ConstPointer |
Definition at line 92 of file itkImageFileWriter.h.
typedef InputImageType::PixelType itk::ImageFileWriter< TInputImage >::InputImagePixelType |
Definition at line 104 of file itkImageFileWriter.h.
typedef InputImageType::Pointer itk::ImageFileWriter< TInputImage >::InputImagePointer |
Definition at line 102 of file itkImageFileWriter.h.
typedef InputImageType::RegionType itk::ImageFileWriter< TInputImage >::InputImageRegionType |
Definition at line 103 of file itkImageFileWriter.h.
typedef TInputImage itk::ImageFileWriter< TInputImage >::InputImageType |
Some convenient typedefs.
Definition at line 98 of file itkImageFileWriter.h.
typedef SmartPointer< Self > itk::ImageFileWriter< TInputImage >::Pointer |
Definition at line 91 of file itkImageFileWriter.h.
typedef ImageFileWriter itk::ImageFileWriter< TInputImage >::Self |
Standard class typedefs.
Definition at line 89 of file itkImageFileWriter.h.
typedef ProcessObject itk::ImageFileWriter< TInputImage >::Superclass |
Definition at line 90 of file itkImageFileWriter.h.
|
protected |
|
protected |
|
private |
|
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.
|
overrideprotectedvirtual |
Does the real work.
Reimplemented from itk::ProcessObject.
|
virtual |
Specify the name of the output file to write.
|
virtual |
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.
const InputImageType* itk::ImageFileWriter< TInputImage >::GetInput | ( | ) |
const InputImageType* itk::ImageFileWriter< TInputImage >::GetInput | ( | unsigned int | idx | ) |
|
inline |
Definition at line 154 of file itkImageFileWriter.h.
|
virtual |
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.
|
virtual |
Run-time type information (and related methods).
Reimplemented from itk::ProcessObject.
|
virtual |
Set/Get the number of pieces to divide the input. The upstream pipeline will try to be executed this many times.
|
virtual |
Set the compression On or Off
|
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 |
Method for creation through the object factory.
|
private |
|
overrideprotectedvirtual |
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.
|
virtual |
Specify the name of the output file to write.
|
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 129 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 ITK_NULLPTR, then the whole image is written.
|
virtual |
Set/Get the number of pieces to divide the input. The upstream pipeline will try to be executed this many times.
|
virtual |
Set the compression On or Off
|
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.
|
inlineoverridevirtual |
Aliased to the Write() method to be consistent with the rest of the pipeline.
Reimplemented from itk::ProcessObject.
Definition at line 167 of file itkImageFileWriter.h.
|
inlineoverridevirtual |
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 177 of file itkImageFileWriter.h.
|
virtual |
Set the compression On or Off
|
virtual |
Set the compression On or Off
|
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 |
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 |
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.
|
private |
Definition at line 223 of file itkImageFileWriter.h.
|
private |
Definition at line 213 of file itkImageFileWriter.h.
|
private |
Definition at line 215 of file itkImageFileWriter.h.
|
private |
Definition at line 220 of file itkImageFileWriter.h.
|
private |
Definition at line 219 of file itkImageFileWriter.h.
|
private |
Definition at line 225 of file itkImageFileWriter.h.
|
private |
Definition at line 226 of file itkImageFileWriter.h.
|
private |
Definition at line 216 of file itkImageFileWriter.h.
|
private |
Definition at line 221 of file itkImageFileWriter.h.