SimpleITK  1.0.1
Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes | Friends | List of all members
itk::simple::ImageFileWriter Class Reference

Write out a SimpleITK image to the specified file location. More...

#include <sitkImageFileWriter.h>

+ Inheritance diagram for itk::simple::ImageFileWriter:
+ Collaboration diagram for itk::simple::ImageFileWriter:

Public Types

typedef NonLabelPixelIDTypeList PixelIDTypeList
 
typedef ImageFileWriter Self
 
- Public Types inherited from itk::simple::ProcessObject
typedef ProcessObject Self
 

Public Member Functions

SelfExecute (const Image &)
 
SelfExecute (const Image &, const std::string &inFileName, bool inUseCompression)
 
std::string GetFileName () const
 
virtual std::string GetName () const
 
 ImageFileWriter (void)
 
SelfSetFileName (const std::string &fileName)
 
virtual std::string ToString () const
 
SelfSetUseCompression (bool UseCompression)
 Enable compression if available for file type. More...
 
bool GetUseCompression (void) const
 Enable compression if available for file type. More...
 
SelfUseCompressionOn (void)
 Enable compression if available for file type. More...
 
SelfUseCompressionOff (void)
 Enable compression if available for file type. More...
 
SelfSetKeepOriginalImageUID (bool KeepOriginalImageUID)
 Use the original study/series/frame of reference. More...
 
bool GetKeepOriginalImageUID (void) const
 Use the original study/series/frame of reference. More...
 
SelfKeepOriginalImageUIDOn (void)
 Use the original study/series/frame of reference. More...
 
SelfKeepOriginalImageUIDOff (void)
 Use the original study/series/frame of reference. More...
 
- Public Member Functions inherited from itk::simple::ProcessObject
virtual void Abort ()
 
virtual int AddCommand (itk::simple::EventEnum event, itk::simple::Command &cmd)
 Add a Command Object to observer the event. More...
 
virtual float GetProgress () const
 An Active Measurement of the progress of execution. More...
 
virtual bool HasCommand (itk::simple::EventEnum event) const
 Query of this object has any registered commands for event. More...
 
 ProcessObject ()
 
virtual void RemoveAllCommands ()
 Remove all registered commands. More...
 
virtual ~ProcessObject ()
 
virtual void DebugOn ()
 
virtual void DebugOff ()
 
virtual bool GetDebug () const
 
virtual void SetDebug (bool debugFlag)
 
virtual void SetNumberOfThreads (unsigned int n)
 
virtual unsigned int GetNumberOfThreads () const
 

Private Types

typedef Self &(Self::* MemberFunctionType) (const Image &)
 

Private Member Functions

template<class T >
SelfExecuteInternal (const Image &)
 
itk::SmartPointer< ImageIOBaseGetImageIOBase (const std::string &fileName)
 

Private Attributes

std::string m_FileName
 
bool m_KeepOriginalImageUID
 
nsstd::auto_ptr< detail::MemberFunctionFactory< MemberFunctionType > > m_MemberFactory
 
bool m_UseCompression
 

Friends

struct detail::MemberFunctionAddressor< MemberFunctionType >
 

Additional Inherited Members

- Static Public Member Functions inherited from itk::simple::ProcessObject
static bool GetGlobalDefaultDebug ()
 
static void GlobalDefaultDebugOff ()
 
static void GlobalDefaultDebugOn ()
 
static void SetGlobalDefaultDebug (bool debugFlag)
 
static void GlobalWarningDisplayOn ()
 
static void GlobalWarningDisplayOff ()
 
static void SetGlobalWarningDisplay (bool flag)
 
static bool GetGlobalWarningDisplay ()
 
static void SetGlobalDefaultNumberOfThreads (unsigned int n)
 
static unsigned int GetGlobalDefaultNumberOfThreads ()
 
static double GetGlobalDefaultCoordinateTolerance ()
 Access the global tolerance to determine congruent spaces. More...
 
static void SetGlobalDefaultCoordinateTolerance (double)
 Access the global tolerance to determine congruent spaces. More...
 
static double GetGlobalDefaultDirectionTolerance ()
 Access the global tolerance to determine congruent spaces. More...
 
static void SetGlobalDefaultDirectionTolerance (double)
 Access the global tolerance to determine congruent spaces. More...
 
- Protected Member Functions inherited from itk::simple::ProcessObject
virtual unsigned long AddITKObserver (const itk::EventObject &, itk::Command *)
 
virtual itk::ProcessObjectGetActiveProcess ()
 
virtual void OnActiveProcessDelete ()
 
virtual void onCommandDelete (const itk::simple::Command *cmd) throw ()
 
virtual void PreUpdate (itk::ProcessObject *p)
 
virtual void RemoveITKObserver (EventCommand &e)
 
- Protected Member Functions inherited from itk::simple::NonCopyable
 NonCopyable ()
 
- Static Protected Member Functions inherited from itk::simple::ProcessObject
template<class TImageType >
static TImageType::ConstPointer CastImageToITK (const Image &img)
 
template<class TImageType >
static Image CastITKToImage (TImageType *img)
 
template<class TPixelType , unsigned int VImageDimension, unsigned int VLength, template< typename, unsigned int > class TVector>
static Image CastITKToImage (itk::Image< TVector< TPixelType, VLength >, VImageDimension > *img)
 
static const itk::EventObjectGetITKEventObject (EventEnum e)
 
template<typename T >
static std::ostream & ToStringHelper (std::ostream &os, const T &v)
 
static std::ostream & ToStringHelper (std::ostream &os, const char &v)
 
static std::ostream & ToStringHelper (std::ostream &os, const signed char &v)
 
static std::ostream & ToStringHelper (std::ostream &os, const unsigned char &v)
 

