18 #ifndef __itkImageFileWriter_h
19 #define __itkImageFileWriter_h
20 #include "ITKIOImageBaseExport.h"
41 const char *message =
"Error in IO",
42 const char *loc =
"Unknown"):
48 const char *message =
"Error in IO",
49 const char *loc =
"Unknown"):
85 template<
typename TInputImage >
108 using Superclass::SetInput;
116 itkSetStringMacro(FileName);
117 itkGetStringMacro(FileName);
132 if ( this->m_ImageIO != io )
135 this->m_ImageIO = io;
137 m_FactorySpecifiedImageIO =
false;
149 virtual void Write(
void);
157 return m_PasteIORegion;
162 itkSetMacro(NumberOfStreamDivisions,
unsigned int);
163 itkGetConstReferenceMacro(NumberOfStreamDivisions,
unsigned int);
180 m_PasteIORegion =
ImageIORegion(TInputImage::ImageDimension);
181 m_UserSpecifiedIORegion =
false;
186 itkSetMacro(UseCompression,
bool);
187 itkGetConstReferenceMacro(UseCompression,
bool);
188 itkBooleanMacro(UseCompression);
197 itkSetMacro(UseInputMetaDataDictionary,
bool);
198 itkGetConstReferenceMacro(UseInputMetaDataDictionary,
bool);
199 itkBooleanMacro(UseInputMetaDataDictionary);
205 virtual void PrintSelf(std::ostream & os,
Indent indent)
const ITK_OVERRIDE;
208 virtual void GenerateData(
void) ITK_OVERRIDE;
212 void operator=(const Self &);
214 std::
string m_FileName;
217 bool m_UserSpecifiedImageIO;
221 unsigned int m_NumberOfStreamDivisions;
222 bool m_UserSpecifiedIORegion;
224 bool m_FactorySpecifiedImageIO;
226 bool m_UseCompression;
227 bool m_UseInputMetaDataDictionary;
233 #ifndef ITK_MANUAL_INSTANTIATION
234 #include "itkImageFileWriter.hxx"
237 #ifdef ITK_IO_FACTORY_REGISTER_MANAGER
238 #include "itkImageIOFactoryRegisterManager.h"
241 #endif // __itkImageFileWriter_h
Light weight base class for most itk classes.
SmartPointer< Self > Pointer
virtual ~ImageFileWriterException()
An ImageIORegion represents a structured region of data.
Abstract superclass defines image IO interface.
ImageFileWriterException(const std::string &file, unsigned int line, const char *message="Error in IO", const char *loc="Unknown")
InputImageType::PixelType InputImagePixelType
const ImageIORegion & GetIORegion(void) const
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
void SetImageIO(ImageIOBase *io)
InputImageType::Pointer InputImagePointer
Base exception class for IO problems during writing.
TInputImage InputImageType
SmartPointer< const Self > ConstPointer
InputImageType::RegionType InputImageRegionType
Standard exception handling object.
ImageFileWriterException(const char *file, unsigned int line, const char *message="Error in IO", const char *loc="Unknown")
virtual void Update() ITK_OVERRIDE
Writes image data to a single file.
Control indentation during Print() invocation.
virtual void UpdateLargestPossibleRegion() ITK_OVERRIDE
Writes the entire image to file.