#include <freImageIO.h>
Public Types | |
| typedef itk::Image < TInputPixel, iDimension > | InputImageType |
| typedef itk::Image < TOutputPixel, iDimension > | OutputImageType |
Public Member Functions | |
| virtual const char * | GetNameOfClass () const |
| const std::string | GetFileName () const |
| void | SetFileName (const std::string sFileName) |
| const bool | GetForceIsoVoxel () const |
| void | SetForceIsoVoxel (const bool bForceIsoVoxel) |
| const double | GetRescaleMinimum () const |
| void | SetRescaleMinimum (const double dRescaleMin) |
| const double | GetRescaleMaximum () const |
| void | SetRescaleMaximum (const double dRescaleMax) |
| const bool | GetRescaleImage () const |
| void | SetRescaleImage (const bool bRescaleImage) |
| void | SetInput (InputImageType *pImage) |
| void | Update () |
| ImageWriter () | |
| virtual | ~ImageWriter () |
Private Member Functions | |
| InputImageType * | ConvertImageToIsoSpacing () |
| void | Save2D () |
| void | Save3D () |
Private Attributes | |
| InputImageType * | m_Image |
| std::string | m_FileName |
| bool | m_bForceIsoVoxel |
| bool | m_bRescaleImage |
| double | m_dRescaleMin |
| double | m_dRescaleMax |
ImageWriter is used to save 2D or 3D images in an itk like style, but also takes the needs of f.r.e.e. and the specialties of different formats into account.
2D images will be saved directly by the IO classes of itk, so in this case the ImageWriter is only a layer of abstraction.
3D images will be handled different, depending on the type of files:
Definition at line 69 of file freImageIO.h.
| typedef itk::Image<TInputPixel,iDimension> FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::InputImageType |
Definition at line 72 of file freImageIO.h.
| typedef itk::Image<TOutputPixel,iDimension> FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::OutputImageType |
Definition at line 73 of file freImageIO.h.
| FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::ImageWriter | ( | ) | [inline] |
Definition at line 285 of file freImageIO.txx.
References FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::m_bForceIsoVoxel, FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::m_bRescaleImage, FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::m_dRescaleMax, FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::m_dRescaleMin, FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::m_FileName, and FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::m_Image.
| FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::~ImageWriter | ( | ) | [inline, virtual] |
Definition at line 297 of file freImageIO.txx.
| virtual const char* FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::GetNameOfClass | ( | ) | const [inline, virtual] |
Definition at line 75 of file freImageIO.h.
| ImageWriter< TInputPixel, TOutputPixel, iDimension >::InputImageType * FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::ConvertImageToIsoSpacing | ( | ) | [inline, private] |
Implementation of FREE::ImageWriter ////////////////////////////////
Definition at line 41 of file freImageIO.txx.
References FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::m_Image.
Referenced by FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::Save2D().
| void FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::Save2D | ( | ) | [inline, private] |
Definition at line 89 of file freImageIO.txx.
References catchAllNPassMacro, FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::ConvertImageToIsoSpacing(), FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::m_bForceIsoVoxel, FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::m_bRescaleImage, FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::m_dRescaleMax, FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::m_dRescaleMin, FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::m_FileName, and FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::m_Image.
Referenced by FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::Save3D(), and FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::Update().

| void FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::Save3D | ( | ) | [inline, private] |
Definition at line 140 of file freImageIO.txx.
References FREE::FileDispatch::GetExtension(), FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::m_FileName, and FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::Save2D().
Referenced by FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::Update().

