go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Private Member Functions | Private Attributes
elastix::OpenCLResampler< TElastix > Class Template Reference

#include <elxOpenCLResampler.h>

Detailed Description

template<class TElastix>
class elastix::OpenCLResampler< TElastix >

A resampler based on the itk::GPUResampleImageFilter. The parameters used in this class are:

Parameters:

Resampler: Select this resampler as follows:
(Resampler "OpenCLResampler")

Resampler: Enable the OpenCL resampler as follows:
(OpenCLResamplerUseOpenCL "true")

Author
Denis P. Shamonin and Marius Staring. Division of Image Processing, Department of Radiology, Leiden, The Netherlands
Note
This work was funded by the Netherlands Organisation for Scientific Research (NWO NRG-2010.02 and NWO 639.021.124).

Definition at line 50 of file elxOpenCLResampler.h.

Inheritance diagram for elastix::OpenCLResampler< TElastix >:
Inheritance graph
[legend]

Public Types

using ConstPointer = itk::SmartPointer< const Self >
 
using GPUInputImagePointer = typename GPUInputImageType::Pointer
 
using GPUInputImageType = itk::GPUImage< InputImagePixelType, InputImageType::ImageDimension >
 
using GPUInterpolatorPrecisionType = float
 
using GPUOutputImageType = itk::GPUImage< OutputImagePixelType, OutputImageType::ImageDimension >
 
using GPUResamplerPointer = typename GPUResamplerType::Pointer
 
using GPUResamplerType = itk::GPUResampleImageFilter< GPUInputImageType, GPUOutputImageType, GPUInterpolatorPrecisionType >
 
using InputImagePixelType = typename InputImageType::PixelType
 
using OutputImagePixelType = typename OutputImageType::PixelType
 
using OutputImageRegionType = typename OutputImageType::RegionType
 
using ParameterMapType = typename ElastixType::ParameterMapType
 
using Pointer = itk::SmartPointer< Self >
 
using Self = OpenCLResampler
 
using Superclass1 = itk::ResampleImageFilter< typename ResamplerBase< TElastix >::InputImageType, typename ResamplerBase< TElastix >::OutputImageType, typename ResamplerBase< TElastix >::CoordRepType >
 
using Superclass2 = ResamplerBase< TElastix >
 
- Public Types inherited from elastix::ResamplerBase< TElastix >
using CoordRepType = ElastixBase::CoordRepType
 
using DirectionType = typename ITKBaseType::DirectionType
 
using ElastixType = TElastix
 
using IndexType = typename ITKBaseType::IndexType
 
using InputImageType = typename ElastixType::MovingImageType
 
using InterpolatorType = typename ITKBaseType::InterpolatorType
 
using ITKBaseType = itk::ResampleImageFilter< InputImageType, OutputImageType, CoordRepType >
 
using OriginPointType = typename ITKBaseType::OriginPointType
 
using OutputImageType = typename ElastixType::MovingImageType
 
using OutputPixelType = typename ITKBaseType::PixelType
 
using ParameterMapType = typename ElastixType::ParameterMapType
 
using ProgressCommandType = elx::ProgressCommand
 
using RegistrationType = typename ElastixType::RegistrationBaseType
 
using Self = ResamplerBase
 
using SizeType = typename ITKBaseType::SizeType
 
using SpacingType = typename ITKBaseType::SpacingType
 
using Superclass = BaseComponentSE< TElastix >
 
using TransformType = typename ITKBaseType::TransformType
 
- Public Types inherited from elastix::BaseComponentSE< TElastix >
using ConfigurationPointer = Configuration::Pointer
 
using ElastixType = TElastix
 
using RegistrationType = typename ElastixType::RegistrationBaseType
 
using Self = BaseComponentSE
 
using Superclass = BaseComponent
 

Public Member Functions

void BeforeRegistration () override
 
 elxClassNameMacro ("OpenCLResampler")
 
virtual const char * GetClassName () const
 
 ITK_DISALLOW_COPY_AND_MOVE (OpenCLResampler)
 
void ReadFromFile () override
 
void SetInterpolator (InterpolatorType *_arg) override
 
void SetTransform (const TransformType *_arg) override
 
- Public Member Functions inherited from elastix::ResamplerBase< TElastix >
void AfterEachIterationBase () override
 
void AfterEachResolutionBase () override
 
void AfterRegistrationBase () override
 
