ITK  4.6.0
Insight Segmentation and Registration Toolkit
itkTransformParametersAdaptor.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
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 __itkTransformParametersAdaptor_h
19 #define __itkTransformParametersAdaptor_h
20 
22 #include "itkTransform.h"
23 
24 namespace itk
25 {
54 template<typename TTransform>
56 : public TransformParametersAdaptorBase< Transform<typename TTransform::ScalarType, TTransform::InputSpaceDimension, TTransform::OutputSpaceDimension> >
57 {
58 public:
59 
65 
68 
72  typedef TTransform TransformType;
73  typedef typename TransformType::Pointer TransformPointer;
74  typedef typename TransformType::ParametersType ParametersType;
76 
78  itkSetObjectMacro( Transform, TransformType );
79 
80  virtual void SetTransform( TransformBaseType * _arg, void * )
81  {
82  TransformType *tx = dynamic_cast<TransformType *>(_arg);
83  itkAssertOrThrowMacro( tx != ITK_NULLPTR, "Unable to convert Transform to require concrete transform!" );
84  this->SetTransform(tx);
85  }
86 
88  itkNewMacro( Self );
89 
91  itkSetMacro( RequiredFixedParameters, ParametersType );
92 
94  itkGetConstReferenceMacro( RequiredFixedParameters, ParametersType );
95 
97  virtual void AdaptTransformParameters() {};
98 
99 protected:
102 
103  void PrintSelf( std::ostream & os, Indent indent ) const
104  {
105  Superclass::PrintSelf( os, indent );
106  itkPrintSelfObjectMacro( Transform );
107  }
108 
110 
111 private:
112  TransformParametersAdaptor( const Self & ); //purposely not implemented
113  void operator=( const Self & ); //purposely not implemented
114 
115 }; //class TransformParametersAdaptor
116 } // namespace itk
117 
118 #endif /* __itkTransformParametersAdaptor_h */
virtual void PrintSelf(std::ostream &os, Indent indent) const ITK_OVERRIDE
TransformType::ParametersType ParametersType
void operator=(const Self &)
Light weight base class for most itk classes.
Base helper class intended for multi-resolution image registration.
Base helper class intended for multi-resolution image registration.
Transform points and vectors from an input space to an output space.
Definition: itkTransform.h:82
Superclass::TransformBaseType TransformBaseType
Superclass::ParametersValueType ParametersValueType
virtual void SetTransform(TransformType *_arg)
virtual void SetTransform(TransformBaseType *_arg, void *)
Control indentation during Print() invocation.
Definition: itkIndent.h:49
TransformParametersAdaptorBase< Transform< typename TTransform::ScalarType, TTransform::InputSpaceDimension, TTransform::OutputSpaceDimension > > Superclass
void PrintSelf(std::ostream &os, Indent indent) const