go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
Data Structures | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
itk::GPUTransformCopier< TTypeList, NDimensions, TTransform, TOutputTransformPrecisionType > Class Template Reference

#include <itkGPUTransformCopier.h>

Detailed Description

template<typename TTypeList, typename NDimensions, typename TTransform, typename TOutputTransformPrecisionType>
class itk::GPUTransformCopier< TTypeList, NDimensions, TTransform, TOutputTransformPrecisionType >

A helper class which creates an GPU transform which is perfect copy of the CPU transform.

This class is NOT a filter. Although it has an API similar to a filter, this class is not intended to be used in a pipeline. Instead, the typical use will be like it is illustrated in the following code:

struct OCLImageDims
{
itkStaticConstMacro( Support1D, bool, true );
itkStaticConstMacro( Support2D, bool, true );
itkStaticConstMacro( Support3D, bool, true );
};
using OCLImageTypes = typelist::MakeTypeList< short, float >::Type;
auto copier = CopierType::New();
copier->SetInputTransform(CPUTransform);
copier->Update();
TransformType::Pointer GPUTransform = copier->GetModifiableOutput();
A helper class which creates an GPU transform which is perfect copy of the CPU transform.

Note that the Update() method must be called explicitly in the filter that provides the input to the GPUTransformCopier object. This is needed because the GPUTransformCopier is not a pipeline filter.

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 62 of file itkGPUTransformCopier.h.

Inheritance diagram for itk::GPUTransformCopier< TTypeList, NDimensions, TTransform, TOutputTransformPrecisionType >:
Inheritance graph
[legend]

Data Structures

struct  TransformSpaceDimensionToType
 

Public Types

using ConstPointer = SmartPointer< const Self >
 
using CPUFixedParametersType = typename CPUTransformType::FixedParametersType
 
using CPUParametersType = typename CPUTransformType::ParametersType
 
using CPUScalarType = typename CPUTransformType::ScalarType
 
using CPUTransformConstPointer = typename CPUTransformType::ConstPointer
 
using CPUTransformType = TTransform
 
using GPUFixedParametersType = typename GPUTransformType::FixedParametersType
 
using GPUParametersType = typename GPUTransformType::ParametersType
 
using GPUScalarType = TOutputTransformPrecisionType
 
using GPUTransformPointer = typename GPUTransformType::Pointer
 
using GPUTransformType = Transform< GPUScalarType, InputSpaceDimension, OutputSpaceDimension >
 
using Pointer = SmartPointer< Self >
 
using Self = GPUTransformCopier
 
using Superclass = Object
 

Public Member Functions

virtual const char * GetClassName () const
 
virtual bool GetExplicitMode () const
 
 ITK_DISALLOW_COPY_AND_MOVE (GPUTransformCopier)
 
 itkGetModifiableObjectMacro (Output, GPUTransformType)
 
 itkStaticConstMacro (InputSpaceDimension, unsigned int, CPUTransformType::InputSpaceDimension)
 
 itkStaticConstMacro (OutputSpaceDimension, unsigned int, CPUTransformType::OutputSpaceDimension)
 
virtual void SetExplicitMode (bool _arg)
 
virtual void SetInputTransform (const CPUTransformType *_arg)
 
void Update ()
 

Static Public Member Functions

static Pointer New ()
 

Protected Member Functions

void CastCopyFixedParameters (const CPUFixedParametersType &from, GPUFixedParametersType &to)
 
void CastCopyParameters (const CPUParametersType &from, GPUParametersType &to)
 
void CastCopyTransformParameters (const CPUTransformConstPointer &fromTransform, GPUTransformPointer &toTransform)
 
bool CopyTransform (const CPUTransformConstPointer &fromTransform, GPUTransformPointer &toTransform)
 
 GPUTransformCopier ()
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
 ~GPUTransformCopier () override
 

Private Member Functions

bool CopyBSplineTransform (const CPUTransformConstPointer &fromTransform, GPUTransformPointer &toTransform)
 