virtual int BeforeAllTransformix ()
 
void BeforeRegistrationBase () override
 
virtual void CreateItkResultImage ()
 
void CreateTransformParametersMap (ParameterMapType &parameterMap) const
 
ITKBaseTypeGetAsITKBaseType ()
 
const ITKBaseTypeGetAsITKBaseType () const
 
virtual const char * GetClassName () const
 
 ITK_DISALLOW_COPY_AND_MOVE (ResamplerBase)
 
 itkStaticConstMacro (ImageDimension, unsigned int, OutputImageType::ImageDimension)
 
virtual void ReadFromFile ()
 
void ResampleAndWriteResultImage (const char *filename, const bool showProgress=true)
 
void WriteResultImage (OutputImageType *imageimage, const char *filename, const bool showProgress=true)
 
void WriteToFile (xl::xoutsimple &transformationParameterInfo) const
 
- Public Member Functions inherited from elastix::BaseComponentSE< TElastix >
void AddTargetCellToIterationInfo (const char *const name)
 
ConfigurationGetConfiguration () const
 
ElastixTypeGetElastix () const
 
xl::xoutbaseGetIterationInfoAt (const char *const name)
 
RegistrationTypeGetRegistration () const
 
 ITK_DISALLOW_COPY_AND_MOVE (BaseComponentSE)
 
int RemoveTargetCellFromIterationInfo (const char *const name)
 
void SetConfiguration (Configuration *_arg)
 
void SetElastix (ElastixType *_arg)
 
- Public Member Functions inherited from elastix::BaseComponent
virtual void AfterEachIteration ()
 
virtual void AfterEachIterationBase ()
 
virtual void AfterEachResolution ()
 
virtual void AfterEachResolutionBase ()
 
virtual void AfterRegistration ()
 
virtual void AfterRegistrationBase ()
 
virtual int BeforeAll ()
 
virtual int BeforeAllBase ()
 
virtual void BeforeEachResolution ()
 
virtual void BeforeEachResolutionBase ()
 
virtual void BeforeRegistration ()
 
virtual void BeforeRegistrationBase ()
 
virtual const char * elxGetClassName () const
 
const char * GetComponentLabel () const
 
 ITK_DISALLOW_COPY_AND_MOVE (BaseComponent)
 
 itkTypeMacroNoParent (BaseComponent)
 
void SetComponentLabel (const char *label, unsigned int idx)
 

Static Public Member Functions

static Pointer New ()
 
- Static Public Member Functions inherited from elastix::BaseComponent
template<typename TBaseComponent >
static auto AsITKBaseType (TBaseComponent *const baseComponent) -> decltype(baseComponent->GetAsITKBaseType())
 
static void InitializeElastixExecutable ()
 
static bool IsElastixLibrary ()
 

Protected Types

using AdvancedCombinationTransformType = typename itk::AdvancedCombinationTransform< InterpolatorPrecisionType, OutputImageType::ImageDimension >
 
using GPUExplicitInterpolatorPointer = typename InterpolateCopierType::GPUExplicitInterpolatorPointer
 
using GPUTransformPointer = typename TransformCopierType::GPUComboTransformPointer
 
using InterpolateCopierPointer = typename InterpolateCopierType::Pointer
 
using InterpolateCopierType = typename itk::GPUInterpolatorCopier< OpenCLImageTypes, OpenCLImageDimentions, InterpolateImageFunctionType, float >
 
using InterpolateImageFunctionType = itk::InterpolateImageFunction< InterpolatorInputImageType, InterpolatorCoordRepType >
 
using InterpolatorCoordRepType = typename InterpolatorType::CoordRepType
 
using InterpolatorInputImageType = typename InterpolatorType::InputImageType
 
using InterpolatorPrecisionType = typename ResamplerBase< TElastix >::CoordRepType
 
using TransformCopierPointer = typename TransformCopierType::Pointer
 
using TransformCopierType = typename itk::GPUAdvancedCombinationTransformCopier< OpenCLImageTypes, OpenCLImageDimentions, AdvancedCombinationTransformType, float >
 

Protected Member Functions

void BeforeGenerateData ()
 
void GenerateData () override
 
 OpenCLResampler ()
 
 ~OpenCLResampler () override=default
 
- Protected Member Functions inherited from elastix::ResamplerBase< TElastix >
 ResamplerBase ()=default
 
