ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkBSplineExponentialDiffeomorphicTransform.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 itkBSplineExponentialDiffeomorphicTransform_h
19 #define itkBSplineExponentialDiffeomorphicTransform_h
20 
23 #include "itkPointSet.h"
24 
25 namespace itk
26 {
27 
55 template<typename TParametersValueType, unsigned int NDimensions>
56 class ITK_TEMPLATE_EXPORT BSplineExponentialDiffeomorphicTransform :
57  public ConstantVelocityFieldTransform<TParametersValueType, NDimensions>
58 {
59 public:
60  ITK_DISALLOW_COPY_AND_ASSIGN(BSplineExponentialDiffeomorphicTransform);
61 
67 
70 
72  itkNewMacro( Self );
73 
75  static constexpr unsigned int ConstantVelocityFieldDimension = NDimensions;
76 
78  static constexpr unsigned int Dimension = NDimensions;
79 
81  using ScalarType = typename Superclass::ScalarType;
82  using DerivativeType = typename Superclass::DerivativeType;
83  using DerivativeValueType = typename DerivativeType::ValueType;
84 
85  using ParametersType = typename Superclass::ParametersType;
86  using ParametersValueType = typename Superclass::ParametersValueType;
87  using FixedParametersType = typename Superclass::FixedParametersType;
88  using FixedParametersValueType = typename Superclass::FixedParametersValueType;
89 
90  using DisplacementFieldType = typename Superclass::DisplacementFieldType;
91  using DisplacementFieldPointer = typename Superclass::DisplacementFieldPointer;
92  using ConstantVelocityFieldType = typename Superclass::ConstantVelocityFieldType;
93  using ConstantVelocityFieldPointer = typename Superclass::ConstantVelocityFieldPointer;
94 
95  using DisplacementVectorType = typename DisplacementFieldType::PixelType;
96 
102  using SplineOrderType = unsigned int;
106  using ArrayValueType = typename ArrayType::ValueType;
107 
113  void UpdateTransformParameters( const DerivativeType & update, ScalarType factor = 1.0 ) override;
114 
118  virtual ConstantVelocityFieldPointer BSplineSmoothConstantVelocityField( const ConstantVelocityFieldType *, const ArrayType & );
119 
123  itkSetMacro( SplineOrder, SplineOrderType );
124  itkGetConstMacro( SplineOrder, SplineOrderType );
126 
134  itkSetMacro( NumberOfControlPointsForTheConstantVelocityField, ArrayType );
135  itkGetConstMacro( NumberOfControlPointsForTheConstantVelocityField, ArrayType );
137 
145  itkSetMacro( NumberOfControlPointsForTheUpdateField, ArrayType );
146  itkGetConstMacro( NumberOfControlPointsForTheUpdateField, ArrayType );
148 
155  void SetMeshSizeForTheConstantVelocityField( const ArrayType & );
156 
163  void SetMeshSizeForTheUpdateField( const ArrayType & );
164 
165 protected:
167  ~BSplineExponentialDiffeomorphicTransform() override = default;
168 
169  void PrintSelf( std::ostream &, Indent ) const override;
170 
171 private:
174 
175  SplineOrderType m_SplineOrder{ 3 };
176 };
177 
178 } // end namespace itk
179 
180 #ifndef ITK_MANUAL_INSTANTIATION
181 # include "itkBSplineExponentialDiffeomorphicTransform.hxx"
182 #endif
183 
184 #endif // itkBSplineExponentialDiffeomorphicTransform_h
Provides local/dense/high-dimensionality transformation via a a constant velocity field...
Light weight base class for most itk classes.
typename Superclass::ConstantVelocityFieldPointer ConstantVelocityFieldPointer
typename BSplineFilterType::WeightsContainerType WeightsContainerType
typename BSplineFilterType::WeightsContainerType WeightsContainerType
Exponential transform using B-splines as the smoothing kernel.
typename Superclass::ConstantVelocityFieldType ConstantVelocityFieldType
Class to hold and manage different parameter types used during optimization.
A superclass of the N-dimensional mesh structure; supports point (geometric coordinate and attribute)...
Definition: itkPointSet.h:84
typename Superclass::DisplacementFieldPointer DisplacementFieldPointer
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Class which takes a dense displacement field image and/or a set of points with associated displacemen...
TParametersValueType ParametersValueType