ITK  4.13.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:
61 
64 
66  itkNewMacro( Self );
67 
69  itkStaticConstMacro( Dimension, unsigned int, NDimensions );
70 
72  typedef typename Superclass::ScalarType ScalarType;
73  typedef typename Superclass::DerivativeType DerivativeType;
74  typedef typename DerivativeType::ValueType DerivativeValueType;
75  typedef typename Superclass::DisplacementFieldType DisplacementFieldType;
76  typedef typename Superclass::DisplacementFieldPointer DisplacementFieldPointer;
77  typedef typename Superclass::DisplacementFieldConstPointer DisplacementFieldConstPointer;
78 
81 
86  typedef typename DisplacementFieldType::PixelType DisplacementVectorType;
88  typedef unsigned int SplineOrderType;
94 
105  virtual void UpdateTransformParameters( const DerivativeType & update, ScalarType factor = 1.0 ) ITK_OVERRIDE;
106 
110  itkSetMacro( SplineOrder, SplineOrderType );
111 
115  itkGetConstMacro( SplineOrder, SplineOrderType );
116 
124  itkSetMacro( NumberOfControlPointsForTheUpdateField, ArrayType );
125 
133  itkGetConstMacro( NumberOfControlPointsForTheUpdateField, ArrayType );
134 
141  void SetMeshSizeForTheUpdateField( const ArrayType & );
142 
150  itkSetMacro( NumberOfControlPointsForTheTotalField, ArrayType );
151 
159  itkGetConstMacro( NumberOfControlPointsForTheTotalField, ArrayType );
160 
167  void SetMeshSizeForTheTotalField( const ArrayType & );
168 
172  itkBooleanMacro( EnforceStationaryBoundary );
173  itkSetMacro( EnforceStationaryBoundary, bool );
174  itkGetConstMacro( EnforceStationaryBoundary, bool );
176 
177 protected:
179  virtual ~BSplineSmoothingOnUpdateDisplacementFieldTransform() ITK_OVERRIDE;
180 
181  void PrintSelf( std::ostream& os, Indent indent ) const ITK_OVERRIDE;
182 
184  virtual typename LightObject::Pointer InternalClone() const ITK_OVERRIDE;
185 
189  DisplacementFieldPointer BSplineSmoothDisplacementField( const DisplacementFieldType *, const ArrayType & );
190 
191 private:
192  ITK_DISALLOW_COPY_AND_ASSIGN(BSplineSmoothingOnUpdateDisplacementFieldTransform);
193 
194  SplineOrderType m_SplineOrder;
195  bool m_EnforceStationaryBoundary;
196  ArrayType m_NumberOfControlPointsForTheUpdateField;
197  ArrayType m_NumberOfControlPointsForTheTotalField;
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.
DisplacementFieldToBSplineImageFilter< DisplacementFieldType > BSplineFilterType
Transform points and vectors from an input space to an output space.
Definition: itkTransform.h:82
A superclass of the N-dimensional mesh structure; supports point (geometric coordinate and attribute)...
Definition: itkPointSet.h:84
DisplacementFieldTransform< TParametersValueType, NDimensions > Superclass
Define a front-end to the STL &quot;vector&quot; container that conforms to the IndexedContainerInterface.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Transform< TParametersValueType, NDimensions, NDimensions >::Pointer TransformPointer
Class which takes a dense displacement field image and/or a set of points with associated displacemen...