virtual void SetComponents ()
 
 ~ResamplerBase () override=default
 
- Protected Member Functions inherited from elastix::BaseComponentSE< TElastix >
 BaseComponentSE ()=default
 
 ~BaseComponentSE () override=default
 
- Protected Member Functions inherited from elastix::BaseComponent
 BaseComponent ()=default
 
virtual ~BaseComponent ()=default
 

Private Member Functions

ParameterMapType CreateDerivedTransformParametersMap () const override
 
void ReportToLog ()
 
void SwitchingToCPUAndReport (const bool configError)
 

Private Attributes

 elxOverrideGetSelfMacro
 
bool m_ContextCreated
 
GPUResamplerPointer m_GPUResampler
 
bool m_GPUResamplerCreated
 
bool m_GPUResamplerReady
 
InterpolateCopierPointer m_InterpolatorCopier
 
TransformCopierPointer m_TransformCopier
 
bool m_UseOpenCL
 

Additional Inherited Members

- Protected Attributes inherited from elastix::ResamplerBase< TElastix >
bool m_ShowProgress { true }
 
- Protected Attributes inherited from elastix::BaseComponentSE< TElastix >
ConfigurationPointer m_Configuration {}
 
itk::WeakPointer< TElastix > m_Elastix {}
 
RegistrationTypem_Registration {}
 

Member Typedef Documentation

◆ AdvancedCombinationTransformType

template<class TElastix >
using elastix::OpenCLResampler< TElastix >::AdvancedCombinationTransformType = typename itk::AdvancedCombinationTransform<InterpolatorPrecisionType, OutputImageType::ImageDimension>
protected

Definition at line 136 of file elxOpenCLResampler.h.

◆ ConstPointer

template<class TElastix >
using elastix::OpenCLResampler< TElastix >::ConstPointer = itk::SmartPointer<const Self>

Definition at line 67 of file elxOpenCLResampler.h.

◆ GPUExplicitInterpolatorPointer

template<class TElastix >
using elastix::OpenCLResampler< TElastix >::GPUExplicitInterpolatorPointer = typename InterpolateCopierType::GPUExplicitInterpolatorPointer
protected

Definition at line 153 of file elxOpenCLResampler.h.

◆ GPUInputImagePointer

template<class TElastix >
using elastix::OpenCLResampler< TElastix >::GPUInputImagePointer = typename GPUInputImageType::Pointer

Definition at line 94 of file elxOpenCLResampler.h.

◆ GPUInputImageType

template<class TElastix >
using elastix::OpenCLResampler< TElastix >::GPUInputImageType = itk::GPUImage<InputImagePixelType, InputImageType::ImageDimension>

GPU Typedefs for GPU image and GPU resampler.

Definition at line 93 of file elxOpenCLResampler.h.

◆ GPUInterpolatorPrecisionType

template<class TElastix >
using elastix::OpenCLResampler< TElastix >::GPUInterpolatorPrecisionType = float

Definition at line 96 of file elxOpenCLResampler.h.

◆ GPUOutputImageType

template<class TElastix >
using elastix::OpenCLResampler< TElastix >::GPUOutputImageType = itk::GPUImage<OutputImagePixelType, OutputImageType::ImageDimension>

Definition at line 95 of file elxOpenCLResampler.h.

◆ GPUResamplerPointer

template<class TElastix >
using elastix::OpenCLResampler< TElastix >::GPUResamplerPointer = typename GPUResamplerType::Pointer

Definition at line 100 of file elxOpenCLResampler.h.

◆ GPUResamplerType

Definition at line 98 of file elxOpenCLResampler.h.

◆ GPUTransformPointer

template<class TElastix >
using elastix::OpenCLResampler< TElastix >::GPUTransformPointer = typename TransformCopierType::GPUComboTransformPointer
protected

Definition at line 143 of file elxOpenCLResampler.h.

◆ InputImagePixelType

template<class TElastix >
using elastix::OpenCLResampler< TElastix >::InputImagePixelType = typename InputImageType::PixelType

Definition at line 86 of file elxOpenCLResampler.h.

◆ InterpolateCopierPointer

template<class TElastix >
using elastix::OpenCLResampler< TElastix >::InterpolateCopierPointer = typename InterpolateCopierType::Pointer
protected

Definition at line 152 of file elxOpenCLResampler.h.

◆ InterpolateCopierType