Detailed Description

Write out a SimpleITK image to the specified file location.

This writer tries to write the image out using the image's type to the location specified in FileName. If writing fails, an ITK exception is thrown.

See also
itk::simple::WriteImage for the procedural interface
Examples:
FilterProgressReporting/FilterProgressReporting.cxx, ITKIntegration/ITKIntegration.cxx, Segmentation/ConnectedThresholdImageFilter.cxx, Segmentation/NeighborhoodConnectedImageFilter.cxx, and SimpleGaussian/SimpleGaussian.cxx.

Definition at line 48 of file sitkImageFileWriter.h.

Member Typedef Documentation

typedef Self&(Self::* itk::simple::ImageFileWriter::MemberFunctionType) (const Image &)
private

Definition at line 111 of file sitkImageFileWriter.h.

Definition at line 55 of file sitkImageFileWriter.h.

Definition at line 52 of file sitkImageFileWriter.h.

Constructor & Destructor Documentation

itk::simple::ImageFileWriter::ImageFileWriter ( void  )

Member Function Documentation

Self& itk::simple::ImageFileWriter::Execute ( const Image )
Self& itk::simple::ImageFileWriter::Execute ( const Image ,
const std::string &  inFileName,
bool  inUseCompression 
)
template<class T >
Self& itk::simple::ImageFileWriter::ExecuteInternal ( const Image )
private
std::string itk::simple::ImageFileWriter::GetFileName ( ) const
itk::SmartPointer<ImageIOBase> itk::simple::ImageFileWriter::GetImageIOBase ( const std::string &  fileName)
private
bool itk::simple::ImageFileWriter::GetKeepOriginalImageUID ( void  ) const

Use the original study/series/frame of reference.

These methods Set/Get/Toggle the KeepOriginalImageUID flag which get's passed to image file's itk::ImageIO object. This is relevant only for the DICOM file format, configuring the writer to use the information in the image's meta-data dictionary or to create new study/series/frame of reference values.

virtual std::string itk::simple::ImageFileWriter::GetName ( ) const
inlinevirtual

return user readable name fo the filter

Implements itk::simple::ProcessObject.

Definition at line 63 of file sitkImageFileWriter.h.

bool itk::simple::ImageFileWriter::GetUseCompression ( void  ) const

Enable compression if available for file type.

These methods Set/Get/Toggle the UseCompression flag which get's passed to image file's itk::ImageIO object. This is only a request as not all file formats support compression.

Self& itk::simple::ImageFileWriter::KeepOriginalImageUIDOff ( void  )
inline

Use the original study/series/frame of reference.

These methods Set/Get/Toggle the KeepOriginalImageUID flag which get's passed to image file's itk::ImageIO object. This is relevant only for the DICOM file format, configuring the writer to use the information in the image's meta-data dictionary or to create new study/series/frame of reference values.

Definition at line 91 of file sitkImageFileWriter.h.

Self& itk::simple::ImageFileWriter::KeepOriginalImageUIDOn ( void  )
inline

Use the original study/series/frame of reference.

These methods Set/Get/Toggle the KeepOriginalImageUID flag which get's passed to image file's itk::ImageIO object. This is relevant only for the DICOM file format, configuring the writer to use the information in the image's meta-data dictionary or to create new study/series/frame of reference values.

Definition at line 90 of file sitkImageFileWriter.h.

Self& itk::simple::ImageFileWriter::SetFileName ( const std::string &  fileName)
Self& itk::simple::ImageFileWriter::SetKeepOriginalImageUID ( bool  KeepOriginalImageUID)

Use the original study/series/frame of reference.

These methods Set/Get/Toggle the KeepOriginalImageUID flag which get's passed to image file's itk::ImageIO object. This is relevant only for the DICOM file format, configuring the writer to use the information in the image's meta-data dictionary or to create new study/series/frame of reference values.

Self& itk::simple::ImageFileWriter::SetUseCompression ( bool  UseCompression)

Enable compression if available for file type.

These methods Set/Get/Toggle the UseCompression flag which get's passed to image file's itk::ImageIO object. This is only a request as not all file formats support compression.

virtual std::string itk::simple::ImageFileWriter::ToString ( ) const
virtual

Print ourselves to string

Reimplemented from itk::simple::ProcessObject.

Self& itk::simple::ImageFileWriter::UseCompressionOff ( void  )
inline

Enable compression if available for file type.

These methods Set/Get/Toggle the UseCompression flag which get's passed to image file's itk::ImageIO object. This is only a request as not all file formats support compression.

Definition at line 75 of file sitkImageFileWriter.h.

Self& itk::simple::ImageFileWriter::UseCompressionOn ( void  )
inline

Enable compression if available for file type.

These methods Set/Get/Toggle the UseCompression flag which get's passed to image file's itk::ImageIO object. This is only a request as not all file formats support compression.

Definition at line 74 of file sitkImageFileWriter.h.

Friends And Related Function Documentation

Definition at line 114 of file sitkImageFileWriter.h.

Member Data Documentation

std::string itk::simple::ImageFileWriter::m_FileName
private

Definition at line 107 of file sitkImageFileWriter.h.

bool itk::simple::ImageFileWriter::m_KeepOriginalImageUID
private

Definition at line 108 of file sitkImageFileWriter.h.

nsstd::auto_ptr<detail::MemberFunctionFactory<MemberFunctionType> > itk::simple::ImageFileWriter::m_MemberFactory
private

Definition at line 116 of file sitkImageFileWriter.h.

bool itk::simple::ImageFileWriter::m_UseCompression
private

Definition at line 106 of file sitkImageFileWriter.h.


The documentation for this class was generated from the following file: