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;
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  virtual ~GPUTransformCopier() {}
129  virtual void PrintSelf( std::ostream & os, Indent indent ) const ITK_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 */
itk::GPUTransformCopier::Superclass
Object Superclass
Definition: itkGPUTransformCopier.h:69
itk::GPUTransformCopier::CopyEuler3DTransform
bool CopyEuler3DTransform(const CPUTransformConstPointer &, GPUTransformPointer &, TransformSpaceDimensionToType< InputSpaceDimension >)
Definition: itkGPUTransformCopier.h:175
itk::GPUTransformCopier::CPUTransformType
TTransform CPUTransformType
Definition: itkGPUTransformCopier.h:77
itk::GPUTransformCopier::GPUTransformPointer
GPUTransformType::Pointer GPUTransformPointer
Definition: itkGPUTransformCopier.h:94
itk::GPUTransformCopier::CPUScalarType
CPUTransformType::ScalarType CPUScalarType
Definition: itkGPUTransformCopier.h:84
itk::GPUTransformCopier::CPUTransformConstPointer
CPUTransformType::ConstPointer CPUTransformConstPointer
Definition: itkGPUTransformCopier.h:81
SmartPointer< Self >
itk::GPUTransformCopier::CopySimilarity2DTransform
bool CopySimilarity2DTransform(const CPUTransformConstPointer &, GPUTransformPointer &, TransformSpaceDimensionToType< InputSpaceDimension >)
Definition: itkGPUTransformCopier.h:196
itk::GPUTransformCopier::m_InputTransform
CPUTransformConstPointer m_InputTransform
Definition: itkGPUTransformCopier.h:231
itk::GPUTransformCopier::CastCopyTransformParameters
void CastCopyTransformParameters(const CPUTransformConstPointer &fromTransform, GPUTransformPointer &toTransform)
itk::GPUTransformCopier::GPUTransformType
Transform< GPUScalarType, InputSpaceDimension, OutputSpaceDimension > GPUTransformType
Definition: itkGPUTransformCopier.h:93
itk::GPUTransformCopier::itkStaticConstMacro
itkStaticConstMacro(InputSpaceDimension, unsigned int, CPUTransformType::InputSpaceDimension)
itk::GPUTransformCopier::TransformSpaceDimensionToType
Definition: itkGPUTransformCopier.h:160
itk::GPUTransformCopier::m_ExplicitMode
bool m_ExplicitMode
Definition: itkGPUTransformCopier.h:234
itk::GPUTransformCopier::CopyEuler2DTransform
bool CopyEuler2DTransform(const CPUTransformConstPointer &fromTransform, GPUTransformPointer &toTransform, TransformSpaceDimensionToType< 2 >)
itk::GPUTransformCopier::GPUTransformCopier
GPUTransformCopier(const Self &)
itk::GPUTransformCopier::Update
void Update(void)
itk::GPUTransformCopier::GPUFixedParametersType
GPUTransformType::FixedParametersType GPUFixedParametersType
Definition: itkGPUTransformCopier.h:96
itk::GPUTransformCopier::m_InternalTransformTime
ModifiedTimeType m_InternalTransformTime
Definition: itkGPUTransformCopier.h:233
itk::GPUTransformCopier::GPUTransformCopier
GPUTransformCopier()
itk::GPUTransformCopier::CopySimilarity3DTransform
bool CopySimilarity3DTransform(const CPUTransformConstPointer &fromTransform, GPUTransformPointer &toTransform, TransformSpaceDimensionToType< 3 >)
itk::GPUTransformCopier::CastCopyFixedParameters
void CastCopyFixedParameters(const CPUFixedParametersType &from, GPUFixedParametersType &to)
itk::GPUTransformCopier
A helper class which creates an GPU transform which is perfect copy of the CPU transform.
Definition: itkGPUTransformCopier.h:64
itk::GPUTransformCopier::CopySimilarity3DTransform
bool CopySimilarity3DTransform(const CPUTransformConstPointer &, GPUTransformPointer &, TransformSpaceDimensionToType< InputSpaceDimension >)
Definition: itkGPUTransformCopier.h:207
itk::GPUTransformCopier::CPUFixedParametersType
CPUTransformType::FixedParametersType CPUFixedParametersType
Definition: itkGPUTransformCopier.h:83
itk::GPUTransformCopier::ConstPointer
SmartPointer< const Self > ConstPointer
Definition: itkGPUTransformCopier.h:71
itk::GPUTransformCopier::CastCopyParameters
void CastCopyParameters(const CPUParametersType &from, GPUParametersType &to)
itk::GPUTransformCopier::Self
GPUTransformCopier Self
Definition: itkGPUTransformCopier.h:68
itk::GPUTransformCopier::CopyTransform
bool CopyTransform(const CPUTransformConstPointer &fromTransform, GPUTransformPointer &toTransform)
itk::GPUTransformCopier::CopyBSplineTransform
bool CopyBSplineTransform(const CPUTransformConstPointer &fromTransform, GPUTransformPointer &toTransform)
itk::GPUTransformCopier::~GPUTransformCopier
virtual ~GPUTransformCopier()
Definition: itkGPUTransformCopier.h:128
itk::GPUTransformCopier::GPUParametersType
GPUTransformType::ParametersType GPUParametersType
Definition: itkGPUTransformCopier.h:95
itk::GPUTransformCopier::CopySimilarity2DTransform
bool CopySimilarity2DTransform(const CPUTransformConstPointer &fromTransform, GPUTransformPointer &toTransform, TransformSpaceDimensionToType< 2 >)
itk::GPUTransformCopier::CPUParametersType
CPUTransformType::ParametersType CPUParametersType
Definition: itkGPUTransformCopier.h:82
itk::GPUTransformCopier::CopyEuler3DTransform
bool CopyEuler3DTransform(const CPUTransformConstPointer &fromTransform, GPUTransformPointer &toTransform, TransformSpaceDimensionToType< 3 >)
itk::GPUTransformCopier::GPUScalarType
TOutputTransformPrecisionType GPUScalarType
Definition: itkGPUTransformCopier.h:91
itk
Definition: itkAdvancedImageToImageMetric.h:40
itk::GPUTransformCopier::operator=
void operator=(const Self &)
itk::GPUTransformCopier::itkStaticConstMacro
itkStaticConstMacro(OutputSpaceDimension, unsigned int, CPUTransformType::OutputSpaceDimension)
itk::GPUTransformCopier::CopyEuler2DTransform
bool CopyEuler2DTransform(const CPUTransformConstPointer &, GPUTransformPointer &, TransformSpaceDimensionToType< InputSpaceDimension >)
Definition: itkGPUTransformCopier.h:164
itk::GPUTransformCopier::Pointer
SmartPointer< Self > Pointer
Definition: itkGPUTransformCopier.h:70
itk::GPUTransformCopier::PrintSelf
virtual void PrintSelf(std::ostream &os, Indent indent) const ITK_OVERRIDE
itk::GPUTransformCopier::itkGetModifiableObjectMacro
itkGetModifiableObjectMacro(Output, GPUTransformType)
itk::GPUTransformCopier::m_Output
GPUTransformPointer m_Output
Definition: itkGPUTransformCopier.h:232


Generated on OURCE_DATE_EPOCH for elastix by doxygen 1.8.18 elastix logo