template<class TElastix >
using elastix::OpenCLResampler< TElastix >::InterpolateCopierType = typename itk::GPUInterpolatorCopier<OpenCLImageTypes, OpenCLImageDimentions, InterpolateImageFunctionType, float>
protected

Definition at line 150 of file elxOpenCLResampler.h.

◆ InterpolateImageFunctionType

template<class TElastix >
using elastix::OpenCLResampler< TElastix >::InterpolateImageFunctionType = itk::InterpolateImageFunction<InterpolatorInputImageType, InterpolatorCoordRepType>
protected

Definition at line 148 of file elxOpenCLResampler.h.

◆ InterpolatorCoordRepType

template<class TElastix >
using elastix::OpenCLResampler< TElastix >::InterpolatorCoordRepType = typename InterpolatorType::CoordRepType
protected

Definition at line 147 of file elxOpenCLResampler.h.

◆ InterpolatorInputImageType

template<class TElastix >
using elastix::OpenCLResampler< TElastix >::InterpolatorInputImageType = typename InterpolatorType::InputImageType
protected

Interpolator copier

Definition at line 146 of file elxOpenCLResampler.h.

◆ InterpolatorPrecisionType

template<class TElastix >
using elastix::OpenCLResampler< TElastix >::InterpolatorPrecisionType = typename ResamplerBase<TElastix>::CoordRepType
protected

Transform copier

Definition at line 135 of file elxOpenCLResampler.h.

◆ OutputImagePixelType

template<class TElastix >
using elastix::OpenCLResampler< TElastix >::OutputImagePixelType = typename OutputImageType::PixelType

Definition at line 89 of file elxOpenCLResampler.h.

◆ OutputImageRegionType

template<class TElastix >
using elastix::OpenCLResampler< TElastix >::OutputImageRegionType = typename OutputImageType::RegionType

Definition at line 90 of file elxOpenCLResampler.h.

◆ ParameterMapType

template<class TElastix >
using elastix::ResamplerBase< TElastix >::ParameterMapType = typename ElastixType::ParameterMapType

Typedef that is used in the elastix dll version.

Definition at line 114 of file elxResamplerBase.h.

◆ Pointer

template<class TElastix >
using elastix::OpenCLResampler< TElastix >::Pointer = itk::SmartPointer<Self>

Definition at line 66 of file elxOpenCLResampler.h.

◆ Self

template<class TElastix >
using elastix::OpenCLResampler< TElastix >::Self = OpenCLResampler

Standard ITK-stuff.

Definition at line 60 of file elxOpenCLResampler.h.

◆ Superclass1

template<class TElastix >
using elastix::OpenCLResampler< TElastix >::Superclass1 = itk::ResampleImageFilter<typename ResamplerBase<TElastix>::InputImageType, typename ResamplerBase<TElastix>::OutputImageType, typename ResamplerBase<TElastix>::CoordRepType>

Definition at line 62 of file elxOpenCLResampler.h.

◆ Superclass2

template<class TElastix >
using elastix::OpenCLResampler< TElastix >::Superclass2 = ResamplerBase<TElastix>

Definition at line 65 of file elxOpenCLResampler.h.

◆ TransformCopierPointer

template<class TElastix >
using elastix::OpenCLResampler< TElastix >::TransformCopierPointer = typename TransformCopierType::Pointer
protected

Definition at line 142 of file elxOpenCLResampler.h.

◆ TransformCopierType

template<class TElastix >
using elastix::OpenCLResampler< TElastix >::TransformCopierType = typename itk::GPUAdvancedCombinationTransformCopier<OpenCLImageTypes, OpenCLImageDimentions, AdvancedCombinationTransformType, float>
protected

Definition at line 138 of file elxOpenCLResampler.h.

Constructor & Destructor Documentation

◆ OpenCLResampler()

template<class TElastix >
elastix::OpenCLResampler< TElastix >::OpenCLResampler ( )
protected

The constructor.

◆ ~OpenCLResampler()

template<class TElastix >
elastix::OpenCLResampler< TElastix >::~OpenCLResampler ( )
overrideprotecteddefault

The destructor.

Member Function Documentation

◆ BeforeGenerateData()

template<class TElastix >
void elastix::OpenCLResampler< TElastix >::BeforeGenerateData ( )
protected

This method performs all configuration for GPU resampler.

◆ BeforeRegistration()

