ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkBSplineSmoothingOnUpdateDisplacementFieldTransform.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 itkBSplineSmoothingOnUpdateDisplacementFieldTransform_h
19 #define itkBSplineSmoothingOnUpdateDisplacementFieldTransform_h
20 
22 
24 #include "itkPointSet.h"
25 
26 namespace itk
27 {
28 
51 template<typename TParametersValueType, unsigned int NDimensions>
53  public DisplacementFieldTransform<TParametersValueType, NDimensions>
54 {
55 public:
56  ITK_DISALLOW_COPY_AND_ASSIGN(BSplineSmoothingOnUpdateDisplacementFieldTransform);
57 
63 
66 
68  itkNewMacro( Self );
69 
71  static constexpr unsigned int Dimension = NDimensions;
72 
74  using ScalarType = typename Superclass::ScalarType;
75  using DerivativeType = typename Superclass::DerivativeType;
76  using DerivativeValueType = typename DerivativeType::ValueType;
77  using DisplacementFieldType = typename Superclass::DisplacementFieldType;
78  using DisplacementFieldPointer = typename Superclass::DisplacementFieldPointer;
79  using DisplacementFieldConstPointer = typename Superclass::DisplacementFieldConstPointer;
80 
81  using TransformPointer =
83 
88  using DisplacementVectorType = typename DisplacementFieldType::PixelType;
90  using SplineOrderType = unsigned int;
95  using ArrayValueType = typename ArrayType::ValueType;
96 
107  void UpdateTransformParameters( const DerivativeType & update, ScalarType factor = 1.0 ) override;
108 
112  itkSetMacro( SplineOrder, SplineOrderType );
113 
117  itkGetConstMacro( SplineOrder, SplineOrderType );
118 
126  itkSetMacro( NumberOfControlPointsForTheUpdateField, ArrayType );
127 
135  itkGetConstMacro( NumberOfControlPointsForTheUpdateField, ArrayType );
136 
143  void SetMeshSizeForTheUpdateField( const ArrayType & );
144 
152  itkSetMacro( NumberOfControlPointsForTheTotalField, ArrayType );
153 
161  itkGetConstMacro( NumberOfControlPointsForTheTotalField, ArrayType );
162 
169  void SetMeshSizeForTheTotalField( const ArrayType & );
170 
174  itkBooleanMacro( EnforceStationaryBoundary );
175  itkSetMacro( EnforceStationaryBoundary, bool );
176  itkGetConstMacro( EnforceStationaryBoundary, bool );
178 
179 protected:
182 
183  void PrintSelf( std::ostream& os, Indent indent ) const override;
184 
186  typename LightObject::Pointer InternalClone() const override;
187 
191  DisplacementFieldPointer BSplineSmoothDisplacementField( const DisplacementFieldType *, const ArrayType & );
192 
193 private:
194  SplineOrderType m_SplineOrder{ 3 };
195  bool m_EnforceStationaryBoundary{ true };
198 };
199 
200 } // end namespace itk
201 
202 #ifndef ITK_MANUAL_INSTANTIATION
203 # include "itkBSplineSmoothingOnUpdateDisplacementFieldTransform.hxx"
204 #endif
205 
206 #endif // itkBSplineSmoothingOnUpdateDisplacementFieldTransform_h
Light weight base class for most itk classes.
Provides local/dense/high-dimensionaltiy transformation via a a displacement field.
typename BSplineFilterType::WeightsContainerType WeightsContainerType
Transform points and vectors from an input space to an output space.
Definition: itkTransform.h:83
A superclass of the N-dimensional mesh structure; supports point (geometric coordinate and attribute)...
Definition: itkPointSet.h:84
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...
typename Transform< TParametersValueType, NDimensions, NDimensions >::Pointer TransformPointer