#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 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) |
| const int | GetUpperSeriesLimit () const |
| void | SetUpperSeriesLimit (const int iUpperLimit) |
| const bool | GetForceIsoVoxel () const |
| void | SetForceIsoVoxel (const bool bForceIsoVoxel) |
| OutputImageType * | GetOutput (void) |
| ImageReader () | |
| virtual | ~ImageReader () |
Static Public Member Functions | |
| static OutputImageType::Pointer | LoadImage (const std::string sFile, const bool &bRescale=false, const TOutputPixel &rescaleMin=0, const TOutputPixel &rescaleMax=255) |
Private Member Functions | |
| void | ConvertImageToIsoSpacing () |
| void | SetSpacingOfDicomSeries (const std::vector< std::string > &fileNames) |
| void | Load2D () |
| void | Load3D () |
Private Attributes | |
| OutputImageType::Pointer | m_Image |
| std::string | m_FileName |
| bool | m_bForceIsoVoxel |
| int | m_iUpperSeriesLimit |
| bool | m_bUpToDate |
| bool | m_bRescaleImage |
| double | m_dRescaleMin |
| double | m_dRescaleMax |
ImageReader is used to load 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 loaded directly by the IO classes of itk, so in this case the ImageReader is only a layer of abstraction.
3D images will be handled different, depending on the type of files:
Definition at line 184 of file freImageIO.h.
| typedef itk::Image<TInputPixel,iDimension> FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::InputImageType |
Definition at line 187 of file freImageIO.h.
| typedef itk::Image<TOutputPixel,iDimension> FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::OutputImageType |
Definition at line 188 of file freImageIO.h.
| FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::ImageReader | ( | ) | [inline] |
Definition at line 636 of file freImageIO.txx.
References FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::m_bForceIsoVoxel, FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::m_bRescaleImage, FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::m_bUpToDate, FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::m_dRescaleMax, FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::m_dRescaleMin, FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::m_FileName, and FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::m_iUpperSeriesLimit.
| FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::~ImageReader | ( | ) | [inline, virtual] |
Definition at line 649 of file freImageIO.txx.
| virtual const char* FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::GetNameOfClass | ( | ) | const [inline, virtual] |
Definition at line 190 of file freImageIO.h.
| void FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::ConvertImageToIsoSpacing | ( | ) | [inline, private] |
Implementation of FREE::ImageReader ////////////////////////////////
Definition at line 309 of file freImageIO.txx.
References FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::m_Image.
Referenced by FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::Load2D(), and FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::Load3D().
| void FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::SetSpacingOfDicomSeries | ( | const std::vector< std::string > & | fileNames | ) | [private] |
| void FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::Load2D | ( | ) | [inline, private] |
Definition at line 358 of file freImageIO.txx.
References catchAllNPassMacro, FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::ConvertImageToIsoSpacing(), FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::m_bForceIsoVoxel, FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::m_bRescaleImage, FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::m_bUpToDate, FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::m_dRescaleMax, FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::m_dRescaleMin, FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::m_FileName, and FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::m_Image.
Referenced by FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::GetOutput().

| void FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::Load3D | ( | ) | [inline, private] |
Definition at line 396 of file freImageIO.txx.
References catchAllNPassMacro, FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::ConvertImageToIsoSpacing(), FREE::FileDispatch::GetExtension(), FREE::FileDispatch::GetPath(), FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::m_bForceIsoVoxel, FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::m_bRescaleImage, FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::m_bUpToDate, FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::m_dRescaleMax, FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::m_dRescaleMin, FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::m_FileName, FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::m_Image, and FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::m_iUpperSeriesLimit.
Referenced by FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::GetOutput().

