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 );
};
CopierType::Pointer copier = CopierType::New();
copier->SetInputTransform(CPUTransform);
copier->Update();
TransformType::Pointer GPUTransform = copier->GetModifiableOutput();

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 >:
Inheritance graph
[legend]

Data Structures

struct  TransformSpaceDimensionToType
 

Public Types

typedef SmartPointer< const SelfConstPointer
 
typedef CPUTransformType::ParametersType CPUParametersType
 
typedef CPUTransformType::ScalarType CPUScalarType
 
typedef CPUTransformType::ConstPointer CPUTransformConstPointer
 
typedef TTransform CPUTransformType
 
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 CastCopyParameters (const CPUParametersType &from, GPUParametersType &to)
 
void CastCopyTransformParameters (const CPUTransformConstPointer &fromTransform, GPUTransformPointer &toTransform)
 
bool CopyTransform (const CPUTransformConstPointer &fromTransform, GPUTransformPointer &toTransform)
 
 GPUTransformCopier ()
 
virtual void PrintSelf (std::ostream &os, Indent indent) const ITK_OVERRIDE
 
virtual ~GPUTransformCopier ()
 

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

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.

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.

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

Definition at line 83 of file itkGPUTransformCopier.h.

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.

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

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

Definition at line 94 of file itkGPUTransformCopier.h.

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

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

Definition at line 93 of file itkGPUTransformCopier.h.

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

Definition at line 92 of file itkGPUTransformCopier.h.

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.

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.

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

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

Definition at line 126 of file itkGPUTransformCopier.h.

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

Member Function Documentation

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.

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.

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.

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

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.

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

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.

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

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.

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

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.

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.

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

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() );

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

Compute of the output transform.

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.

template<typename TTypeList , typename NDimensions , typename TTransform , typename TOutputTransformPrecisionType >
itk::GPUTransformCopier< TTypeList, NDimensions, TTransform, TOutputTransformPrecisionType >::itkStaticConstMacro ( OutputSpaceDimension  ,
unsigned  int,
CPUTransformType::OutputSpaceDimension   
)
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.

template<typename TTypeList , typename NDimensions , typename TTransform , typename TOutputTransformPrecisionType >
void itk::GPUTransformCopier< TTypeList, NDimensions, TTransform, TOutputTransformPrecisionType >::operator= ( const Self )
private
template<typename TTypeList , typename NDimensions , typename TTransform , typename TOutputTransformPrecisionType >
virtual void itk::GPUTransformCopier< TTypeList, NDimensions, TTransform, TOutputTransformPrecisionType >::PrintSelf ( std::ostream &  os,
Indent  indent 
) const
protectedvirtual
template<typename TTypeList , typename NDimensions , typename TTransform , typename TOutputTransformPrecisionType >
virtual void itk::GPUTransformCopier< TTypeList, NDimensions, TTransform, TOutputTransformPrecisionType >::SetExplicitMode ( bool  _arg)
virtual
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.

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

Update method.

Field Documentation

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

Definition at line 227 of file itkGPUTransformCopier.h.

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

Definition at line 224 of file itkGPUTransformCopier.h.

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

Definition at line 226 of file itkGPUTransformCopier.h.

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

Definition at line 225 of file itkGPUTransformCopier.h.



Generated on 04-09-2015 for elastix by doxygen 1.8.9.1 elastix logo