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 >:

Public Types

typedef itk::SmartPointer< const SelfConstPointer
 
typedef GPUInputImageType::Pointer GPUInputImagePointer
 
typedef itk::GPUImage< InputImagePixelType, InputImageType::ImageDimension > GPUInputImageType
 
typedef float GPUInterpolatorPrecisionType
 
typedef itk::GPUImage< OutputImagePixelType, OutputImageType::ImageDimension > GPUOutputImageType
 
typedef GPUResamplerType::Pointer GPUResamplerPointer
 
typedef itk::GPUResampleImageFilter< GPUInputImageType, GPUOutputImageType, GPUInterpolatorPrecisionTypeGPUResamplerType
 
typedef InputImageType::PixelType InputImagePixelType
 
typedef Superclass1::InputImageType InputImageType
 
typedef Superclass1::InterpolatorType InterpolatorType
 
typedef OutputImageType::PixelType OutputImagePixelType
 
typedef OutputImageType::RegionType OutputImageRegionType
 
typedef Superclass1::OutputImageType OutputImageType
 
typedef itk::SmartPointer< SelfPointer
 
typedef OpenCLResampler Self
 
typedef itk::ResampleImageFilter< typename ResamplerBase< TElastix >::InputImageType, typename ResamplerBase< TElastix >::OutputImageType, typename ResamplerBase< TElastix >::CoordRepTypeSuperclass1
 
typedef ResamplerBase< TElastix > Superclass2
 
typedef Superclass1::TransformType TransformType
 
- Public Types inherited from elastix::ResamplerBase< TElastix >
typedef Superclass::ConfigurationPointer ConfigurationPointer
 
typedef Superclass::ConfigurationType ConfigurationType
 
typedef ElastixType::CoordRepType CoordRepType
 
typedef ITKBaseType::DirectionType DirectionType
 
typedef Superclass::ElastixPointer ElastixPointer
 
typedef Superclass::ElastixType ElastixType
 
typedef ITKBaseType::IndexType IndexType
 
typedef ElastixType::MovingImageType InputImageType
 
typedef ITKBaseType::InterpolatorType InterpolatorType
 
typedef itk::ResampleImageFilter< InputImageType, OutputImageType, CoordRepTypeITKBaseType
 
typedef ITKBaseType::OriginPointType OriginPointType
 
typedef ElastixType::MovingImageType OutputImageType
 
typedef ITKBaseType::PixelType OutputPixelType
 
typedef ElastixType::ParameterMapType ParameterMapType
 
typedef elx::ProgressCommand ProgressCommandType
 
typedef Superclass::RegistrationPointer RegistrationPointer
 
typedef Superclass::RegistrationType RegistrationType
 
typedef ResamplerBase Self
 
typedef ITKBaseType::SizeType SizeType
 
typedef ITKBaseType::SpacingType SpacingType
 
typedef BaseComponentSE< TElastix > Superclass
 
typedef ITKBaseType::TransformType TransformType
 
- Public Types inherited from elastix::BaseComponentSE< TElastix >
typedef Configuration::Pointer ConfigurationPointer
 
typedef Configuration ConfigurationType
 
typedef itk::WeakPointer< ElastixTypeElastixPointer
 
typedef TElastix ElastixType
 
typedef RegistrationTypeRegistrationPointer
 
typedef ElastixType::RegistrationBaseType RegistrationType
 
typedef BaseComponentSE Self
 
typedef BaseComponent Superclass
 

Public Member Functions

virtual void BeforeRegistration (void)
 
 elxClassNameMacro ("OpenCLResampler")
 
virtual const char * GetClassName () const
 
virtual void ReadFromFile (void)
 
virtual void SetInterpolator (InterpolatorType *_arg)
 
virtual void SetTransform (const TransformType *_arg)
 
virtual void WriteToFile (void) const
 
- Public Member Functions inherited from elastix::ResamplerBase< TElastix >
void AfterEachIterationBase (void) override
 
void AfterEachResolutionBase (void) override
 
void AfterRegistrationBase (void) override
 
virtual int BeforeAllTransformix (void)
 