template<unsigned int InputSpaceDimension>
bool CopyEuler2DTransform (const CPUTransformConstPointer &, GPUTransformPointer &, TransformSpaceDimensionToType< InputSpaceDimension >)
 
bool CopyEuler2DTransform (const CPUTransformConstPointer &fromTransform, GPUTransformPointer &toTransform, TransformSpaceDimensionToType< 2 >)
 
template<unsigned int InputSpaceDimension>
bool CopyEuler3DTransform (const CPUTransformConstPointer &, GPUTransformPointer &, TransformSpaceDimensionToType< InputSpaceDimension >)
 
bool CopyEuler3DTransform (const CPUTransformConstPointer &fromTransform, GPUTransformPointer &toTransform, TransformSpaceDimensionToType< 3 >)
 
template<unsigned int InputSpaceDimension>
bool CopySimilarity2DTransform (const CPUTransformConstPointer &, GPUTransformPointer &, TransformSpaceDimensionToType< InputSpaceDimension >)
 
bool CopySimilarity2DTransform (const CPUTransformConstPointer &fromTransform, GPUTransformPointer &toTransform, TransformSpaceDimensionToType< 2 >)
 
template<unsigned int InputSpaceDimension>
bool CopySimilarity3DTransform (const CPUTransformConstPointer &, GPUTransformPointer &, TransformSpaceDimensionToType< InputSpaceDimension >)
 
bool CopySimilarity3DTransform (const CPUTransformConstPointer &fromTransform, GPUTransformPointer &toTransform, TransformSpaceDimensionToType< 3 >)
 

Private Attributes

bool m_ExplicitMode
 
CPUTransformConstPointer m_InputTransform
 
ModifiedTimeType m_InternalTransformTime
 
GPUTransformPointer m_Output
 

Member Typedef Documentation

◆ ConstPointer

template<typename TTypeList , typename NDimensions , typename TTransform , typename TOutputTransformPrecisionType >
using itk::GPUTransformCopier< TTypeList, NDimensions, TTransform, TOutputTransformPrecisionType >::ConstPointer = SmartPointer<const Self>

Definition at line 71 of file itkGPUTransformCopier.h.

◆ CPUFixedParametersType

template<typename TTypeList , typename NDimensions , typename TTransform , typename TOutputTransformPrecisionType >
using itk::GPUTransformCopier< TTypeList, NDimensions, TTransform, TOutputTransformPrecisionType >::CPUFixedParametersType = typename CPUTransformType::FixedParametersType

Definition at line 83 of file itkGPUTransformCopier.h.

◆ CPUParametersType

template<typename TTypeList , typename NDimensions , typename TTransform , typename TOutputTransformPrecisionType >
using itk::GPUTransformCopier< TTypeList, NDimensions, TTransform, TOutputTransformPrecisionType >::CPUParametersType = typename CPUTransformType::ParametersType

Definition at line 82 of file itkGPUTransformCopier.h.

◆ CPUScalarType

template<typename TTypeList , typename NDimensions , typename TTransform , typename TOutputTransformPrecisionType >
using itk::GPUTransformCopier< TTypeList, NDimensions, TTransform, TOutputTransformPrecisionType >::CPUScalarType = typename CPUTransformType::ScalarType

Definition at line 84 of file itkGPUTransformCopier.h.

◆ CPUTransformConstPointer

template<typename TTypeList , typename NDimensions , typename TTransform , typename TOutputTransformPrecisionType >
using itk::GPUTransformCopier< TTypeList, NDimensions, TTransform, TOutputTransformPrecisionType >::CPUTransformConstPointer = typename CPUTransformType::ConstPointer

Definition at line 81 of file itkGPUTransformCopier.h.

◆ CPUTransformType

template<typename TTypeList , typename NDimensions , typename TTransform , typename TOutputTransformPrecisionType >
using itk::GPUTransformCopier< TTypeList, NDimensions, TTransform, TOutputTransformPrecisionType >::CPUTransformType = TTransform

Type CPU definitions for the transform.

Definition at line 80 of file itkGPUTransformCopier.h.

◆ GPUFixedParametersType

