ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkTimeVaryingBSplineVelocityFieldTransform.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 itkTimeVaryingBSplineVelocityFieldTransform_h
19 #define itkTimeVaryingBSplineVelocityFieldTransform_h
20 
22 
23 namespace itk
24 {
25 
67 template<typename TParametersValueType, unsigned int NDimensions>
68 class ITK_TEMPLATE_EXPORT TimeVaryingBSplineVelocityFieldTransform :
69  public VelocityFieldTransform<TParametersValueType, NDimensions>
70 {
71 public:
72  ITK_DISALLOW_COPY_AND_ASSIGN(TimeVaryingBSplineVelocityFieldTransform);
73 
79 
82 
84  itkNewMacro( Self );
85 
87  using InverseTransformBasePointer = typename Superclass::InverseTransformBasePointer;
88 
90  using InterpolatorType = typename Superclass::InterpolatorType;
91  using VelocityFieldIntegratorType = typename Superclass::VelocityFieldInterpolatorType;
92 
94  using DisplacementFieldType = typename Superclass::DisplacementFieldType;
95  using VelocityFieldType = typename Superclass::VelocityFieldType;
96 
98  using ScalarType = typename Superclass::ScalarType;
99 
101  using ParametersType = typename Superclass::ParametersType;
103  using FixedParametersType = typename Superclass::FixedParametersType;
105  using NumberOfParametersType = typename Superclass::NumberOfParametersType;
106 
108  using DerivativeType = typename Superclass::DerivativeType;
109 
111  static constexpr unsigned int Dimension = NDimensions;
112 
114  static constexpr unsigned int VelocityFieldDimension = NDimensions + 1;
115 
118  using VelocityFieldSpacingType = typename VelocityFieldType::SpacingType;
120 
122  using TimeVaryingVelocityFieldControlPointLatticePointer = typename VelocityFieldType::Pointer;
123 
129 
132  {
133  return this->GetModifiableVelocityField();
134  }
135 
138  {
139  this->SetVelocityField( fieldLattice );
140  }
141 
149  void UpdateTransformParameters( const DerivativeType & update, ScalarType factor = 1.0 ) override;
150 
152  void IntegrateVelocityField() override;
153 
155  itkSetMacro( VelocityFieldOrigin, VelocityFieldPointType );
156  itkGetConstMacro( VelocityFieldOrigin, VelocityFieldPointType );
158 
160  itkSetMacro( VelocityFieldSpacing, VelocityFieldSpacingType );
161  itkGetConstMacro( VelocityFieldSpacing, VelocityFieldSpacingType );
163 
165  itkSetMacro( VelocityFieldSize, VelocityFieldSizeType );
166  itkGetConstMacro( VelocityFieldSize, VelocityFieldSizeType );
168 
170  itkSetMacro( VelocityFieldDirection, VelocityFieldDirectionType );
171  itkGetConstMacro( VelocityFieldDirection, VelocityFieldDirectionType );
173 
175  itkSetMacro( SplineOrder, unsigned int );
176  itkGetConstMacro( SplineOrder, unsigned int );
178 
179 protected:
181  ~TimeVaryingBSplineVelocityFieldTransform() override = default;
182  void PrintSelf( std::ostream& os, Indent indent ) const override;
183 
184 private:
185  unsigned int m_SplineOrder;
187 
192 };
193 
194 } // end namespace itk
195 
196 #ifndef ITK_MANUAL_INSTANTIATION
197 # include "itkTimeVaryingBSplineVelocityFieldTransform.hxx"
198 #endif
199 
200 #endif // itkTimeVaryingBSplineVelocityFieldTransform_h
TPixel PixelType
Definition: itkImage.h:95
Light weight base class for most itk classes.
virtual void SetTimeVaryingVelocityFieldControlPointLattice(VelocityFieldType *fieldLattice)
Integrate a time-varying velocity field represented by a B-spline control point lattice.
typename Superclass::InverseTransformBasePointer InverseTransformBasePointer
Class to hold and manage different parameter types used during optimization.
typename Superclass::SpacingType SpacingType
Definition: itkImage.h:143
typename Superclass::DerivativeType DerivativeType
TParametersValueType ValueType
IdentifierType NumberOfParametersType
typename VelocityFieldType::Pointer TimeVaryingVelocityFieldControlPointLatticePointer
Control indentation during Print() invocation.
Definition: itkIndent.h:49
typename DisplacementFieldType::SpacingType DisplacementFieldSpacingType
Base class for all vector image interpolaters.
typename Superclass::ScalarType ScalarType
typename DisplacementFieldType::DirectionType DisplacementFieldDirectionType
Templated n-dimensional image class.
Definition: itkImage.h:75
Provides local/dense/high-dimensionality transformation via a a velocity field.
typename Superclass::VelocityFieldInterpolatorType VelocityFieldIntegratorType
TParametersValueType ParametersValueType