template<class TElastix >
void elastix::OpenCLResampler< TElastix >::BeforeRegistration ( )
overridevirtual

Do some things before registration.

Reimplemented from elastix::BaseComponent.

◆ CreateDerivedTransformParametersMap()

template<class TElastix >
ParameterMapType elastix::OpenCLResampler< TElastix >::CreateDerivedTransformParametersMap ( ) const
overrideprivatevirtual

Creates a map of the parameters specific for this (derived) resampler type.

Reimplemented from elastix::ResamplerBase< TElastix >.

◆ elxClassNameMacro()

template<class TElastix >
elastix::OpenCLResampler< TElastix >::elxClassNameMacro ( "OpenCLResampler< TElastix >"  )

Name of this class. Use this name in the parameter file to select this specific resampler.
example: (Resampler "OpenCLResampler")

◆ GenerateData()

template<class TElastix >
void elastix::OpenCLResampler< TElastix >::GenerateData ( )
overrideprotected

Executes GPU resampler.

◆ GetClassName()

template<class TElastix >
virtual const char * elastix::OpenCLResampler< TElastix >::GetClassName ( ) const
virtual

Run-time type information (and related methods).

Reimplemented from elastix::ResamplerBase< TElastix >.

◆ ITK_DISALLOW_COPY_AND_MOVE()

template<class TElastix >
elastix::OpenCLResampler< TElastix >::ITK_DISALLOW_COPY_AND_MOVE ( OpenCLResampler< TElastix >  )

◆ New()

template<class TElastix >
static Pointer elastix::OpenCLResampler< TElastix >::New ( )
static

Method for creation through the object factory.

◆ ReadFromFile()

template<class TElastix >
void elastix::OpenCLResampler< TElastix >::ReadFromFile ( )
overridevirtual

Function to read parameters from a file.

Reimplemented from elastix::ResamplerBase< TElastix >.

◆ ReportToLog()

template<class TElastix >
void elastix::OpenCLResampler< TElastix >::ReportToLog ( )
private

Helper method to report to elastix log.

◆ SetInterpolator()

template<class TElastix >
void elastix::OpenCLResampler< TElastix >::SetInterpolator ( InterpolatorType _arg)
override

Set the interpolator.

◆ SetTransform()

template<class TElastix >
void elastix::OpenCLResampler< TElastix >::SetTransform ( const TransformType _arg)
override

Set the transform.

◆ SwitchingToCPUAndReport()

template<class TElastix >
void elastix::OpenCLResampler< TElastix >::SwitchingToCPUAndReport ( const bool  configError)
private

Helper method to report switching to CPU mode.

Field Documentation

◆ elxOverrideGetSelfMacro

template<class TElastix >
elastix::OpenCLResampler< TElastix >::elxOverrideGetSelfMacro
private

Definition at line 156 of file elxOpenCLResampler.h.

◆ m_ContextCreated

template<class TElastix >
bool elastix::OpenCLResampler< TElastix >::m_ContextCreated
private

Definition at line 175 of file elxOpenCLResampler.h.

◆ m_GPUResampler

template<class TElastix >
GPUResamplerPointer elastix::OpenCLResampler< TElastix >::m_GPUResampler
private

Definition at line 172 of file elxOpenCLResampler.h.

◆ m_GPUResamplerCreated

template<class TElastix >
bool elastix::OpenCLResampler< TElastix >::m_GPUResamplerCreated
private

Definition at line 174 of file elxOpenCLResampler.h.

◆ m_GPUResamplerReady

template<class TElastix >
bool elastix::OpenCLResampler< TElastix >::m_GPUResamplerReady
private

Definition at line 173 of file elxOpenCLResampler.h.

◆ m_InterpolatorCopier

template<class TElastix >
InterpolateCopierPointer elastix::OpenCLResampler< TElastix >::m_InterpolatorCopier
private

Definition at line 171 of file elxOpenCLResampler.h.

◆ m_TransformCopier

template<class TElastix >
TransformCopierPointer elastix::OpenCLResampler< TElastix >::m_TransformCopier
private

Definition at line 170 of file elxOpenCLResampler.h.

◆ m_UseOpenCL

template<class TElastix >
bool elastix::OpenCLResampler< TElastix >::m_UseOpenCL
private

Definition at line 176 of file elxOpenCLResampler.h.



Generated on 2023-01-13 for elastix by doxygen 1.9.6 elastix logo