void BeforeRegistrationBase (void) override
 
virtual void CreateItkResultImage (void)
 
virtual void CreateTransformParametersMap (ParameterMapType *paramsMap) const
 
virtual ITKBaseTypeGetAsITKBaseType (void)
 
virtual const ITKBaseTypeGetAsITKBaseType (void) const
 
virtual const char * GetClassName () const
 
 itkStaticConstMacro (ImageDimension, unsigned int, OutputImageType::ImageDimension)
 
virtual void ReadFromFile (void)
 
virtual void ResampleAndWriteResultImage (const char *filename, const bool &showProgress=true)
 
virtual void WriteResultImage (OutputImageType *imageimage, const char *filename, const bool &showProgress=true)
 
virtual void WriteToFile (void) const
 
- Public Member Functions inherited from elastix::BaseComponentSE< TElastix >
ConfigurationTypeGetConfiguration (void) const
 
ElastixTypeGetElastix (void) const
 
RegistrationPointer GetRegistration (void) const
 
 ITK_DISALLOW_COPY_AND_ASSIGN (BaseComponentSE)
 
void SetConfiguration (ConfigurationType *_arg)
 
void SetElastix (ElastixType *_arg)
 
- Public Member Functions inherited from elastix::BaseComponent
virtual void AfterEachIteration (void)
 
virtual void AfterEachIterationBase (void)
 
virtual void AfterEachResolution (void)
 
virtual void AfterEachResolutionBase (void)
 
virtual void AfterRegistration (void)
 
virtual void AfterRegistrationBase (void)
 
virtual int BeforeAll (void)
 
virtual int BeforeAllBase (void)
 
virtual void BeforeEachResolution (void)
 
virtual void BeforeEachResolutionBase (void)
 
virtual void BeforeRegistration (void)
 
virtual void BeforeRegistrationBase (void)
 
virtual const char * elxGetClassName (void) const
 
