go home Home | Main Page | Topics | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
Loading...
Searching...
No Matches
itk::ImageFileCastWriter< TInputImage > Class Template Reference

#include <itkImageFileCastWriter.h>

Detailed Description

template<typename TInputImage>
class itk::ImageFileCastWriter< TInputImage >

Casts pixel type and writes image data.

This filter saves an image and casts the data on the fly, if necessary. This is useful in some cases, to avoid the use of a itk::CastImageFilter (to save memory for example).

Definition at line 42 of file itkImageFileCastWriter.h.

Inheritance diagram for itk::ImageFileCastWriter< TInputImage >:

Public Types

using ConstPointer = SmartPointer<const Self>
using Pointer = SmartPointer<Self>
using Self = ImageFileCastWriter
using Superclass = ImageFileWriter<TInputImage>

Public Member Functions

virtual const char * GetOutputComponentType () const
 ITK_DISALLOW_COPY_AND_MOVE (ImageFileCastWriter)
 itkOverrideGetNameOfClassMacro (ImageFileCastWriter)
 itkStaticConstMacro (InputImageDimension, unsigned int, TInputImage::ImageDimension)
virtual void SetOutputComponentType (const char *_arg)

Static Public Member Functions

static Pointer New ()

Protected Member Functions

void GenerateData () override
 ImageFileCastWriter ()=default
 ~ImageFileCastWriter () override=default

Private Member Functions

template<typename OutputComponentType>
const void * ConvertScalarImage (const DataObject &inputImage)
template<typename... TResultPixel>
const void * ConvertScalarImageAsSpecifiedByFixedWidthPixelType (const DataObject &inputImage)
template<typename TResultPixel>
bool ConvertScalarImageIfPixelTypesMatch (const DataObject &inputImage, const void *&outputDataBuffer)

Static Private Member Functions

static std::string GetDefaultOutputComponentType ()

Private Attributes

ProcessObject::Pointer m_Caster { nullptr }
std::string m_OutputComponentType { Self::GetDefaultOutputComponentType() }

Member Typedef Documentation

◆ ConstPointer

template<typename TInputImage>
using itk::ImageFileCastWriter< TInputImage >::ConstPointer = SmartPointer<const Self>

Definition at line 51 of file itkImageFileCastWriter.h.

◆ Pointer

template<typename TInputImage>
using itk::ImageFileCastWriter< TInputImage >::Pointer = SmartPointer<Self>

Definition at line 50 of file itkImageFileCastWriter.h.

◆ Self

template<typename TInputImage>
using itk::ImageFileCastWriter< TInputImage >::Self = ImageFileCastWriter

Standard class typedefs.

Definition at line 48 of file itkImageFileCastWriter.h.

◆ Superclass

template<typename TInputImage>
using itk::ImageFileCastWriter< TInputImage >::Superclass = ImageFileWriter<TInputImage>

Definition at line 49 of file itkImageFileCastWriter.h.

Constructor & Destructor Documentation

◆ ImageFileCastWriter()

template<typename TInputImage>
itk::ImageFileCastWriter< TInputImage >::ImageFileCastWriter ( )
protecteddefault

◆ ~ImageFileCastWriter()

template<typename TInputImage>
itk::ImageFileCastWriter< TInputImage >::~ImageFileCastWriter ( )
overrideprotecteddefault

Member Function Documentation

◆ ConvertScalarImage()

template<typename TInputImage>
template<typename OutputComponentType>
const void * itk::ImageFileCastWriter< TInputImage >::ConvertScalarImage ( const DataObject & inputImage)
inlineprivate

Templated function that casts the input image and returns a a pointer to the PixelBuffer. Assumes scalar singlecomponent images The buffer data is valid until this->m_Caster is destroyed or assigned a new caster. The ImageIO's PixelType is also adapted by this function

Definition at line 92 of file itkImageFileCastWriter.h.

◆ ConvertScalarImageAsSpecifiedByFixedWidthPixelType()

template<typename TInputImage>
template<typename... TResultPixel>
const void * itk::ImageFileCastWriter< TInputImage >::ConvertScalarImageAsSpecifiedByFixedWidthPixelType ( const DataObject & inputImage)
inlineprivate

Converts the specified scalar input image to the image type with OutputComponentType as pixel type.

Definition at line 135 of file itkImageFileCastWriter.h.

◆ ConvertScalarImageIfPixelTypesMatch()

template<typename TInputImage>
template<typename TResultPixel>
bool itk::ImageFileCastWriter< TInputImage >::ConvertScalarImageIfPixelTypesMatch ( const DataObject & inputImage,
const void *& outputDataBuffer )
inlineprivate

Converts the specified scalar input image to the image type with the specified pixel type, if the OutputComponentType matches the template argument TResultPixel. OutputComponentType should be of the fixed width form: "intN", "uintN", or "floatN", with 'N' specifying the number of bits, otherwise this function returns false.

Definition at line 122 of file itkImageFileCastWriter.h.

◆ GenerateData()

template<typename TInputImage>
void itk::ImageFileCastWriter< TInputImage >::GenerateData ( )
overrideprotected

Does the real work.

◆ GetDefaultOutputComponentType()

template<typename TInputImage>
std::string itk::ImageFileCastWriter< TInputImage >::GetDefaultOutputComponentType ( )
staticprivate

Determine the default outputcomponentType

◆ GetOutputComponentType()

template<typename TInputImage>
virtual const char * itk::ImageFileCastWriter< TInputImage >::GetOutputComponentType ( ) const
virtual

◆ ITK_DISALLOW_COPY_AND_MOVE()

template<typename TInputImage>
itk::ImageFileCastWriter< TInputImage >::ITK_DISALLOW_COPY_AND_MOVE ( ImageFileCastWriter< TInputImage > )

◆ itkOverrideGetNameOfClassMacro()

template<typename TInputImage>
itk::ImageFileCastWriter< TInputImage >::itkOverrideGetNameOfClassMacro ( ImageFileCastWriter< TInputImage > )

Run-time type information (and related methods).

◆ itkStaticConstMacro()

template<typename TInputImage>
itk::ImageFileCastWriter< TInputImage >::itkStaticConstMacro ( InputImageDimension ,
unsigned int ,
TInputImage::ImageDimension  )

◆ New()

template<typename TInputImage>
Pointer itk::ImageFileCastWriter< TInputImage >::New ( )
static

Method for creation through the object factory.

◆ SetOutputComponentType()

template<typename TInputImage>
virtual void itk::ImageFileCastWriter< TInputImage >::SetOutputComponentType ( const char * _arg)
virtual

Set the component type for writing to disk; default: the same as the InputImagePixelType::ComponentType. This setting is ignored when the inputImagePixelType is not a scalar

Member Data Documentation

◆ m_Caster

template<typename TInputImage>
ProcessObject::Pointer itk::ImageFileCastWriter< TInputImage >::m_Caster { nullptr }
private

Definition at line 145 of file itkImageFileCastWriter.h.

◆ m_OutputComponentType

template<typename TInputImage>
std::string itk::ImageFileCastWriter< TInputImage >::m_OutputComponentType { Self::GetDefaultOutputComponentType() }
private

Definition at line 147 of file itkImageFileCastWriter.h.



Generated on 1774142652 for elastix by doxygen 1.15.0 elastix logo