go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkGPUMatrixOffsetTransformBase.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright UMC Utrecht and contributors
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef __itkGPUMatrixOffsetTransformBase_h
19 #define __itkGPUMatrixOffsetTransformBase_h
20 
21 #include "itkGPUTransformBase.h"
22 #include "itkMatrix.h"
23 
24 namespace itk
25 {
27 itkGPUKernelClassMacro( GPUMatrixOffsetTransformBaseKernel );
28 
40 template<
41 typename TScalarType = float, // Data type for scalars
42 unsigned int NInputDimensions = 3, // Number of dimensions in the input space
43 unsigned int NOutputDimensions = 3 >
44 // Number of dimensions in the output space
46 {
47 public:
48 
52 
54  itkTypeMacro( GPUMatrixOffsetTransformBase, GPUSuperclass );
55 
57  virtual bool IsMatrixOffsetTransform( void ) const { return true; }
58 
60  typedef TScalarType ScalarType;
61 
63  itkStaticConstMacro( InputSpaceDimension, unsigned int, NInputDimensions );
64  itkStaticConstMacro( OutputSpaceDimension, unsigned int, NOutputDimensions );
65  itkStaticConstMacro( ParametersDimension, unsigned int, NOutputDimensions * ( NInputDimensions + 1 ) );
66 
68  typedef Matrix< TScalarType, itkGetStaticConstMacro( OutputSpaceDimension ),
69  itkGetStaticConstMacro( InputSpaceDimension ) > CPUMatrixType;
70  typedef Matrix< TScalarType, itkGetStaticConstMacro( InputSpaceDimension ),
71  itkGetStaticConstMacro( OutputSpaceDimension ) > CPUInverseMatrixType;
72  typedef Vector< TScalarType,
73  itkGetStaticConstMacro( OutputSpaceDimension ) > CPUOutputVectorType;
74 
76  virtual const CPUMatrixType & GetCPUMatrix( void ) const = 0;
77 
79  virtual const CPUInverseMatrixType & GetCPUInverseMatrix( void ) const = 0;
80 
82  virtual const CPUOutputVectorType & GetCPUOffset( void ) const = 0;
83 
84 protected:
85 
88 
91  virtual bool GetSourceCode( std::string & source ) const ITK_OVERRIDE;
92 
94  virtual GPUDataManager::Pointer GetParametersDataManager( void ) const ITK_OVERRIDE;
95 
96 private:
97 
98  GPUMatrixOffsetTransformBase( const Self & other ); // purposely not implemented
99  const Self & operator=( const Self & ); // purposely not implemented
100 
101  std::vector< std::string > m_Sources;
102 };
103 
104 } // end namespace itk
105 
106 #ifndef ITK_MANUAL_INSTANTIATION
107 #include "itkGPUMatrixOffsetTransformBase.hxx"
108 #endif
109 
110 #endif /* itkGPUMatrixOffsetTransformBase_h */
Base class for all GPU transforms.
Matrix< TScalarType, itkGetStaticConstMacro(OutputSpaceDimension), itkGetStaticConstMacro(InputSpaceDimension) > CPUMatrixType
itkGPUKernelClassMacro(GPUBSplineTransformKernel)
Base version of the GPU MatrixOffsetTransform.
Matrix< TScalarType, itkGetStaticConstMacro(InputSpaceDimension), itkGetStaticConstMacro(OutputSpaceDimension) > CPUInverseMatrixType
Vector< TScalarType, itkGetStaticConstMacro(OutputSpaceDimension) > CPUOutputVectorType


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