ITK  5.2.0
Insight Toolkit
itkTimeVaryingBSplineVelocityFieldTransform.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  * 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>
69  : public VelocityFieldTransform<TParametersValueType, NDimensions>
70 {
71 public:
72  ITK_DISALLOW_COPY_AND_MOVE(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 
133  {
134  return this->GetModifiableVelocityField();
135  }
136 
138  virtual void
140  {
141  this->SetVelocityField(fieldLattice);
142  }
143 
151  void
152  UpdateTransformParameters(const DerivativeType & update, ScalarType factor = 1.0) override;
153 
155  void
156  IntegrateVelocityField() override;
157 
159  itkSetMacro(VelocityFieldOrigin, VelocityFieldPointType);
160  itkGetConstMacro(VelocityFieldOrigin, VelocityFieldPointType);
162 
164  itkSetMacro(VelocityFieldSpacing, VelocityFieldSpacingType);
165  itkGetConstMacro(VelocityFieldSpacing, VelocityFieldSpacingType);
167 
169  itkSetMacro(VelocityFieldSize, VelocityFieldSizeType);
170  itkGetConstMacro(VelocityFieldSize, VelocityFieldSizeType);
172 
174  itkSetMacro(VelocityFieldDirection, VelocityFieldDirectionType);
175  itkGetConstMacro(VelocityFieldDirection, VelocityFieldDirectionType);
177 
179  itkSetMacro(SplineOrder, unsigned int);
180  itkGetConstMacro(SplineOrder, unsigned int);
182 
183 protected:
185  ~TimeVaryingBSplineVelocityFieldTransform() override = default;
186  void
187  PrintSelf(std::ostream & os, Indent indent) const override;
188 
189 private:
190  unsigned int m_SplineOrder;
192 
197 };
198 
199 } // end namespace itk
200 
201 #ifndef ITK_MANUAL_INSTANTIATION
202 # include "itkTimeVaryingBSplineVelocityFieldTransform.hxx"
203 #endif
204 
205 #endif // itkTimeVaryingBSplineVelocityFieldTransform_h
itk::OptimizerParameters
Class to hold and manage different parameter types used during optimization.
Definition: itkOptimizerParameters.h:36
itk::TimeVaryingBSplineVelocityFieldTransform::VelocityFieldPointType
typename VelocityFieldType::PointType VelocityFieldPointType
Definition: itkTimeVaryingBSplineVelocityFieldTransform.h:116
itk::TimeVaryingBSplineVelocityFieldTransform::DisplacementFieldPointType
typename DisplacementFieldType::PointType DisplacementFieldPointType
Definition: itkTimeVaryingBSplineVelocityFieldTransform.h:127
itk::TimeVaryingBSplineVelocityFieldTransform::DisplacementFieldDirectionType
typename DisplacementFieldType::DirectionType DisplacementFieldDirectionType
Definition: itkTimeVaryingBSplineVelocityFieldTransform.h:128
itk::TimeVaryingBSplineVelocityFieldTransform::m_VelocityFieldDirection
VelocityFieldDirectionType m_VelocityFieldDirection
Definition: itkTimeVaryingBSplineVelocityFieldTransform.h:195
itk::GTest::TypedefsAndConstructors::Dimension2::DirectionType
ImageBaseType::DirectionType DirectionType
Definition: itkGTestTypedefsAndConstructors.h:52
itk::TimeVaryingBSplineVelocityFieldTransform::DisplacementVectorType
typename DisplacementFieldType::PixelType DisplacementVectorType
Definition: itkTimeVaryingBSplineVelocityFieldTransform.h:124
itk::TimeVaryingBSplineVelocityFieldTransform::SetTimeVaryingVelocityFieldControlPointLattice
virtual void SetTimeVaryingVelocityFieldControlPointLattice(VelocityFieldType *fieldLattice)
Definition: itkTimeVaryingBSplineVelocityFieldTransform.h:139
itk::TimeVaryingBSplineVelocityFieldTransform::m_TemporalPeriodicity
bool m_TemporalPeriodicity
Definition: itkTimeVaryingBSplineVelocityFieldTransform.h:191
itk::GTest::TypedefsAndConstructors::Dimension2::PointType
ImageBaseType::PointType PointType
Definition: itkGTestTypedefsAndConstructors.h:51
itk::GTest::TypedefsAndConstructors::Dimension2::SizeType
ImageBaseType::SizeType SizeType
Definition: itkGTestTypedefsAndConstructors.h:49
itk::TimeVaryingBSplineVelocityFieldTransform::DisplacementFieldSpacingType
typename DisplacementFieldType::SpacingType DisplacementFieldSpacingType
Definition: itkTimeVaryingBSplineVelocityFieldTransform.h:126
itk::OptimizerParameters::ValueType
TParametersValueType ValueType
Definition: itkOptimizerParameters.h:40
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::TimeVaryingBSplineVelocityFieldTransform::TimeVaryingVelocityFieldControlPointLatticePointer
typename VelocityFieldType::Pointer TimeVaryingVelocityFieldControlPointLatticePointer
Definition: itkTimeVaryingBSplineVelocityFieldTransform.h:122
itk::VectorInterpolateImageFunction
Base class for all vector image interpolators.
Definition: itkVectorInterpolateImageFunction.h:47
itk::TimeVaryingBSplineVelocityFieldTransform::m_VelocityFieldOrigin
VelocityFieldPointType m_VelocityFieldOrigin
Definition: itkTimeVaryingBSplineVelocityFieldTransform.h:193
itk::TimeVaryingBSplineVelocityFieldTransform::DisplacementFieldSizeType
typename DisplacementFieldType::SizeType DisplacementFieldSizeType
Definition: itkTimeVaryingBSplineVelocityFieldTransform.h:125
itk::TimeVaryingBSplineVelocityFieldTransform::VelocityFieldDirectionType
typename VelocityFieldType::DirectionType VelocityFieldDirectionType
Definition: itkTimeVaryingBSplineVelocityFieldTransform.h:119
itk::TimeVaryingBSplineVelocityFieldTransform
Integrate a time-varying velocity field represented by a B-spline control point lattice.
Definition: itkTimeVaryingBSplineVelocityFieldTransform.h:68
itk::DisplacementFieldTransform::DerivativeType
typename Superclass::DerivativeType DerivativeType
Definition: itkDisplacementFieldTransform.h:154
itk::DisplacementFieldTransform::ScalarType
typename Superclass::ScalarType ScalarType
Definition: itkDisplacementFieldTransform.h:107
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:59
itk::TimeVaryingBSplineVelocityFieldTransform::m_VelocityFieldSize
VelocityFieldSizeType m_VelocityFieldSize
Definition: itkTimeVaryingBSplineVelocityFieldTransform.h:196
itk::TimeVaryingBSplineVelocityFieldTransform::m_VelocityFieldSpacing
VelocityFieldSpacingType m_VelocityFieldSpacing
Definition: itkTimeVaryingBSplineVelocityFieldTransform.h:194
itk::TimeVaryingBSplineVelocityFieldTransform::GetTimeVaryingVelocityFieldControlPointLattice
VelocityFieldType * GetTimeVaryingVelocityFieldControlPointLattice()
Definition: itkTimeVaryingBSplineVelocityFieldTransform.h:132
itk::TimeVaryingBSplineVelocityFieldTransform::VelocityFieldType
typename Superclass::VelocityFieldType VelocityFieldType
Definition: itkTimeVaryingBSplineVelocityFieldTransform.h:95
itk::VelocityFieldTransform
Provides local/dense/high-dimensionality transformation via a a velocity field.
Definition: itkVelocityFieldTransform.h:36
itkVelocityFieldTransform.h
itk::Image::PixelType
TPixel PixelType
Definition: itkImage.h:106
itk::TransformBaseTemplate::FixedParametersValueType
double FixedParametersValueType
Definition: itkTransformBase.h:83
itk::Image::SpacingType
typename Superclass::SpacingType SpacingType
Definition: itkImage.h:154
itk::TimeVaryingBSplineVelocityFieldTransform::VelocityFieldIntegratorType
typename Superclass::VelocityFieldInterpolatorType VelocityFieldIntegratorType
Definition: itkTimeVaryingBSplineVelocityFieldTransform.h:91
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::TimeVaryingBSplineVelocityFieldTransform::VelocityFieldSpacingType
typename VelocityFieldType::SpacingType VelocityFieldSpacingType
Definition: itkTimeVaryingBSplineVelocityFieldTransform.h:118
itk::DisplacementFieldTransform::InverseTransformBasePointer
typename Superclass::InverseTransformBasePointer InverseTransformBasePointer
Definition: itkDisplacementFieldTransform.h:104
itk::TransformBaseTemplate::ParametersValueType
TParametersValueType ParametersValueType
Definition: itkTransformBase.h:81
itk::Image
Templated n-dimensional image class.
Definition: itkImage.h:86
itk::TransformBaseTemplate::NumberOfParametersType
IdentifierType NumberOfParametersType
Definition: itkTransformBase.h:91
itk::GTest::TypedefsAndConstructors::Dimension2::Dimension
constexpr unsigned int Dimension
Definition: itkGTestTypedefsAndConstructors.h:44
itk::TimeVaryingBSplineVelocityFieldTransform::TimeVaryingVelocityFieldControlPointLatticeType
VelocityFieldType TimeVaryingVelocityFieldControlPointLatticeType
Definition: itkTimeVaryingBSplineVelocityFieldTransform.h:121
itk::TimeVaryingBSplineVelocityFieldTransform::VelocityFieldSizeType
typename VelocityFieldType::SizeType VelocityFieldSizeType
Definition: itkTimeVaryingBSplineVelocityFieldTransform.h:117
itk::TimeVaryingBSplineVelocityFieldTransform::m_SplineOrder
unsigned int m_SplineOrder
Definition: itkTimeVaryingBSplineVelocityFieldTransform.h:190