go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkGPUAdvancedCombinationTransformCopier.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 __itkGPUAdvancedCombinationTransformCopier_h
19 #define __itkGPUAdvancedCombinationTransformCopier_h
20 
22 
23 namespace itk
24 {
62 template< typename TTypeList, typename NDimensions,
63 typename TAdvancedCombinationTransform, typename TOutputTransformPrecisionType >
65 {
66 public:
67 
70  typedef Object Superclass;
72  typedef SmartPointer< const Self > ConstPointer;
73 
75  itkNewMacro( Self );
76 
78  itkTypeMacro( GPUAdvancedCombinationTransformCopier, Object );
79 
81  typedef TAdvancedCombinationTransform CPUComboTransformType;
82 
84  itkStaticConstMacro( SpaceDimension, unsigned int, CPUComboTransformType::SpaceDimension );
85 
87  typedef typename CPUComboTransformType::ConstPointer CPUComboTransformConstPointer;
88  typedef typename CPUComboTransformType::CurrentTransformType CPUCurrentTransformType;
89  typedef typename CPUComboTransformType::CurrentTransformPointer CPUCurrentTransformPointer;
90  typedef typename CPUComboTransformType::CurrentTransformConstPointer CPUCurrentTransformConstPointer;
91  typedef typename CPUComboTransformType::InitialTransformType CPUInitialTransformType;
92  typedef typename CPUComboTransformType::InitialTransformPointer CPUInitialTransformPointer;
93  typedef typename CPUComboTransformType::InitialTransformConstPointer CPUInitialTransformConstPointer;
94  typedef typename CPUComboTransformType::TransformType TransformType; // itk::Transform
95  typedef typename CPUComboTransformType::TransformTypePointer TransformTypePointer; // itk::Transform
96  typedef typename CPUComboTransformType::TransformTypeConstPointer TransformTypeConstPointer; // itk::Transform
97  typedef typename CPUComboTransformType::ScalarType CPUScalarType;
98 
103 
105  typedef TOutputTransformPrecisionType GPUScalarType;
109 
115 
117  itkSetConstObjectMacro( InputTransform, CPUComboTransformType );
118 
121 
130  itkGetConstMacro( ExplicitMode, bool );
131  itkSetMacro( ExplicitMode, bool );
132 
134  void Update( void );
135 
136 #ifdef ITK_USE_CONCEPT_CHECKING
137  // Begin concept checking
138  itkConceptMacro( OutputTransformPrecisionTypeIsFloatingPointCheck,
139  ( Concept::IsFloatingPoint< TOutputTransformPrecisionType > ) );
140  // End concept checking
141 #endif
142 
143 protected:
144 
147  virtual void PrintSelf( std::ostream & os, Indent indent ) const ITK_OVERRIDE;
148 
151  const CPUCurrentTransformConstPointer & fromTransform,
152  GPUComboTransformPointer & toTransform );
153 
156  const CPUCurrentTransformConstPointer & fromTransform,
157  GPUAdvancedTransformPointer & toTransform );
158 
160  //void CopyParameters(
161  // const CPUCurrentTransformConstPointer & fromTransform,
162  // GPUAdvancedTransformPointer & toTransform )
163  //{
164  // toTransform->SetFixedParameters( fromTransform->GetFixedParameters() );
165  // toTransform->SetParameters( fromTransform->GetParameters() );
166  //}
167 
169  void CastCopyParameters(
170  const CPUParametersType & from,
171  GPUParametersType & to );
172 
173 private:
174 
177  const CPUCurrentTransformConstPointer & fromTransform,
178  GPUComboTransformPointer & toTransform );
179 
181  template< unsigned int Dimension >
183 
185  template< unsigned int InputSpaceDimension >
187  const CPUCurrentTransformConstPointer &,
188  GPUComboTransformPointer &,
190  {
191  return false;
192  }
193 
194 
196  template< unsigned int InputSpaceDimension >
198  const CPUCurrentTransformConstPointer &,
199  GPUComboTransformPointer &,
201  {
202  return false;
203  }
204 
205 
208  const CPUCurrentTransformConstPointer & fromTransform,
209  GPUComboTransformPointer & toTransform, TransformSpaceDimensionToType< 2 > );
210 
213  const CPUCurrentTransformConstPointer & fromTransform,
214  GPUComboTransformPointer & toTransform, TransformSpaceDimensionToType< 3 > );
215 
217  template< unsigned int InputSpaceDimension >
219  const CPUCurrentTransformConstPointer &,
220  GPUComboTransformPointer &,
222  {
223  return false;
224  }
225 
226 
228  template< unsigned int InputSpaceDimension >
230  const CPUCurrentTransformConstPointer &,
231  GPUComboTransformPointer &,
233  {
234  return false;
235  }
236 
237 
240  const CPUCurrentTransformConstPointer & fromTransform,
241  GPUComboTransformPointer & toTransform, TransformSpaceDimensionToType< 2 > );
242 
245  const CPUCurrentTransformConstPointer & fromTransform,
246  GPUComboTransformPointer & toTransform, TransformSpaceDimensionToType< 3 > );
247 
248 private:
249 
250  GPUAdvancedCombinationTransformCopier( const Self & ); // purposely not implemented
251  void operator=( const Self & ); // purposely not implemented
252 
253  CPUComboTransformConstPointer m_InputTransform;
254  GPUComboTransformPointer m_Output;
255  ModifiedTimeType m_InternalTransformTime;
257 };
258 
259 } // end namespace itk
260 
261 #ifndef ITK_MANUAL_INSTANTIATION
262 #include "itkGPUAdvancedCombinationTransformCopier.hxx"
263 #endif
264 
265 #endif /* __itkGPUAdvancedCombinationTransformCopier_h */
CPUComboTransformType::CurrentTransformType CPUCurrentTransformType
CPUComboTransformType::InitialTransformPointer CPUInitialTransformPointer
itkStaticConstMacro(SpaceDimension, unsigned int, CPUComboTransformType::SpaceDimension)
CPUComboTransformType::CurrentTransformPointer CPUCurrentTransformPointer
bool CopyEuler3DTransform(const CPUCurrentTransformConstPointer &, GPUComboTransformPointer &, TransformSpaceDimensionToType< InputSpaceDimension >)
virtual void PrintSelf(std::ostream &os, Indent indent) const ITK_OVERRIDE
bool CopyToCurrentTransform(const CPUCurrentTransformConstPointer &fromTransform, GPUComboTransformPointer &toTransform)
CPUComboTransformType::InitialTransformConstPointer CPUInitialTransformConstPointer
bool CopySimilarity2DTransform(const CPUCurrentTransformConstPointer &, GPUComboTransformPointer &, TransformSpaceDimensionToType< InputSpaceDimension >)
bool CopyBSplineTransform(const CPUCurrentTransformConstPointer &fromTransform, GPUComboTransformPointer &toTransform)
CPUComboTransformType::TransformTypeConstPointer TransformTypeConstPointer
void CastCopyTransformParameters(const CPUCurrentTransformConstPointer &fromTransform, GPUAdvancedTransformPointer &toTransform)
AdvancedTransform< CPUScalarType, SpaceDimension, SpaceDimension > CPUAdvancedTransformType
GPUAdvancedCombinationTransform< GPUScalarType, SpaceDimension > GPUComboTransformType
Superclass::ParametersType ParametersType
Transform maps points, vectors and covariant vectors from an input space to an output space...
CPUComboTransformType::TransformTypePointer TransformTypePointer
A helper class which creates an GPU AdvancedCombinationTransform which is perfect copy of the CPU Adv...
bool CopyEuler2DTransform(const CPUCurrentTransformConstPointer &, GPUComboTransformPointer &, TransformSpaceDimensionToType< InputSpaceDimension >)
itkGetModifiableObjectMacro(Output, GPUComboTransformType)
void CastCopyParameters(const CPUParametersType &from, GPUParametersType &to)
AdvancedTransform< GPUScalarType, SpaceDimension, SpaceDimension > GPUAdvancedTransformType
GPU version of AdvancedCombinationTransform.
CPUComboTransformType::CurrentTransformConstPointer CPUCurrentTransformConstPointer
bool CopySimilarity3DTransform(const CPUCurrentTransformConstPointer &, GPUComboTransformPointer &, TransformSpaceDimensionToType< InputSpaceDimension >)
CPUComboTransformType::InitialTransformType CPUInitialTransformType


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