const char * GetComponentLabel (void) const
 
 ITK_DISALLOW_COPY_AND_ASSIGN (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
static std::string ConvertSecondsToDHMS (const double totalSeconds, const unsigned int precision)
 
static void InitializeElastixExecutable ()
 
static bool IsElastixLibrary ()
 

Protected Types

typedef itk::AdvancedCombinationTransform< InterpolatorPrecisionType, OutputImageType::ImageDimension > AdvancedCombinationTransformType
 
typedef InterpolateCopierType::GPUExplicitInterpolatorPointer GPUExplicitInterpolatorPointer
 
typedef TransformCopierType::GPUComboTransformPointer GPUTransformPointer
 
typedef InterpolateCopierType::Pointer InterpolateCopierPointer
 
typedef itk::GPUInterpolatorCopier< OpenCLImageTypes, OpenCLImageDimentions, InterpolateImageFunctionType, floatInterpolateCopierType
 
typedef itk::InterpolateImageFunction< InterpolatorInputImageType, InterpolatorCoordRepTypeInterpolateImageFunctionType
 
typedef InterpolatorType::CoordRepType InterpolatorCoordRepType
 
typedef InterpolatorType::InputImageType InterpolatorInputImageType
 
typedef ResamplerBase< TElastix >::CoordRepType InterpolatorPrecisionType
 
typedef TransformCopierType::Pointer TransformCopierPointer
 
typedef itk::GPUAdvancedCombinationTransformCopier< OpenCLImageTypes, OpenCLImageDimentions, AdvancedCombinationTransformType, floatTransformCopierType
 

Protected Member Functions

void BeforeGenerateData (void)
 
virtual void GenerateData (void)
 
 OpenCLResampler ()
 
virtual ~OpenCLResampler ()
 
- Protected Member Functions inherited from elastix::ResamplerBase< TElastix >
 ResamplerBase ()
 
virtual void SetComponents (void)
 
 ~ResamplerBase () override
 
- 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

 OpenCLResampler (const Self &)
 
void operator= (const Self &)
 
void ReportToLog (void)
 
void SwitchingToCPUAndReport (const bool configError)
 

Private Attributes

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
 
- Protected Attributes inherited from elastix::BaseComponentSE< TElastix >
ConfigurationPointer m_Configuration {}
 
ElastixPointer m_Elastix {}
 
RegistrationPointer m_Registration {}
 

Member Typedef Documentation

◆ AdvancedCombinationTransformType

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

Definition at line 138 of file elxOpenCLResampler.h.

◆ ConstPointer

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

Definition at line 68 of file elxOpenCLResampler.h.

◆ GPUExplicitInterpolatorPointer

template<class TElastix >
typedef InterpolateCopierType::GPUExplicitInterpolatorPointer elastix::OpenCLResampler< TElastix >::GPUExplicitInterpolatorPointer
protected

Definition at line 154 of file elxOpenCLResampler.h.

◆ GPUInputImagePointer

template<class TElastix >
typedef GPUInputImageType::Pointer elastix::OpenCLResampler< TElastix >::GPUInputImagePointer

Definition at line 96 of file elxOpenCLResampler.h.

◆ GPUInputImageType

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

GPU Typedefs for GPU image and GPU resampler.

Definition at line 95 of file elxOpenCLResampler.h.

◆ GPUInterpolatorPrecisionType

template<class TElastix >
typedef float elastix::OpenCLResampler< TElastix >::GPUInterpolatorPrecisionType

Definition at line 99 of file elxOpenCLResampler.h.

◆ GPUOutputImageType

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

Definition at line 98 of file elxOpenCLResampler.h.

◆ GPUResamplerPointer

template<class TElastix >
typedef GPUResamplerType::Pointer elastix::OpenCLResampler< TElastix >::GPUResamplerPointer

Definition at line 105 of file elxOpenCLResampler.h.

◆ GPUResamplerType

Definition at line 104 of file elxOpenCLResampler.h.

◆ GPUTransformPointer

template<class TElastix >
typedef TransformCopierType::GPUComboTransformPointer elastix::OpenCLResampler< TElastix >::GPUTransformPointer
protected

Definition at line 143 of file elxOpenCLResampler.h.

◆ InputImagePixelType

template<class TElastix >
typedef InputImageType::PixelType elastix::OpenCLResampler< TElastix >::InputImagePixelType

Definition at line 87 of file elxOpenCLResampler.h.

◆ InputImageType

template<class TElastix >
typedef Superclass1::InputImageType elastix::OpenCLResampler< TElastix >::InputImageType

Definition at line 86 of file elxOpenCLResampler.h.

◆ InterpolateCopierPointer

template<class TElastix >
typedef InterpolateCopierType::Pointer elastix::OpenCLResampler< TElastix >::InterpolateCopierPointer
protected

Definition at line 153 of file elxOpenCLResampler.h.

◆ InterpolateCopierType

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

Definition at line 152 of file elxOpenCLResampler.h.

◆ InterpolateImageFunctionType

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

Definition at line 149 of file elxOpenCLResampler.h.

◆ InterpolatorCoordRepType

template<class TElastix >
typedef InterpolatorType::CoordRepType elastix::OpenCLResampler< TElastix >::InterpolatorCoordRepType
protected

Definition at line 147 of file elxOpenCLResampler.h.

◆ InterpolatorInputImageType

template<class TElastix >
typedef InterpolatorType::InputImageType elastix::OpenCLResampler< TElastix >::InterpolatorInputImageType
protected

Interpolator copier

Definition at line 146 of file elxOpenCLResampler.h.

◆ InterpolatorPrecisionType

template<class TElastix >
typedef ResamplerBase<TElastix>::CoordRepType elastix::OpenCLResampler< TElastix >::InterpolatorPrecisionType
protected

Transform copier

Definition at line 136 of file elxOpenCLResampler.h.

◆ InterpolatorType

template<class TElastix >
typedef Superclass1::InterpolatorType elastix::OpenCLResampler< TElastix >::InterpolatorType

Typedefs inherited from the superclass.

Definition at line 83 of file elxOpenCLResampler.h.

◆ OutputImagePixelType

template<class TElastix >
typedef OutputImageType::PixelType elastix::OpenCLResampler< TElastix >::OutputImagePixelType

Definition at line 90 of file elxOpenCLResampler.h.

◆ OutputImageRegionType

template<class TElastix >
typedef OutputImageType::RegionType elastix::OpenCLResampler< TElastix >::OutputImageRegionType

Definition at line 91 of file elxOpenCLResampler.h.

◆ OutputImageType

template<class TElastix >
typedef Superclass1::OutputImageType elastix::OpenCLResampler< TElastix >::OutputImageType

Definition at line 89 of file elxOpenCLResampler.h.

◆ Pointer

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

Definition at line 67 of file elxOpenCLResampler.h.

◆ Self

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

Standard ITK-stuff.

Definition at line 60 of file elxOpenCLResampler.h.

◆ Superclass1

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

Definition at line 65 of file elxOpenCLResampler.h.

◆ Superclass2

template<class TElastix >
typedef ResamplerBase< TElastix > elastix::OpenCLResampler< TElastix >::Superclass2

Definition at line 66 of file elxOpenCLResampler.h.

◆ TransformCopierPointer

template<class TElastix >
typedef TransformCopierType::Pointer elastix::OpenCLResampler< TElastix >::TransformCopierPointer
protected

Definition at line 142 of file elxOpenCLResampler.h.

◆ TransformCopierType

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

Definition at line 141 of file elxOpenCLResampler.h.

◆ TransformType

template<class TElastix >
typedef Superclass1::TransformType elastix::OpenCLResampler< TElastix >::TransformType

Definition at line 84 of file elxOpenCLResampler.h.

Constructor & Destructor Documentation

◆ OpenCLResampler() [1/2]

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

The constructor.

◆ ~OpenCLResampler()

template<class TElastix >
virtual elastix::OpenCLResampler< TElastix >::~OpenCLResampler ( )
inlineprotectedvirtual

The destructor.

Definition at line 127 of file elxOpenCLResampler.h.

◆ OpenCLResampler() [2/2]

template<class TElastix >
elastix::OpenCLResampler< TElastix >::OpenCLResampler ( const Self )
private

The private constructor.

Member Function Documentation

◆ BeforeGenerateData()

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

This method performs all configuration for GPU resampler.

◆ BeforeRegistration()

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

Do some things before registration.

Reimplemented from elastix::BaseComponent.

◆ 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 >
virtual void elastix::OpenCLResampler< TElastix >::GenerateData ( void  )
protectedvirtual

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 >.

◆ New()

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

Method for creation through the object factory.

◆ operator=()

template<class TElastix >
void elastix::OpenCLResampler< TElastix >::operator= ( const Self )
private

The private copy constructor.

◆ ReadFromFile()

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

Function to read parameters from a file.

Reimplemented from elastix::ResamplerBase< TElastix >.

◆ ReportToLog()

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

Helper method to report to elastix log.

◆ SetInterpolator()

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

Set the interpolator.

◆ SetTransform()

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

Set the transform.

◆ SwitchingToCPUAndReport()

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

Helper method to report switching to CPU mode.

◆ WriteToFile()

template<class TElastix >
virtual void elastix::OpenCLResampler< TElastix >::WriteToFile ( void  ) const
virtual

Function to write parameters to a file.

Reimplemented from elastix::ResamplerBase< TElastix >.

Field Documentation

◆ m_ContextCreated

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

Definition at line 174 of file elxOpenCLResampler.h.

◆ m_GPUResampler

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

Definition at line 171 of file elxOpenCLResampler.h.

◆ m_GPUResamplerCreated

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

Definition at line 173 of file elxOpenCLResampler.h.

◆ m_GPUResamplerReady

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

Definition at line 172 of file elxOpenCLResampler.h.

◆ m_InterpolatorCopier

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

Definition at line 170 of file elxOpenCLResampler.h.

◆ m_TransformCopier

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

Definition at line 169 of file elxOpenCLResampler.h.

◆ m_UseOpenCL

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

Definition at line 175 of file elxOpenCLResampler.h.



Generated on 1667476801 for elastix by doxygen 1.9.4 elastix logo