template<typename TTypeList , typename NDimensions , typename TTransform , typename TOutputTransformPrecisionType >
using itk::GPUTransformCopier< TTypeList, NDimensions, TTransform, TOutputTransformPrecisionType >::GPUFixedParametersType = typename GPUTransformType::FixedParametersType

Definition at line 95 of file itkGPUTransformCopier.h.

◆ GPUParametersType

template<typename TTypeList , typename NDimensions , typename TTransform , typename TOutputTransformPrecisionType >
using itk::GPUTransformCopier< TTypeList, NDimensions, TTransform, TOutputTransformPrecisionType >::GPUParametersType = typename GPUTransformType::ParametersType

Definition at line 94 of file itkGPUTransformCopier.h.

◆ GPUScalarType

template<typename TTypeList , typename NDimensions , typename TTransform , typename TOutputTransformPrecisionType >
using itk::GPUTransformCopier< TTypeList, NDimensions, TTransform, TOutputTransformPrecisionType >::GPUScalarType = TOutputTransformPrecisionType

Type GPU definitions for the transform.

Definition at line 91 of file itkGPUTransformCopier.h.

◆ GPUTransformPointer

template<typename TTypeList , typename NDimensions , typename TTransform , typename TOutputTransformPrecisionType >
using itk::GPUTransformCopier< TTypeList, NDimensions, TTransform, TOutputTransformPrecisionType >::GPUTransformPointer = typename GPUTransformType::Pointer

Definition at line 93 of file itkGPUTransformCopier.h.

◆ GPUTransformType

template<typename TTypeList , typename NDimensions , typename TTransform , typename TOutputTransformPrecisionType >
using itk::GPUTransformCopier< TTypeList, NDimensions, TTransform, TOutputTransformPrecisionType >::GPUTransformType = Transform<GPUScalarType, InputSpaceDimension, OutputSpaceDimension>

Definition at line 92 of file itkGPUTransformCopier.h.

◆ Pointer

template<typename TTypeList , typename NDimensions , typename TTransform , typename TOutputTransformPrecisionType >
using itk::GPUTransformCopier< TTypeList, NDimensions, TTransform, TOutputTransformPrecisionType >::Pointer = SmartPointer<Self>

Definition at line 70 of file itkGPUTransformCopier.h.

◆ Self

template<typename TTypeList , typename NDimensions , typename TTransform , typename TOutputTransformPrecisionType >
using itk::GPUTransformCopier< TTypeList, NDimensions, TTransform, TOutputTransformPrecisionType >::Self = GPUTransformCopier

Standard class typedefs.

Definition at line 68 of file itkGPUTransformCopier.h.

◆ Superclass

template<typename TTypeList , typename NDimensions , typename TTransform , typename TOutputTransformPrecisionType >
using itk::GPUTransformCopier< TTypeList, NDimensions, TTransform, TOutputTransformPrecisionType >::Superclass = Object

Definition at line 69 of file itkGPUTransformCopier.h.

Constructor & Destructor Documentation

◆ GPUTransformCopier()

template<typename TTypeList , typename NDimensions , typename TTransform , typename TOutputTransformPrecisionType >
itk::GPUTransformCopier< TTypeList, NDimensions, TTransform, TOutputTransformPrecisionType >::GPUTransformCopier ( )
protected

◆ ~GPUTransformCopier()

template<typename TTypeList , typename NDimensions , typename TTransform , typename TOutputTransformPrecisionType >
itk::GPUTransformCopier< TTypeList, NDimensions, TTransform, TOutputTransformPrecisionType >::~GPUTransformCopier ( )
inlineoverrideprotected

Definition at line 127 of file itkGPUTransformCopier.h.

Member Function Documentation

◆ CastCopyFixedParameters()

template<typename TTypeList , typename NDimensions , typename TTransform , typename TOutputTransformPrecisionType >
void itk::GPUTransformCopier< TTypeList, NDimensions, TTransform, TOutputTransformPrecisionType >::CastCopyFixedParameters ( const CPUFixedParametersType from,
GPUFixedParametersType to 
)
protected

