ITK  5.4.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  * 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 itkTimeVaryingBSplineVelocityFieldTransform_h
19 #define itkTimeVaryingBSplineVelocityFieldTransform_h
20 
22 
23 namespace itk
24 {
25 
67 template <typename TParametersValueType, unsigned int VDimension>
69  : public VelocityFieldTransform<TParametersValueType, VDimension>
70 {
71 public:
72  ITK_DISALLOW_COPY_AND_MOVE(TimeVaryingBSplineVelocityFieldTransform);
73 
79 
81  itkOverrideGetNameOfClassMacro(TimeVaryingBSplineVelocityFieldTransform);
82 
84  itkNewMacro(Self);
85 
87  using typename Superclass::InverseTransformBasePointer;
88 
90  using typename Superclass::InterpolatorType;
91  using VelocityFieldIntegratorType = typename Superclass::VelocityFieldInterpolatorType;
92 
94  using typename Superclass::DisplacementFieldType;
95  using typename Superclass::VelocityFieldType;
96 
98  using typename Superclass::ScalarType;
99 
101  using typename Superclass::ParametersType;
103  using typename Superclass::FixedParametersType;
105  using typename Superclass::NumberOfParametersType;
106 
108  using typename Superclass::DerivativeType;
109 
111  static constexpr unsigned int Dimension = VDimension;
112 
114  static constexpr unsigned int VelocityFieldDimension = VDimension + 1;
115 
118  using VelocityFieldSpacingType = typename VelocityFieldType::SpacingType;
120 
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);
164  itkSetMacro(VelocityFieldSpacing, VelocityFieldSpacingType);
165  itkGetConstMacro(VelocityFieldSpacing, VelocityFieldSpacingType);
169  itkSetMacro(VelocityFieldSize, VelocityFieldSizeType);
170  itkGetConstMacro(VelocityFieldSize, VelocityFieldSizeType);
174  itkSetMacro(VelocityFieldDirection, VelocityFieldDirectionType);
175  itkGetConstMacro(VelocityFieldDirection, VelocityFieldDirectionType);
179  itkSetMacro(SplineOrder, unsigned int);
180  itkGetConstMacro(SplineOrder, unsigned int);
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{};
191  bool m_TemporalPeriodicity{};
192 
193  VelocityFieldPointType m_VelocityFieldOrigin{};
194  VelocityFieldSpacingType m_VelocityFieldSpacing{};
195  VelocityFieldDirectionType m_VelocityFieldDirection{};
196  VelocityFieldSizeType m_VelocityFieldSize{};
197 };
198 
199 } // end namespace itk
200 
201 #ifndef ITK_MANUAL_INSTANTIATION
202 # include "itkTimeVaryingBSplineVelocityFieldTransform.hxx"
203 #endif
204 
205 #endif // itkTimeVaryingBSplineVelocityFieldTransform_h
Pointer
SmartPointer< Self > Pointer
Definition: itkAddImageFilter.h:93
itk::TimeVaryingBSplineVelocityFieldTransform::DisplacementVectorType
typename DisplacementFieldType::PixelType DisplacementVectorType
Definition: itkTimeVaryingBSplineVelocityFieldTransform.h:124
itk::GTest::TypedefsAndConstructors::Dimension2::DirectionType
ImageBaseType::DirectionType DirectionType
Definition: itkGTestTypedefsAndConstructors.h:52
itk::TimeVaryingBSplineVelocityFieldTransform::DisplacementFieldSpacingType
typename DisplacementFieldType::SpacingType DisplacementFieldSpacingType
Definition: itkTimeVaryingBSplineVelocityFieldTransform.h:126
itk::GTest::TypedefsAndConstructors::Dimension2::PointType
ImageBaseType::PointType PointType
Definition: itkGTestTypedefsAndConstructors.h:51
itk::Vector< SpacingValueType, VImageDimension >
itk::TimeVaryingBSplineVelocityFieldTransform::VelocityFieldSizeType
typename VelocityFieldType::SizeType VelocityFieldSizeType
Definition: itkTimeVaryingBSplineVelocityFieldTransform.h:117
itk::GTest::TypedefsAndConstructors::Dimension2::SizeType
ImageBaseType::SizeType SizeType
Definition: itkGTestTypedefsAndConstructors.h:49
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::TimeVaryingBSplineVelocityFieldTransform::GetTimeVaryingVelocityFieldControlPointLattice
VelocityFieldType * GetTimeVaryingVelocityFieldControlPointLattice()
Definition: itkTimeVaryingBSplineVelocityFieldTransform.h:132
itk::TimeVaryingBSplineVelocityFieldTransform
Integrate a time-varying velocity field represented by a B-spline control point lattice.
Definition: itkTimeVaryingBSplineVelocityFieldTransform.h:68
itk::TimeVaryingBSplineVelocityFieldTransform::VelocityFieldPointType
typename VelocityFieldType::PointType VelocityFieldPointType
Definition: itkTimeVaryingBSplineVelocityFieldTransform.h:116
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:55
itk::TimeVaryingBSplineVelocityFieldTransform::VelocityFieldSpacingType
typename VelocityFieldType::SpacingType VelocityFieldSpacingType
Definition: itkTimeVaryingBSplineVelocityFieldTransform.h:118
itk::VelocityFieldTransform
Provides local/dense/high-dimensionality transformation via a a velocity field.
Definition: itkVelocityFieldTransform.h:36
itk::TimeVaryingBSplineVelocityFieldTransform::SetTimeVaryingVelocityFieldControlPointLattice
virtual void SetTimeVaryingVelocityFieldControlPointLattice(VelocityFieldType *fieldLattice)
Definition: itkTimeVaryingBSplineVelocityFieldTransform.h:139
itkVelocityFieldTransform.h
itk::Image::PixelType
TPixel PixelType
Definition: itkImage.h:108
itk::TransformBaseTemplate::FixedParametersValueType
double FixedParametersValueType
Definition: itkTransformBase.h:83
itk::TimeVaryingBSplineVelocityFieldTransform::DisplacementFieldPointType
typename DisplacementFieldType::PointType DisplacementFieldPointType
Definition: itkTimeVaryingBSplineVelocityFieldTransform.h:127
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::TimeVaryingBSplineVelocityFieldTransform::DisplacementFieldSizeType
typename DisplacementFieldType::SizeType DisplacementFieldSizeType
Definition: itkTimeVaryingBSplineVelocityFieldTransform.h:125
itk::TimeVaryingBSplineVelocityFieldTransform::VelocityFieldDirectionType
typename VelocityFieldType::DirectionType VelocityFieldDirectionType
Definition: itkTimeVaryingBSplineVelocityFieldTransform.h:119
itk::TransformBaseTemplate::ParametersValueType
TParametersValueType ParametersValueType
Definition: itkTransformBase.h:81
itk::Image
Templated n-dimensional image class.
Definition: itkImage.h:88
itk::GTest::TypedefsAndConstructors::Dimension2::Dimension
constexpr unsigned int Dimension
Definition: itkGTestTypedefsAndConstructors.h:44
itk::TimeVaryingBSplineVelocityFieldTransform::VelocityFieldIntegratorType
typename Superclass::VelocityFieldInterpolatorType VelocityFieldIntegratorType
Definition: itkTimeVaryingBSplineVelocityFieldTransform.h:91
itk::TimeVaryingBSplineVelocityFieldTransform::DisplacementFieldDirectionType
typename DisplacementFieldType::DirectionType DisplacementFieldDirectionType
Definition: itkTimeVaryingBSplineVelocityFieldTransform.h:128