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
24namespace itk
25{
27itkGPUKernelClassMacro(GPUMatrixOffsetTransformBaseKernel);
28
40template <typename TScalarType = float, // Data type for scalars
41 unsigned int NInputDimensions = 3, // Number of dimensions in the input space
42 unsigned int NOutputDimensions = 3>
43// Number of dimensions in the output space
45{
46public:
50
53
55 bool
56 IsMatrixOffsetTransform() const override
57 {
58 return true;
59 }
60
63
65 itkStaticConstMacro(InputSpaceDimension, unsigned int, NInputDimensions);
66 itkStaticConstMacro(OutputSpaceDimension, unsigned int, NOutputDimensions);
67 itkStaticConstMacro(ParametersDimension, unsigned int, NOutputDimensions *(NInputDimensions + 1));
68
70 using CPUMatrixType = Matrix<TScalarType, Self::OutputSpaceDimension, Self::InputSpaceDimension>;
71 using CPUInverseMatrixType = Matrix<TScalarType, Self::InputSpaceDimension, Self::OutputSpaceDimension>;
72 using CPUOutputVectorType = Vector<TScalarType, Self::OutputSpaceDimension>;
73
75 virtual const CPUMatrixType &
76 GetCPUMatrix() const = 0;
77
79 virtual const CPUOutputVectorType &
80 GetCPUOffset() const = 0;
81
82protected:
84 ~GPUMatrixOffsetTransformBase() override = default;
85
88 bool
89 GetSourceCode(std::string & source) const override;
90
93 GetParametersDataManager() const override;
94
95private:
96 GPUMatrixOffsetTransformBase(const Self & other) = delete;
97 const Self &
98 operator=(const Self &) = delete;
99
100 std::vector<std::string> m_Sources;
101};
102
103} // end namespace itk
104
105#ifndef ITK_MANUAL_INSTANTIATION
106# include "itkGPUMatrixOffsetTransformBase.hxx"
107#endif
108
109#endif /* itkGPUMatrixOffsetTransformBase_h */
Base version of the GPU MatrixOffsetTransform.
virtual const CPUMatrixType & GetCPUMatrix() const =0
itkStaticConstMacro(InputSpaceDimension, unsigned int, NInputDimensions)
const Self & operator=(const Self &)=delete
~GPUMatrixOffsetTransformBase() override=default
Matrix< TScalarType, Self::InputSpaceDimension, Self::OutputSpaceDimension > CPUInverseMatrixType
itkStaticConstMacro(ParametersDimension, unsigned int, NOutputDimensions *(NInputDimensions+1))
bool GetSourceCode(std::string &source) const override
Matrix< TScalarType, Self::OutputSpaceDimension, Self::InputSpaceDimension > CPUMatrixType
itkStaticConstMacro(OutputSpaceDimension, unsigned int, NOutputDimensions)
Vector< TScalarType, Self::OutputSpaceDimension > CPUOutputVectorType
GPUDataManager::Pointer GetParametersDataManager() const override
virtual const CPUOutputVectorType & GetCPUOffset() const =0
GPUMatrixOffsetTransformBase(const Self &other)=delete
Base class for all GPU transforms.
itkGPUKernelClassMacro(GPUBSplineTransformKernel)


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