ITK  5.0.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:
48  ITK_DISALLOW_COPY_AND_ASSIGN(TransformBaseTemplate);
49 
52  using Superclass = Object;
55 
58  using ParametersValueType = TParametersValueType;
60  using FixedParametersValueType = double;
62 
64  itkTypeMacro(TransformBaseTemplate, Object);
65 
69 
72 
74  virtual const ParametersType & GetParameters() const = 0;
75 
77  virtual unsigned int GetInputSpaceDimension() const = 0;
78 
80  virtual unsigned int GetOutputSpaceDimension() const = 0;
81 
83  virtual void SetParameters(const ParametersType &) = 0;
84 
92  virtual void SetParametersByValue(const ParametersType & p) = 0;
93 
95  virtual void SetFixedParameters(const FixedParametersType &) = 0;
96 
101  virtual void CopyInParameters(const ParametersValueType * const begin,
102  const ParametersValueType * const end) = 0;
103 
108  virtual void CopyInFixedParameters(const FixedParametersValueType * const begin,
109  const FixedParametersValueType * const end) = 0;
110 
112  virtual const FixedParametersType & GetFixedParameters() const = 0;
113 
115  virtual std::string GetTransformTypeAsString() const = 0;
116 
117  typedef enum {
125 
127  virtual TransformCategoryType GetTransformCategory() const = 0;
128 
129 protected:
130 
131 #if defined(__GNUC__) && __GNUC__ < 6
132  // A bug in some versions of the gcc 5.4.0 compiler
133  // result in a linker error when = default is requested
135  ~TransformBaseTemplate() override { };
136 #else
137  TransformBaseTemplate() = default;
138  ~TransformBaseTemplate() override = default;
139 #endif
140 };
141 
144 
145 } // end namespace itk
146 
147 #endif
148 
virtual void CopyInParameters(const ParametersValueType *const begin, const ParametersValueType *const end)=0
virtual NumberOfParametersType GetNumberOfParameters() const =0
virtual const ParametersType & GetParameters() const =0
Light weight base class for most itk classes.
~TransformBaseTemplate() override=default
virtual unsigned int GetOutputSpaceDimension() const =0
virtual unsigned int GetInputSpaceDimension() const =0
virtual void CopyInFixedParameters(const FixedParametersValueType *const begin, const FixedParametersValueType *const end)=0
virtual TransformCategoryType GetTransformCategory() const =0
SizeValueType IdentifierType
Definition: itkIntTypes.h:87
Class to hold and manage different parameter types used during optimization.
virtual void SetFixedParameters(const FixedParametersType &)=0
virtual void SetParameters(const ParametersType &)=0
IdentifierType NumberOfParametersType
virtual const FixedParametersType & GetFixedParameters() const =0
virtual std::string GetTransformTypeAsString() const =0
Base class for most ITK classes.
Definition: itkObject.h:60
virtual void SetParametersByValue(const ParametersType &p)=0
TParametersValueType ParametersValueType