go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
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 >:

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
 
using InputImagePixelType = typename InputImageType::PixelType
 
using OutputImagePixelType = typename OutputImageType::PixelType
 
using OutputImageRegionType = typename OutputImageType::RegionType
 
using ParameterMapType
 
using Pointer = itk::SmartPointer<Self>
 
using Self = OpenCLResampler
 
using Superclass1
 
using Superclass2 = ResamplerBase<TElastix>
 
- Public Types inherited from elastix::ResamplerBase< TElastix >
using CoordRepType = ElastixBase::CoordRepType
 
using DirectionType = typename ITKBaseType::DirectionType
 
using ElastixType
 
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 RegistrationType
 
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 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 CreateTransformParameterMap (ParameterMapType &parameterMap) const
 
ITKBaseTypeGetAsITKBaseType ()
 
const ITKBaseTypeGetAsITKBaseType () const
 
 ITK_DISALLOW_COPY_AND_MOVE (ResamplerBase)
 
 itkStaticConstMacro (ImageDimension, unsigned int, OutputImageType::ImageDimension)
 
void ResampleAndWriteResultImage (const std::string &filename, const bool showProgress)
 
void WriteToFile (std::ostream &transformationParameterInfo) const
 
- Public Member Functions inherited from elastix::BaseComponentSE< TElastix >
void AddTargetCellToIterationInfo (const char *const name)
 
const ConfigurationGetConfiguration () const
 
ElastixTypeGetElastix () const
 
auto & GetIterationInfoAt (const char *const name)
 
RegistrationTypeGetRegistration () const
 
 ITK_DISALLOW_COPY_AND_MOVE (BaseComponentSE)
 
void RemoveTargetCellFromIterationInfo (const char *const name)
 
void SetConfiguration (const Configuration *_arg)
 
void SetElastix (ElastixType *_arg)
 
- Public Member Functions inherited from elastix::BaseComponent
virtual void AfterEachIteration ()
 
virtual void AfterEachResolution ()
 
virtual void AfterRegistration ()
 
virtual int BeforeAll ()
 
virtual int BeforeAllBase ()
 
virtual void BeforeEachResolution ()
 
virtual void BeforeEachResolutionBase ()
 
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
 
using GPUExplicitInterpolatorPointer = typename InterpolateCopierType::GPUExplicitInterpolatorPointer
 
using GPUTransformPointer = typename TransformCopierType::GPUComboTransformPointer
 
using InterpolateCopierPointer = typename InterpolateCopierType::Pointer
 
using InterpolateCopierType
 
using InterpolateImageFunctionType
 
using InterpolatorCoordRepType = typename InterpolatorType::CoordRepType
 
using InterpolatorInputImageType = typename InterpolatorType::InputImageType
 
using InterpolatorPrecisionType = typename ResamplerBase<TElastix>::CoordRepType
 
using TransformCopierPointer = typename TransformCopierType::Pointer
 
using TransformCopierType
 

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 CreateDerivedTransformParameterMap () 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::BaseComponentSE< TElastix >
Configuration::ConstPointer m_Configuration {}
 
itk::WeakPointer< TElastix > m_Elastix {}
 
RegistrationTypem_Registration {}
 

Member Typedef Documentation

◆ AdvancedCombinationTransformType

template<class TElastix >
using elastix::OpenCLResampler< TElastix >::AdvancedCombinationTransformType
protected
Initial value:
This class combines two transforms: an 'initial transform' with a 'current transform'.

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

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

◆ 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
protected
Initial value:
A helper class which creates an GPU interpolator which is perfect copy of the CPU interpolator.

Definition at line 150 of file elxOpenCLResampler.h.

◆ InterpolateImageFunctionType

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

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

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
Initial value:
itk::ResampleImageFilter<typename ResamplerBase<TElastix>::InputImageType,
typename ElastixType::MovingImageType OutputImageType
ElastixBase::CoordRepType 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
protected
Initial value:
typename itk::GPUAdvancedCombinationTransformCopier<OpenCLImageTypes,
OpenCLImageDimentions,
float>
typename itk::AdvancedCombinationTransform< InterpolatorPrecisionType, OutputImageType::ImageDimension > AdvancedCombinationTransformType
A helper class which creates an GPU AdvancedCombinationTransform which is perfect copy of the CPU Adv...

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.

◆ CreateDerivedTransformParameterMap()

template<class TElastix >
ParameterMapType elastix::OpenCLResampler< TElastix >::CreateDerivedTransformParameterMap ( ) 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 2024-07-17 for elastix by doxygen 1.11.0 (9b424b03c9833626cd435af22a444888fbbb192d) elastix logo