Method to copy the fixed parameters.

◆ CastCopyParameters()

template<typename TTypeList , typename NDimensions , typename TTransform , typename TOutputTransformPrecisionType >
void itk::GPUTransformCopier< TTypeList, NDimensions, TTransform, TOutputTransformPrecisionType >::CastCopyParameters ( const CPUParametersType from,
GPUParametersType to 
)
protected

Method to copy the parameters.

◆ CastCopyTransformParameters()

template<typename TTypeList , typename NDimensions , typename TTransform , typename TOutputTransformPrecisionType >
void itk::GPUTransformCopier< TTypeList, NDimensions, TTransform, TOutputTransformPrecisionType >::CastCopyTransformParameters ( const CPUTransformConstPointer fromTransform,
GPUTransformPointer toTransform 
)
protected

Cast and copy the transform parameters.

◆ CopyBSplineTransform()

template<typename TTypeList , typename NDimensions , typename TTransform , typename TOutputTransformPrecisionType >
bool itk::GPUTransformCopier< TTypeList, NDimensions, TTransform, TOutputTransformPrecisionType >::CopyBSplineTransform ( const CPUTransformConstPointer fromTransform,
GPUTransformPointer toTransform 
)
private

Copy method for BSpline transform.

◆ CopyEuler2DTransform() [1/2]

template<typename TTypeList , typename NDimensions , typename TTransform , typename TOutputTransformPrecisionType >
template<unsigned int InputSpaceDimension>
bool itk::GPUTransformCopier< TTypeList, NDimensions, TTransform, TOutputTransformPrecisionType >::CopyEuler2DTransform ( const CPUTransformConstPointer ,
GPUTransformPointer ,
TransformSpaceDimensionToType< InputSpaceDimension >   
)
inlineprivate

Copy method for Euler2D transform.

Definition at line 160 of file itkGPUTransformCopier.h.

◆ CopyEuler2DTransform() [2/2]

template<typename TTypeList , typename NDimensions , typename TTransform , typename TOutputTransformPrecisionType >
bool itk::GPUTransformCopier< TTypeList, NDimensions, TTransform, TOutputTransformPrecisionType >::CopyEuler2DTransform ( const CPUTransformConstPointer fromTransform,
GPUTransformPointer toTransform,
TransformSpaceDimensionToType< 2 >   
)
private

Copy method for Euler2D transform, partial specialization.

◆ CopyEuler3DTransform() [1/2]

template<typename TTypeList , typename NDimensions , typename TTransform , typename TOutputTransformPrecisionType >
template<unsigned int InputSpaceDimension>
bool itk::GPUTransformCopier< TTypeList, NDimensions, TTransform, TOutputTransformPrecisionType >::CopyEuler3DTransform ( const CPUTransformConstPointer ,
GPUTransformPointer ,
TransformSpaceDimensionToType< InputSpaceDimension >   
)
inlineprivate

Copy method for Euler3D transform.

Definition at line 171 of file itkGPUTransformCopier.h.

◆ CopyEuler3DTransform() [2/2]

template<typename TTypeList , typename NDimensions , typename TTransform , typename TOutputTransformPrecisionType >
bool itk::GPUTransformCopier< TTypeList, NDimensions, TTransform, TOutputTransformPrecisionType >::CopyEuler3DTransform ( const CPUTransformConstPointer fromTransform,
GPUTransformPointer toTransform,
TransformSpaceDimensionToType< 3 >   
)
private

Copy method for Euler3D transform, partial specialization.

◆ CopySimilarity2DTransform() [1/2]

template<typename TTypeList , typename NDimensions , typename TTransform , typename TOutputTransformPrecisionType >
template<unsigned int InputSpaceDimension>
bool itk::GPUTransformCopier< TTypeList, NDimensions, TTransform, TOutputTransformPrecisionType >::CopySimilarity2DTransform ( const CPUTransformConstPointer ,
GPUTransformPointer ,
TransformSpaceDimensionToType< InputSpaceDimension >   
)
inlineprivate

