ITK  6.0.0
Insight Toolkit
itkBSplineSmoothingOnUpdateDisplacementFieldTransform.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright NumFOCUS
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  * https://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 VDimension>
53  : public DisplacementFieldTransform<TParametersValueType, VDimension>
54 {
55 public:
56  ITK_DISALLOW_COPY_AND_MOVE(BSplineSmoothingOnUpdateDisplacementFieldTransform);
57 
63 
65  itkOverrideGetNameOfClassMacro(BSplineSmoothingOnUpdateDisplacementFieldTransform);
66 
68  itkNewMacro(Self);
69 
71  static constexpr unsigned int Dimension = VDimension;
72 
74  using typename Superclass::ScalarType;
75  using typename Superclass::DerivativeType;
77  using typename Superclass::DisplacementFieldType;
80 
82 
89  using SplineOrderType = unsigned int;
94  using ArrayValueType = typename ArrayType::ValueType;
95 
106  void
107  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
144  SetMeshSizeForTheUpdateField(const ArrayType &);
145 
153  itkSetMacro(NumberOfControlPointsForTheTotalField, ArrayType);
154 
162  itkGetConstMacro(NumberOfControlPointsForTheTotalField, ArrayType);
163 
170  void
171  SetMeshSizeForTheTotalField(const ArrayType &);
172 
176  itkBooleanMacro(EnforceStationaryBoundary);
177  itkSetMacro(EnforceStationaryBoundary, bool);
178  itkGetConstMacro(EnforceStationaryBoundary, bool);
181 protected:
184 
185  void
186  PrintSelf(std::ostream & os, Indent indent) const override;
187 
189  typename LightObject::Pointer
190  InternalClone() const override;
191 
197  BSplineSmoothDisplacementField(const DisplacementFieldType *, const ArrayType &);
198 
199 private:
200  SplineOrderType m_SplineOrder{ 3 };
201  bool m_EnforceStationaryBoundary{ true };
202  ArrayType m_NumberOfControlPointsForTheUpdateField{};
203  ArrayType m_NumberOfControlPointsForTheTotalField{};
204 };
205 
206 } // end namespace itk
207 
208 #ifndef ITK_MANUAL_INSTANTIATION
209 # include "itkBSplineSmoothingOnUpdateDisplacementFieldTransform.hxx"
210 #endif
211 
212 #endif // itkBSplineSmoothingOnUpdateDisplacementFieldTransform_h
itkDisplacementFieldTransform.h
itk::PointSet
A superclass of the N-dimensional mesh structure; supports point (geometric coordinate and attribute)...
Definition: itkPointSet.h:81
itk::BSplineSmoothingOnUpdateDisplacementFieldTransform::TransformPointer
typename Transform< TParametersValueType, VDimension, VDimension >::Pointer TransformPointer
Definition: itkBSplineSmoothingOnUpdateDisplacementFieldTransform.h:81
itk::BSplineSmoothingOnUpdateDisplacementFieldTransform
Representation of a smooth deformation field with B-splines.
Definition: itkBSplineSmoothingOnUpdateDisplacementFieldTransform.h:52
itk::DisplacementFieldToBSplineImageFilter
Class which takes a dense displacement field image and/or a set of points with associated displacemen...
Definition: itkDisplacementFieldToBSplineImageFilter.h:44
itk::DisplacementFieldTransform::DisplacementFieldPointer
typename DisplacementFieldType::Pointer DisplacementFieldPointer
Definition: itkDisplacementFieldTransform.h:163
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::BSplineSmoothingOnUpdateDisplacementFieldTransform::ArrayValueType
typename ArrayType::ValueType ArrayValueType
Definition: itkBSplineSmoothingOnUpdateDisplacementFieldTransform.h:94
itk::DisplacementFieldTransform
Provides local/dense/high-dimensionality transformation via a a displacement field.
Definition: itkDisplacementFieldTransform.h:87
itk::BSplineSmoothingOnUpdateDisplacementFieldTransform::WeightsContainerType
typename BSplineFilterType::WeightsContainerType WeightsContainerType
Definition: itkBSplineSmoothingOnUpdateDisplacementFieldTransform.h:91
itk::DisplacementFieldTransform::DisplacementFieldConstPointer
typename DisplacementFieldType::ConstPointer DisplacementFieldConstPointer
Definition: itkDisplacementFieldTransform.h:164
itk::BSplineSmoothingOnUpdateDisplacementFieldTransform::DerivativeValueType
typename DerivativeType::ValueType DerivativeValueType
Definition: itkBSplineSmoothingOnUpdateDisplacementFieldTransform.h:76
itk::Transform< TParametersValueType, VDimension, VDimension >::ScalarType
ParametersValueType ScalarType
Definition: itkTransform.h:127
itk::Image::PixelType
TPixel PixelType
Definition: itkImage.h:108
itk::DisplacementFieldToBSplineImageFilter::WeightsContainerType
typename BSplineFilterType::WeightsContainerType WeightsContainerType
Definition: itkDisplacementFieldToBSplineImageFilter.h:93
itk::BSplineSmoothingOnUpdateDisplacementFieldTransform::DisplacementVectorType
typename DisplacementFieldType::PixelType DisplacementVectorType
Definition: itkBSplineSmoothingOnUpdateDisplacementFieldTransform.h:87
itk::Array::ValueType
TValue ValueType
Definition: itkArray.h:52
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnatomicalOrientation.h:29
itkDisplacementFieldToBSplineImageFilter.h
itk::Array
Array class with size defined at construction time.
Definition: itkArray.h:47
itk::DisplacementFieldToBSplineImageFilter::ArrayType
typename BSplineFilterType::ArrayType ArrayType
Definition: itkDisplacementFieldToBSplineImageFilter.h:95
itk::Image
Templated n-dimensional image class.
Definition: itkImage.h:88
itk::Transform
Transform points and vectors from an input space to an output space.
Definition: itkTransform.h:83
itkPointSet.h
itk::GTest::TypedefsAndConstructors::Dimension2::Dimension
constexpr unsigned int Dimension
Definition: itkGTestTypedefsAndConstructors.h:44
itk::BSplineSmoothingOnUpdateDisplacementFieldTransform::SplineOrderType
unsigned int SplineOrderType
Definition: itkBSplineSmoothingOnUpdateDisplacementFieldTransform.h:89
itk::BSplineSmoothingOnUpdateDisplacementFieldTransform::ArrayType
typename BSplineFilterType::ArrayType ArrayType
Definition: itkBSplineSmoothingOnUpdateDisplacementFieldTransform.h:93