| const std::string FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::GetFileName | ( | ) | const [inline] |
Function to access the member variable m_FileName. m_FileName represents the filename of the headerfile. The path must be included, the file extension may left away.
Definition at line 178 of file freImageIO.txx.
References FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::m_FileName.
| void FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::SetFileName | ( | const std::string | sFileName | ) | [inline] |
Function to access the member variable m_FileName. m_FileName represents the filename of the headerfile. The path must be included, the file extension may left away.
| [in] | sFileName | The file name of the header file. |
Definition at line 186 of file freImageIO.txx.
References FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::m_FileName.
| const bool FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::GetForceIsoVoxel | ( | ) | const [inline] |
Function to access the member variable m_bForceIsoVoxel. m_bForceIsoVoxel indicates if a loaded image will be automatically transformed into an image with iso-voxels.
Definition at line 195 of file freImageIO.txx.
References FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::m_bForceIsoVoxel.
| void FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::SetForceIsoVoxel | ( | const bool | bForceIsoVoxel | ) | [inline] |
Function to access the member variable m_bForceIsoVoxel. m_bForceIsoVoxel indicates if a loaded image will be automatically transformed into an image with iso-voxels.
| [in] | bForceIsoVoxel | Specifies if image should be converted to isovoxel. |
Definition at line 203 of file freImageIO.txx.
References FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::m_bForceIsoVoxel.
| const double FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::GetRescaleMinimum | ( | ) | const [inline] |
Function to access the member variable m_dRescaleMin. m_dRescaleMin represents the minimum of the intensity rescale filter.
Definition at line 211 of file freImageIO.txx.
References FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::m_dRescaleMin.
| void FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::SetRescaleMinimum | ( | const double | dRescaleMin | ) | [inline] |
Function to access the member variable m_dRescaleMin. m_dRescaleMin represents the minimum of the intensity rescale filter.
| [in] | dRescaleMin | The minimum of the intensity rescale filter. |
Definition at line 219 of file freImageIO.txx.
References FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::m_dRescaleMin.
| const double FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::GetRescaleMaximum | ( | ) | const [inline] |
Function to access the member variable m_dRescaleMin. m_dRescaleMax represents the minimum of the intensity rescale filter.
Definition at line 227 of file freImageIO.txx.
References FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::m_dRescaleMax.
| void FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::SetRescaleMaximum | ( | const double | dRescaleMax | ) | [inline] |
Function to access the member variable m_dRescaleMin. m_dRescaleMax represents the minimum of the intensity rescale filter.
| [in] | dRescaleMax | The minimum of the intensity rescale filter. |
Definition at line 235 of file freImageIO.txx.
References FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::m_dRescaleMax.
| const bool FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::GetRescaleImage | ( | ) | const [inline] |
Function to access the member variable m_bRescaleImage. m_bRescaleImage indicates if a loaded image should be rescaled regarding its intensities.
Definition at line 243 of file freImageIO.txx.
References FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::m_bRescaleImage.
| void FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::SetRescaleImage | ( | const bool | bRescaleImage | ) | [inline] |
Function to access the member variable m_bRescaleImage. m_bRescaleImage indicates if a loaded image should be rescaled regarding its intensities.
| [in] | bRescaleImage | Specifies if image should be converted to isovoxel. |
Definition at line 251 of file freImageIO.txx.
References FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::m_bRescaleImage.
| void FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::SetInput | ( | InputImageType * | pImage | ) | [inline] |
Function loads the image if needed and returns the data.
Definition at line 261 of file freImageIO.txx.
References FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::m_Image.
| void FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::Update | ( | ) | [inline] |
Function saves the image.
Definition at line 270 of file freImageIO.txx.
References FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::m_FileName, FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::m_Image, FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::Save2D(), FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::Save3D(), and throwExceptionMacro.

InputImageType* FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::m_Image [private] |
Pointer to the image volume to be saved.
Definition at line 76 of file freImageIO.h.
Referenced by FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::ConvertImageToIsoSpacing(), FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::ImageWriter(), FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::Save2D(), FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::SetInput(), and FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::Update().
std::string FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::m_FileName [private] |
The file name for the saved image.
Definition at line 82 of file freImageIO.h.
Referenced by FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::GetFileName(), FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::ImageWriter(), FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::Save2D(), FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::Save3D(), FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::SetFileName(), and FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::Update().
bool FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::m_bForceIsoVoxel [private] |
The image should always be resampled to isovoxel (spacing of 1 in all dimensions).
Definition at line 84 of file freImageIO.h.
Referenced by FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::GetForceIsoVoxel(), FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::ImageWriter(), FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::Save2D(), and FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::SetForceIsoVoxel().
bool FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::m_bRescaleImage [private] |
Indicates if the output image intensity should be rescaled.
Definition at line 86 of file freImageIO.h.
Referenced by FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::GetRescaleImage(), FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::ImageWriter(), FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::Save2D(), and FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::SetRescaleImage().
double FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::m_dRescaleMin [private] |
Indicates the minimum of the output.
Definition at line 88 of file freImageIO.h.
Referenced by FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::GetRescaleMinimum(), FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::ImageWriter(), FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::Save2D(), and FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::SetRescaleMinimum().
double FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::m_dRescaleMax [private] |
Indicates the maximum of the output.
Definition at line 90 of file freImageIO.h.
Referenced by FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::GetRescaleMaximum(), FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::ImageWriter(), FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::Save2D(), and FREE::ImageWriter< TInputPixel, TOutputPixel, iDimension >::SetRescaleMaximum().
1.5.3 written by Dimitri van Heesch,
© 1997-2000