Copy method for Similarity2D transform.

Definition at line 194 of file itkGPUTransformCopier.h.

◆ CopySimilarity2DTransform() [2/2]

template<typename TTypeList , typename NDimensions , typename TTransform , typename TOutputTransformPrecisionType >
bool itk::GPUTransformCopier< TTypeList, NDimensions, TTransform, TOutputTransformPrecisionType >::CopySimilarity2DTransform ( const CPUTransformConstPointer fromTransform,
GPUTransformPointer toTransform,
TransformSpaceDimensionToType< 2 >   
)
private

Copy method for Similarity2D transform, partial specialization.

◆ CopySimilarity3DTransform() [1/2]

template<typename TTypeList , typename NDimensions , typename TTransform , typename TOutputTransformPrecisionType >
template<unsigned int InputSpaceDimension>
bool itk::GPUTransformCopier< TTypeList, NDimensions, TTransform, TOutputTransformPrecisionType >::CopySimilarity3DTransform ( const CPUTransformConstPointer ,
GPUTransformPointer ,
TransformSpaceDimensionToType< InputSpaceDimension >   
)
inlineprivate

Copy method for Similarity3D transform.

Definition at line 205 of file itkGPUTransformCopier.h.

◆ CopySimilarity3DTransform() [2/2]

template<typename TTypeList , typename NDimensions , typename TTransform , typename TOutputTransformPrecisionType >
bool itk::GPUTransformCopier< TTypeList, NDimensions, TTransform, TOutputTransformPrecisionType >::CopySimilarity3DTransform ( const CPUTransformConstPointer fromTransform,
GPUTransformPointer toTransform,
TransformSpaceDimensionToType< 3 >   
)
private

Copy method for Similarity3D transform, partial specialization.

◆ CopyTransform()

template<typename TTypeList , typename NDimensions , typename TTransform , typename TOutputTransformPrecisionType >
bool itk::GPUTransformCopier< TTypeList, NDimensions, TTransform, TOutputTransformPrecisionType >::CopyTransform ( const CPUTransformConstPointer fromTransform,
GPUTransformPointer toTransform 
)
protected

Method to copy the transforms parameters.

◆ GetClassName()

template<typename TTypeList , typename NDimensions , typename TTransform , typename TOutputTransformPrecisionType >
virtual const char * itk::GPUTransformCopier< TTypeList, NDimensions, TTransform, TOutputTransformPrecisionType >::GetClassName ( ) const
virtual

Run-time type information (and related methods).

◆ GetExplicitMode()

template<typename TTypeList , typename NDimensions , typename TTransform , typename TOutputTransformPrecisionType >
virtual bool itk::GPUTransformCopier< TTypeList, NDimensions, TTransform, TOutputTransformPrecisionType >::GetExplicitMode ( ) const
virtual

Get/Set the explicit mode. The default is true. If the explicit mode has been set to false that means that early in the code the factories has been created. ObjectFactoryBase::RegisterFactory( GPUAffineTransformFactory::New() ); ObjectFactoryBase::RegisterFactory( GPUTranslationTransformFactory::New() ); ObjectFactoryBase::RegisterFactory( GPUBSplineTransformFactory::New() ); ObjectFactoryBase::RegisterFactory( GPUEuler3DTransformFactory::New() ); ObjectFactoryBase::RegisterFactory( GPUSimilarity3DTransformFactory::New() );

◆ ITK_DISALLOW_COPY_AND_MOVE()

template<typename TTypeList , typename NDimensions , typename TTransform , typename TOutputTransformPrecisionType >
itk::GPUTransformCopier< TTypeList, NDimensions, TTransform, TOutputTransformPrecisionType >::ITK_DISALLOW_COPY_AND_MOVE ( GPUTransformCopier< TTypeList, NDimensions, TTransform, TOutputTransformPrecisionType >  )

◆ itkGetModifiableObjectMacro()

template<typename TTypeList , typename NDimensions , typename TTransform , typename TOutputTransformPrecisionType >
itk::GPUTransformCopier< TTypeList, NDimensions, TTransform, TOutputTransformPrecisionType >::itkGetModifiableObjectMacro ( Output  ,
GPUTransformType   
)

