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 );
};
typedef typelist::MakeTypeList< short, float >::Type OCLImageTypes;
CopierType::Pointer 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.
itkStaticConstMacro(InputSpaceDimension, unsigned int, CPUTransformType::InputSpaceDimension)

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

+ Inheritance diagram for itk::GPUTransformCopier< TTypeList, NDimensions, TTransform, TOutputTransformPrecisionType >:

Data Structures

struct  TransformSpaceDimensionToType
 

Public Types

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

Public Member Functions

virtual const char * GetClassName () const
 
virtual bool GetExplicitMode () const
 
 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 (void)
 

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 >)
 
 GPUTransformCopier (const Self &)
 
void operator= (const Self &)
 

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 >
typedef SmartPointer< const Self > itk::GPUTransformCopier< TTypeList, NDimensions, TTransform, TOutputTransformPrecisionType >::ConstPointer

Definition at line 71 of file itkGPUTransformCopier.h.

◆ CPUFixedParametersType

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

Definition at line 83 of file itkGPUTransformCopier.h.

◆ CPUParametersType

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

Definition at line 82 of file itkGPUTransformCopier.h.

◆ CPUScalarType

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

Definition at line 84 of file itkGPUTransformCopier.h.

◆ CPUTransformConstPointer

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

Definition at line 81 of file itkGPUTransformCopier.h.

◆ CPUTransformType

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

Type CPU definitions for the transform.

Definition at line 80 of file itkGPUTransformCopier.h.

◆ GPUFixedParametersType

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

Definition at line 96 of file itkGPUTransformCopier.h.

◆ GPUParametersType

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

Definition at line 95 of file itkGPUTransformCopier.h.

◆ GPUScalarType

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

Type GPU definitions for the transform.

Definition at line 91 of file itkGPUTransformCopier.h.

◆ GPUTransformPointer

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

Definition at line 94 of file itkGPUTransformCopier.h.

◆ GPUTransformType

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

Definition at line 93 of file itkGPUTransformCopier.h.

◆ Pointer

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

Definition at line 70 of file itkGPUTransformCopier.h.

◆ Self

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

Standard class typedefs.

Definition at line 68 of file itkGPUTransformCopier.h.

◆ Superclass

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

Definition at line 69 of file itkGPUTransformCopier.h.

Constructor & Destructor Documentation

◆ GPUTransformCopier() [1/2]

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

◆ GPUTransformCopier() [2/2]

template<typename TTypeList , typename NDimensions , typename TTransform , typename TOutputTransformPrecisionType >
itk::GPUTransformCopier< TTypeList, NDimensions, TTransform, TOutputTransformPrecisionType >::GPUTransformCopier ( const Self )
private

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 164 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 175 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 196 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 207 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() );

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

◆ operator=()

template<typename TTypeList , typename NDimensions , typename TTransform , typename TOutputTransformPrecisionType >
void itk::GPUTransformCopier< TTypeList, NDimensions, TTransform, TOutputTransformPrecisionType >::operator= ( const Self )
private

◆ 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 ( void  )

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 234 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 231 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 233 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 232 of file itkGPUTransformCopier.h.



Generated on 1667476801 for elastix by doxygen 1.9.4 elastix logo