go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkGPUTransformCopier.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 itkGPUTransformCopier_h
19#define itkGPUTransformCopier_h
20
21#include "itkTransform.h"
22
23namespace itk
24{
61template <typename TTypeList, typename NDimensions, typename TTransform, typename TOutputTransformPrecisionType>
62class ITK_TEMPLATE_EXPORT GPUTransformCopier : public Object
63{
64public:
66
69 using Superclass = Object;
70 using Pointer = SmartPointer<Self>;
71 using ConstPointer = SmartPointer<const Self>;
72
74 itkNewMacro(Self);
75
77 itkTypeMacro(GPUTransformCopier, Object);
78
80 using CPUTransformType = TTransform;
81 using CPUTransformConstPointer = typename CPUTransformType::ConstPointer;
82 using CPUParametersType = typename CPUTransformType::ParametersType;
83 using CPUFixedParametersType = typename CPUTransformType::FixedParametersType;
84 using CPUScalarType = typename CPUTransformType::ScalarType;
85
87 itkStaticConstMacro(InputSpaceDimension, unsigned int, CPUTransformType::InputSpaceDimension);
88 itkStaticConstMacro(OutputSpaceDimension, unsigned int, CPUTransformType::OutputSpaceDimension);
89
91 using GPUScalarType = TOutputTransformPrecisionType;
92 using GPUTransformType = Transform<GPUScalarType, InputSpaceDimension, OutputSpaceDimension>;
93 using GPUTransformPointer = typename GPUTransformType::Pointer;
94 using GPUParametersType = typename GPUTransformType::ParametersType;
95 using GPUFixedParametersType = typename GPUTransformType::FixedParametersType;
96
98 itkSetConstObjectMacro(InputTransform, CPUTransformType);
99
102
111 itkGetConstMacro(ExplicitMode, bool);
112 itkSetMacro(ExplicitMode, bool);
113
115 void
117
118#ifdef ITK_USE_CONCEPT_CHECKING
119 // Begin concept checking
120 itkConceptMacro(OutputTransformPrecisionTypeIsFloatingPointCheck,
121 (Concept::IsFloatingPoint<TOutputTransformPrecisionType>));
122 // End concept checking
123#endif
124
125protected:
128 void
129 PrintSelf(std::ostream & os, Indent indent) const override;
130
132 bool
133 CopyTransform(const CPUTransformConstPointer & fromTransform, GPUTransformPointer & toTransform);
134
136 void
138
140 void
142
144 void
146
147private:
149 bool
151
153 template <unsigned int Dimension>
154 struct ITK_TEMPLATE_EXPORT TransformSpaceDimensionToType
155 {};
156
158 template <unsigned int InputSpaceDimension>
159 bool
166
167
169 template <unsigned int InputSpaceDimension>
170 bool
177
178
180 bool
182 GPUTransformPointer & toTransform,
184
186 bool
188 GPUTransformPointer & toTransform,
190
192 template <unsigned int InputSpaceDimension>
193 bool
200
201
203 template <unsigned int InputSpaceDimension>
204 bool
211
212
214 bool
216 GPUTransformPointer & toTransform,
218
220 bool
222 GPUTransformPointer & toTransform,
224
225private:
226 CPUTransformConstPointer m_InputTransform{};
228 ModifiedTimeType m_InternalTransformTime{};
229 bool m_ExplicitMode{};
230};
231
232} // end namespace itk
233
234#ifndef ITK_MANUAL_INSTANTIATION
235# include "itkGPUTransformCopier.hxx"
236#endif
237
238#endif /* itkGPUTransformCopier_h */
A helper class which creates an GPU transform which is perfect copy of the CPU transform.
bool CopySimilarity2DTransform(const CPUTransformConstPointer &fromTransform, GPUTransformPointer &toTransform, TransformSpaceDimensionToType< 2 >)
void CastCopyParameters(const CPUParametersType &from, GPUParametersType &to)
TOutputTransformPrecisionType GPUScalarType
bool CopyEuler2DTransform(const CPUTransformConstPointer &fromTransform, GPUTransformPointer &toTransform, TransformSpaceDimensionToType< 2 >)
bool CopySimilarity3DTransform(const CPUTransformConstPointer &fromTransform, GPUTransformPointer &toTransform, TransformSpaceDimensionToType< 3 >)
ITK_DISALLOW_COPY_AND_MOVE(GPUTransformCopier)
bool CopyEuler3DTransform(const CPUTransformConstPointer &, GPUTransformPointer &, TransformSpaceDimensionToType< InputSpaceDimension >)
void CastCopyTransformParameters(const CPUTransformConstPointer &fromTransform, GPUTransformPointer &toTransform)
itkStaticConstMacro(InputSpaceDimension, unsigned int, CPUTransformType::InputSpaceDimension)
typename GPUTransformType::ParametersType GPUParametersType
bool CopyEuler2DTransform(const CPUTransformConstPointer &, GPUTransformPointer &, TransformSpaceDimensionToType< InputSpaceDimension >)
Transform< GPUScalarType, InputSpaceDimension, OutputSpaceDimension > GPUTransformType
typename CPUTransformType::FixedParametersType CPUFixedParametersType
bool CopySimilarity3DTransform(const CPUTransformConstPointer &, GPUTransformPointer &, TransformSpaceDimensionToType< InputSpaceDimension >)
itkGetModifiableObjectMacro(Output, GPUTransformType)
bool CopyBSplineTransform(const CPUTransformConstPointer &fromTransform, GPUTransformPointer &toTransform)
void CastCopyFixedParameters(const CPUFixedParametersType &from, GPUFixedParametersType &to)
bool CopySimilarity2DTransform(const CPUTransformConstPointer &, GPUTransformPointer &, TransformSpaceDimensionToType< InputSpaceDimension >)
typename CPUTransformType::ParametersType CPUParametersType
SmartPointer< const Self > ConstPointer
bool CopyTransform(const CPUTransformConstPointer &fromTransform, GPUTransformPointer &toTransform)
typename CPUTransformType::ScalarType CPUScalarType
typename GPUTransformType::Pointer GPUTransformPointer
void PrintSelf(std::ostream &os, Indent indent) const override
typename GPUTransformType::FixedParametersType GPUFixedParametersType
itkStaticConstMacro(OutputSpaceDimension, unsigned int, CPUTransformType::OutputSpaceDimension)
typename CPUTransformType::ConstPointer CPUTransformConstPointer
bool CopyEuler3DTransform(const CPUTransformConstPointer &fromTransform, GPUTransformPointer &toTransform, TransformSpaceDimensionToType< 3 >)


Generated on 2024-07-17 for elastix by doxygen 1.11.0 (9b424b03c9833626cd435af22a444888fbbb192d) elastix logo