Compute of the output transform.

◆ itkStaticConstMacro() [1/2]

template<typename TTypeList , typename NDimensions , typename TTransform , typename TOutputTransformPrecisionType >
itk::GPUTransformCopier< TTypeList, NDimensions, TTransform, TOutputTransformPrecisionType >::itkStaticConstMacro ( InputSpaceDimension  ,
unsigned int  ,
CPUTransformType::InputSpaceDimension   
)

Dimension of the domain space.

◆ itkStaticConstMacro() [2/2]

template<typename TTypeList , typename NDimensions , typename TTransform , typename TOutputTransformPrecisionType >
itk::GPUTransformCopier< TTypeList, NDimensions, TTransform, TOutputTransformPrecisionType >::itkStaticConstMacro ( OutputSpaceDimension  ,
unsigned int  ,
CPUTransformType::OutputSpaceDimension   
)

◆ New()

template<typename TTypeList , typename NDimensions , typename TTransform , typename TOutputTransformPrecisionType >
static Pointer itk::GPUTransformCopier< TTypeList, NDimensions, TTransform, TOutputTransformPrecisionType >::New ( )
static

Method for creation through the object factory.

◆ PrintSelf()

template<typename TTypeList , typename NDimensions , typename TTransform , typename TOutputTransformPrecisionType >
void itk::GPUTransformCopier< TTypeList, NDimensions, TTransform, TOutputTransformPrecisionType >::PrintSelf ( std::ostream &  os,
Indent  indent 
) const
overrideprotected

◆ SetExplicitMode()

template<typename TTypeList , typename NDimensions , typename TTransform , typename TOutputTransformPrecisionType >
virtual void itk::GPUTransformCopier< TTypeList, NDimensions, TTransform, TOutputTransformPrecisionType >::SetExplicitMode ( bool  _arg)
virtual

◆ SetInputTransform()

template<typename TTypeList , typename NDimensions , typename TTransform , typename TOutputTransformPrecisionType >
virtual void itk::GPUTransformCopier< TTypeList, NDimensions, TTransform, TOutputTransformPrecisionType >::SetInputTransform ( const CPUTransformType _arg)
virtual

Get/Set the input transform.

◆ Update()

template<typename TTypeList , typename NDimensions , typename TTransform , typename TOutputTransformPrecisionType >
void itk::GPUTransformCopier< TTypeList, NDimensions, TTransform, TOutputTransformPrecisionType >::Update ( )

Update method.

Field Documentation

◆ m_ExplicitMode

template<typename TTypeList , typename NDimensions , typename TTransform , typename TOutputTransformPrecisionType >
bool itk::GPUTransformCopier< TTypeList, NDimensions, TTransform, TOutputTransformPrecisionType >::m_ExplicitMode
private

Definition at line 229 of file itkGPUTransformCopier.h.

◆ m_InputTransform

template<typename TTypeList , typename NDimensions , typename TTransform , typename TOutputTransformPrecisionType >
CPUTransformConstPointer itk::GPUTransformCopier< TTypeList, NDimensions, TTransform, TOutputTransformPrecisionType >::m_InputTransform
private

Definition at line 226 of file itkGPUTransformCopier.h.

◆ m_InternalTransformTime

template<typename TTypeList , typename NDimensions , typename TTransform , typename TOutputTransformPrecisionType >
ModifiedTimeType itk::GPUTransformCopier< TTypeList, NDimensions, TTransform, TOutputTransformPrecisionType >::m_InternalTransformTime
private

Definition at line 228 of file itkGPUTransformCopier.h.

◆ m_Output

template<typename TTypeList , typename NDimensions , typename TTransform , typename TOutputTransformPrecisionType >
GPUTransformPointer itk::GPUTransformCopier< TTypeList, NDimensions, TTransform, TOutputTransformPrecisionType >::m_Output
private

Definition at line 227 of file itkGPUTransformCopier.h.



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