ITK  4.13.0
Insight Segmentation and Registration Toolkit
itkTransformBase.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 itkTransformBase_h
19 #define itkTransformBase_h
20 
21 #include "ITKTransformExport.h"
22 
23 #include "itkObject.h"
24 #include "itkPoint.h"
25 #include "itkCovariantVector.h"
26 #include "vnl/vnl_vector_fixed.h"
27 #include "itkArray2D.h"
28 #include "itkOptimizerParameters.h"
29 
30 #include "itkObjectFactory.h"
31 #include "itkIntTypes.h"
32 
33 namespace itk
34 {
44 template<typename TParametersValueType>
46 {
47 public:
50  typedef Object Superclass;
53 
56  typedef TParametersValueType ParametersValueType;
58  typedef double FixedParametersValueType;
60 
61 // The ITK_FIXED_PARAMETERS_ARE_DOUBLE is intended
62 // to facilitate transition of ITK for those very
63 // rare cases where multiple versions of ITK
64 // may need to be supported simultaneously.
65 #if defined( ITK_LEGACY_REMOVE )
66  #undef ITK_FIXED_PARAMETERS_ARE_DOUBLE
67 #else
68  #define ITK_FIXED_PARAMETERS_ARE_DOUBLE
69  // #if !defined(ITK_FIXED_PARAMETERS_ARE_DOUBLE)
70  // typedef ParametersValueType FixedParametersValueType;
71  // #endif
72 #endif
73 
75  itkTypeMacro(TransformBaseTemplate, Object);
76 
80 
82  virtual NumberOfParametersType GetNumberOfParameters(void) const = 0;
83 
85  virtual const ParametersType & GetParameters(void) const = 0;
86 
88  virtual unsigned int GetInputSpaceDimension(void) const = 0;
89 
91  virtual unsigned int GetOutputSpaceDimension(void) const = 0;
92 
94  virtual void SetParameters(const ParametersType &) = 0;
95 
103  virtual void SetParametersByValue(const ParametersType & p) = 0;
104 
106  virtual void SetFixedParameters(const FixedParametersType &) = 0;
107 
112  virtual void CopyInParameters(const ParametersValueType * const begin,
113  const ParametersValueType * const end) = 0;
114 
119  virtual void CopyInFixedParameters(const FixedParametersValueType * const begin,
120  const FixedParametersValueType * const end) = 0;
121 
123  virtual const FixedParametersType & GetFixedParameters() const = 0;
124 
126  virtual std::string GetTransformTypeAsString() const = 0;
127 
128  typedef enum {
136 
138  virtual TransformCategoryType GetTransformCategory() const = 0;
139 
140 protected:
142  virtual ~TransformBaseTemplate() ITK_OVERRIDE {}
143 
144 private:
145  ITK_DISALLOW_COPY_AND_ASSIGN(TransformBaseTemplate);
146 };
147 
150 
151 } // end namespace itk
152 
153 #endif
154 
virtual void CopyInParameters(const ParametersValueType *const begin, const ParametersValueType *const end)=0
TransformBaseTemplate< double > TransformBase
IdentifierType NumberOfParametersType
virtual const ParametersType & GetParameters(void) const =0
SmartPointer< const Self > ConstPointer
TParametersValueType ParametersValueType
virtual NumberOfParametersType GetNumberOfParameters(void) const =0
TransformBaseTemplate Self
virtual void CopyInFixedParameters(const FixedParametersValueType *const begin, const FixedParametersValueType *const end)=0
OptimizerParameters< FixedParametersValueType > FixedParametersType
virtual TransformCategoryType GetTransformCategory() const =0
SizeValueType IdentifierType
Definition: itkIntTypes.h:147
Class to hold and manage different parameter types used during optimization.
virtual void SetFixedParameters(const FixedParametersType &)=0
virtual void SetParameters(const ParametersType &)=0
SmartPointer< Self > Pointer
virtual ~TransformBaseTemplate() override
virtual const FixedParametersType & GetFixedParameters() const =0
virtual unsigned int GetOutputSpaceDimension(void) const =0
OptimizerParameters< ParametersValueType > ParametersType
virtual std::string GetTransformTypeAsString() const =0
Base class for most ITK classes.
Definition: itkObject.h:59
virtual void SetParametersByValue(const ParametersType &p)=0
virtual unsigned int GetInputSpaceDimension(void) const =0