open_iA 2025.6
Loading...
Searching...
No Matches
iAITKIO Namespace Reference

Support for loading and storing images via ITK's file I/O. More...

Typedefs

using ImageBaseType = itk::ImageBase<Dim>
 
using ImagePointer = ImageBaseType::Pointer
 
using ImagePtr = ImageBaseType*
 
using PixelType = itk::CommonEnums::IOPixel
 merge with defines -> DIM
 
using ScalarType = itk::CommonEnums::IOComponent
 

Functions

template<class T>
void read_image_template (QString const &f, ImagePointer &image, bool releaseFlag, iAProgress const *progress)
 
ImagePointer readFile (QString const &fileName, PixelType &pixelType, ScalarType &scalarType, bool releaseFlag, iAProgress const *progress=nullptr)
 Use ITK's file IO to read files from a given file name, returning its pixel and scalar type.
 
template<class T>
void write_image_template (bool comp, QString const &fileName, ImagePtr image, iAProgress const *progress)
 
void writeFile (QString const &fileName, ImagePtr image, ScalarType scalarType, bool useCompression=false, iAProgress const *progress=nullptr)
 Use ITK's file IO to write an image to a file.
 

Detailed Description

Support for loading and storing images via ITK's file I/O.

Typedef Documentation

◆ ImageBaseType

using iAITKIO::ImageBaseType = itk::ImageBase<Dim>

◆ ImagePointer

using iAITKIO::ImagePointer = ImageBaseType::Pointer

◆ ImagePtr

◆ PixelType

using iAITKIO::PixelType = itk::CommonEnums::IOPixel

merge with defines -> DIM

◆ ScalarType

using iAITKIO::ScalarType = itk::CommonEnums::IOComponent

Function Documentation

◆ read_image_template()

template<class T>
void iAITKIO::read_image_template ( QString const & f,
ImagePointer & image,
bool releaseFlag,
iAProgress const * progress )

◆ readFile()

iAbase_API ImagePointer iAITKIO::readFile ( QString const & fileName,
PixelType & pixelType,
ScalarType & scalarType,
bool releaseFlag,
iAProgress const * progress = nullptr )

Use ITK's file IO to read files from a given file name, returning its pixel and scalar type.

Parameters
[in]fileNamethe name of the file to read
[out]pixelTypeset to the pixel type of the file that has been read
[out]scalarTypeset to the scalar type of pixel values in the file that has been read
[in]releaseFlagwhether or not to set the release flag on the file reader
[in]progressoptional progress reporting capabilities via iAProgress

◆ write_image_template()

template<class T>
void iAITKIO::write_image_template ( bool comp,
QString const & fileName,
ImagePtr image,
iAProgress const * progress )

◆ writeFile()

iAbase_API void iAITKIO::writeFile ( QString const & fileName,
ImagePtr image,
ScalarType scalarType,
bool useCompression = false,
iAProgress const * progress = nullptr )

Use ITK's file IO to write an image to a file.

Parameters
[in]fileNamethe name of the file to write
[in]imagethe image to write
[in]scalarTypethe scalar type of pixel values in the file to write
[in]useCompressionwhether the file should be compressed (if the file type specified via extension in fileName parameter supports it)
[in]progressoptional progress reporting capabilities via iAProgress