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 
23 namespace itk
24 {
61 template< typename TTypeList, typename NDimensions,
62 typename TTransform, typename TOutputTransformPrecisionType >
63 class GPUTransformCopier : public Object
64 {
65 public:
66 
69  typedef Object Superclass;
70  typedef SmartPointer< Self > Pointer;
71  typedef SmartPointer< const Self > ConstPointer;
72 
74  itkNewMacro( Self );
75 
77  itkTypeMacro( GPUTransformCopier, Object );
78 
80  typedef TTransform CPUTransformType;
81  typedef typename CPUTransformType::ConstPointer CPUTransformConstPointer;
82  typedef typename CPUTransformType::ParametersType CPUParametersType;
83  typedef typename CPUTransformType::FixedParametersType CPUFixedParametersType;
84  typedef typename CPUTransformType::ScalarType CPUScalarType;
85 
87  itkStaticConstMacro( InputSpaceDimension, unsigned int, CPUTransformType::InputSpaceDimension );
88  itkStaticConstMacro( OutputSpaceDimension, unsigned int, CPUTransformType::OutputSpaceDimension );
89 
91  typedef TOutputTransformPrecisionType GPUScalarType;
92  typedef Transform< GPUScalarType, InputSpaceDimension, OutputSpaceDimension >
94  typedef typename GPUTransformType::Pointer GPUTransformPointer;
95  typedef typename GPUTransformType::ParametersType GPUParametersType;
96  typedef typename GPUTransformType::FixedParametersType GPUFixedParametersType;
97 
99  itkSetConstObjectMacro( InputTransform, CPUTransformType );
100 
103 
112  itkGetConstMacro( ExplicitMode, bool );
113  itkSetMacro( ExplicitMode, bool );
114 
116  void Update( 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 
125 protected:
126 
128  ~GPUTransformCopier() override {}
129  void PrintSelf( std::ostream & os, Indent indent ) const override;
130 
133  const CPUTransformConstPointer & fromTransform,
134  GPUTransformPointer & toTransform );
135 
138  const CPUTransformConstPointer & fromTransform,
139  GPUTransformPointer & toTransform );
140 
143  const CPUParametersType & from,
144  GPUParametersType & to );
145 
148  const CPUFixedParametersType & from,
149  GPUFixedParametersType & to );
150 
151 private:
152 
155  const CPUTransformConstPointer & fromTransform,
156  GPUTransformPointer & toTransform );
157 
159  template< unsigned int Dimension >
161 
163  template< unsigned int InputSpaceDimension >
165  const CPUTransformConstPointer &,
168  {
169  return false;
170  }
171 
172 
174  template< unsigned int InputSpaceDimension >
176  const CPUTransformConstPointer &,
179  {
180  return false;
181  }
182 
183 
186  const CPUTransformConstPointer & fromTransform,
188 
191  const CPUTransformConstPointer & fromTransform,
193 
195  template< unsigned int InputSpaceDimension >
197  const CPUTransformConstPointer &,
200  {
201  return false;
202  }
203 
204 
206  template< unsigned int InputSpaceDimension >
208  const CPUTransformConstPointer &,
211  {
212  return false;
213  }
214 
215 
218  const CPUTransformConstPointer & fromTransform,
220 
223  const CPUTransformConstPointer & fromTransform,
225 
226 private:
227 
228  GPUTransformCopier( const Self & ); // purposely not implemented
229  void operator=( const Self & ); // purposely not implemented
230 
233  ModifiedTimeType m_InternalTransformTime;
235 };
236 
237 } // end namespace itk
238 
239 #ifndef ITK_MANUAL_INSTANTIATION
240 #include "itkGPUTransformCopier.hxx"
241 #endif
242 
243 #endif /* __itkGPUTransformCopier_h */
A helper class which creates an GPU transform which is perfect copy of the CPU transform.
GPUTransformType::Pointer GPUTransformPointer
bool CopySimilarity2DTransform(const CPUTransformConstPointer &fromTransform, GPUTransformPointer &toTransform, TransformSpaceDimensionToType< 2 >)
void CastCopyParameters(const CPUParametersType &from, GPUParametersType &to)
bool CopyEuler2DTransform(const CPUTransformConstPointer &fromTransform, GPUTransformPointer &toTransform, TransformSpaceDimensionToType< 2 >)
bool CopySimilarity3DTransform(const CPUTransformConstPointer &fromTransform, GPUTransformPointer &toTransform, TransformSpaceDimensionToType< 3 >)
bool CopyEuler3DTransform(const CPUTransformConstPointer &, GPUTransformPointer &, TransformSpaceDimensionToType< InputSpaceDimension >)
void CastCopyTransformParameters(const CPUTransformConstPointer &fromTransform, GPUTransformPointer &toTransform)
itkStaticConstMacro(InputSpaceDimension, unsigned int, CPUTransformType::InputSpaceDimension)
Transform< GPUScalarType, InputSpaceDimension, OutputSpaceDimension > GPUTransformType
CPUTransformType::ParametersType CPUParametersType
bool CopyEuler2DTransform(const CPUTransformConstPointer &, GPUTransformPointer &, TransformSpaceDimensionToType< InputSpaceDimension >)
ModifiedTimeType m_InternalTransformTime
GPUTransformType::ParametersType GPUParametersType
GPUTransformCopier(const Self &)
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 >)
CPUTransformConstPointer m_InputTransform
bool CopyTransform(const CPUTransformConstPointer &fromTransform, GPUTransformPointer &toTransform)
TOutputTransformPrecisionType GPUScalarType
CPUTransformType::FixedParametersType CPUFixedParametersType
void PrintSelf(std::ostream &os, Indent indent) const override
SmartPointer< const Self > ConstPointer
SmartPointer< Self > Pointer
GPUTransformType::FixedParametersType GPUFixedParametersType
itkStaticConstMacro(OutputSpaceDimension, unsigned int, CPUTransformType::OutputSpaceDimension)
void operator=(const Self &)
CPUTransformType::ConstPointer CPUTransformConstPointer
GPUTransformPointer m_Output
CPUTransformType::ScalarType CPUScalarType
bool CopyEuler3DTransform(const CPUTransformConstPointer &fromTransform, GPUTransformPointer &toTransform, TransformSpaceDimensionToType< 3 >)


Generated on OURCE_DATE_EPOCH for elastix by doxygen 1.9.1 elastix logo