| const std::string FREE::ImageReader< 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 498 of file freImageIO.txx.
References FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::m_FileName.
| void FREE::ImageReader< 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 506 of file freImageIO.txx.
References FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::m_bUpToDate, and FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::m_FileName.
Referenced by FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::LoadImage().
| const double FREE::ImageReader< 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 518 of file freImageIO.txx.
References FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::m_dRescaleMin.
| void FREE::ImageReader< 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 526 of file freImageIO.txx.
References FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::m_bUpToDate, and FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::m_dRescaleMin.
Referenced by FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::LoadImage().
| const double FREE::ImageReader< 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 538 of file freImageIO.txx.
References FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::m_dRescaleMax.
| void FREE::ImageReader< 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 546 of file freImageIO.txx.
References FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::m_bUpToDate, and FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::m_dRescaleMax.
Referenced by FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::LoadImage().
| const bool FREE::ImageReader< 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 558 of file freImageIO.txx.
References FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::m_bRescaleImage.
| void FREE::ImageReader< 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 566 of file freImageIO.txx.
References FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::m_bRescaleImage, and FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::m_bUpToDate.
Referenced by FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::LoadImage().
| const int FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::GetUpperSeriesLimit | ( | ) | const [inline] |
Function to access the member variable m_iUpperSeriesLimit. m_iUpperSeriesLimit represents the upper limit for the series file search.
Definition at line 578 of file freImageIO.txx.
References FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::m_iUpperSeriesLimit.
| void FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::SetUpperSeriesLimit | ( | const int | iUpperLimit | ) | [inline] |
Function to access the member variable m_iUpperSeriesLimit. m_iUpperSeriesLimit represents the upper limit for the series file search.
| [in] | iUpperLimit | The upper limit of the header file. |
Definition at line 586 of file freImageIO.txx.
References FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::m_bUpToDate, and FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::m_iUpperSeriesLimit.
Referenced by FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::LoadImage().
| const bool FREE::ImageReader< 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 598 of file freImageIO.txx.
References FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::m_bForceIsoVoxel.
| void FREE::ImageReader< 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 606 of file freImageIO.txx.
References FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::m_bForceIsoVoxel, and FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::m_bUpToDate.
Referenced by FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::LoadImage().
| ImageReader< TInputPixel, TOutputPixel, iDimension >::OutputImageType * FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::GetOutput | ( | void | ) | [inline] |
Function loads the image if needed and returns the data.
Definition at line 618 of file freImageIO.txx.
References FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::Load2D(), FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::Load3D(), FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::m_bUpToDate, FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::m_Image, and throwExceptionMacro.
Referenced by FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::LoadImage().

| static OutputImageType::Pointer FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::LoadImage | ( | const std::string | sFile, | |
| const bool & | bRescale = false, |
|||
| const TOutputPixel & | rescaleMin = 0, |
|||
| const TOutputPixel & | rescaleMax = 255 | |||
| ) | [inline, static] |
Definition at line 289 of file freImageIO.h.
References FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::GetOutput(), FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::SetFileName(), FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::SetForceIsoVoxel(), FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::SetRescaleImage(), FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::SetRescaleMaximum(), FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::SetRescaleMinimum(), and FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::SetUpperSeriesLimit().

OutputImageType::Pointer FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::m_Image [private] |
Loaded Image.
Definition at line 195 of file freImageIO.h.
Referenced by FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::ConvertImageToIsoSpacing(), FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::GetOutput(), FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::Load2D(), and FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::Load3D().
std::string FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::m_FileName [private] |
The file name of the image.
Definition at line 197 of file freImageIO.h.
Referenced by FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::GetFileName(), FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::ImageReader(), FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::Load2D(), FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::Load3D(), and FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::SetFileName().
bool FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::m_bForceIsoVoxel [private] |
The image should always be resampled to isovoxel (spacing of 1 in all dimensions).
Definition at line 199 of file freImageIO.h.
Referenced by FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::GetForceIsoVoxel(), FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::ImageReader(), FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::Load2D(), FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::Load3D(), and FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::SetForceIsoVoxel().
int FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::m_iUpperSeriesLimit [private] |
The upper limit for the searching of series files in the path.
Definition at line 201 of file freImageIO.h.
Referenced by FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::GetUpperSeriesLimit(), FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::ImageReader(), FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::Load3D(), and FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::SetUpperSeriesLimit().
bool FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::m_bUpToDate [private] |
Indicates if the image data is up to date or should be read again.
Definition at line 203 of file freImageIO.h.
Referenced by FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::GetOutput(), FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::ImageReader(), FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::Load2D(), FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::Load3D(), FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::SetFileName(), FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::SetForceIsoVoxel(), FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::SetRescaleImage(), FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::SetRescaleMaximum(), FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::SetRescaleMinimum(), and FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::SetUpperSeriesLimit().
bool FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::m_bRescaleImage [private] |
Indicates if the output image intensity should be rescaled.
Definition at line 205 of file freImageIO.h.
Referenced by FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::GetRescaleImage(), FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::ImageReader(), FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::Load2D(), FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::Load3D(), and FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::SetRescaleImage().
double FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::m_dRescaleMin [private] |
Indicates the minimum of the output.
Definition at line 207 of file freImageIO.h.
Referenced by FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::GetRescaleMinimum(), FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::ImageReader(), FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::Load2D(), FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::Load3D(), and FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::SetRescaleMinimum().
double FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::m_dRescaleMax [private] |
Indicates the maximum of the output.
Definition at line 209 of file freImageIO.h.
Referenced by FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::GetRescaleMaximum(), FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::ImageReader(), FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::Load2D(), FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::Load3D(), and FREE::ImageReader< TInputPixel, TOutputPixel, iDimension >::SetRescaleMaximum().
1.5.3 written by Dimitri van Heesch,
© 1997-2000