ITK  5.4.0
Insight Toolkit
itkVelocityFieldTransform.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 itkVelocityFieldTransform_h
19#define itkVelocityFieldTransform_h
20
22
23namespace itk
24{
25
35template <typename TParametersValueType, unsigned int VDimension>
36class ITK_TEMPLATE_EXPORT VelocityFieldTransform : public DisplacementFieldTransform<TParametersValueType, VDimension>
37{
38public:
39 ITK_DISALLOW_COPY_AND_MOVE(VelocityFieldTransform);
40
46
48 itkOverrideGetNameOfClassMacro(VelocityFieldTransform);
49
51 itkNewMacro(Self);
52
54 using typename Superclass::InverseTransformBasePointer;
55
57 using typename Superclass::ScalarType;
58
60 using typename Superclass::FixedParametersType;
61 using typename Superclass::FixedParametersValueType;
62 using typename Superclass::ParametersType;
63 using typename Superclass::ParametersValueType;
64
66 using typename Superclass::TransformCategoryEnum;
67
69 using typename Superclass::NumberOfParametersType;
70
72 using typename Superclass::InputPointType;
73 using typename Superclass::OutputPointType;
74
76 using typename Superclass::InputVectorType;
77 using typename Superclass::OutputVectorType;
78
79 using typename Superclass::InputVectorPixelType;
80 using typename Superclass::OutputVectorPixelType;
81
83 using typename Superclass::DerivativeType;
84
86 static constexpr unsigned int VelocityFieldDimension = VDimension + 1;
87
89 static constexpr unsigned int Dimension = VDimension;
90
92 using typename Superclass::DisplacementFieldType;
94
96 using typename Superclass::VectorImageDisplacementFieldType;
97
101
110
113
117
118 using Superclass::SetDisplacementField;
119
124 virtual void
126 itkGetModifiableObjectMacro(VelocityField, VelocityFieldType);
129 void
131
134 virtual void
136 itkGetModifiableObjectMacro(VelocityFieldInterpolator, VelocityFieldInterpolatorType);
140 itkGetConstReferenceMacro(VelocityFieldSetTime, unsigned long);
141
147 void
148 SetDisplacementField(DisplacementFieldType * displacementField) override
149 {
150 itkDebugMacro("setting DisplacementField to " << displacementField);
151 if (this->m_DisplacementField != displacementField)
152 {
153 this->m_DisplacementField = displacementField;
154 this->Modified();
155 }
156 }
159 void
160 UpdateTransformParameters(const DerivativeType & update, ScalarType factor = 1.0) override;
161
163 bool
164 GetInverse(Self * inverse) const;
165
168 GetInverseTransform() const override;
169
171 virtual void
173
178 itkSetClampMacro(LowerTimeBound, ScalarType, 0.0, 1.0);
179
184 itkGetConstMacro(LowerTimeBound, ScalarType);
185
190 itkSetClampMacro(UpperTimeBound, ScalarType, 0.0, 1.0);
191
196 itkGetConstMacro(UpperTimeBound, ScalarType);
197
201 itkSetMacro(NumberOfIntegrationSteps, unsigned int);
202
206 itkGetConstMacro(NumberOfIntegrationSteps, unsigned int);
207
208protected:
210 ~VelocityFieldTransform() override = default;
211 void
212 PrintSelf(std::ostream & os, Indent indent) const override;
213
215 typename LightObject::Pointer
216 InternalClone() const override;
217
220
221 ScalarType m_LowerTimeBound{};
222 ScalarType m_UpperTimeBound{};
223
224 unsigned int m_NumberOfIntegrationSteps{};
225
226 VelocityFieldPointer m_VelocityField{};
227
229 typename VelocityFieldInterpolatorType::Pointer m_VelocityFieldInterpolator{};
230
233 unsigned long m_VelocityFieldSetTime{};
234
235private:
240 virtual void
242};
243} // end namespace itk
244
245#ifndef ITK_MANUAL_INSTANTIATION
246# include "itkVelocityFieldTransform.hxx"
247#endif
248
249#endif // itkVelocityFieldTransform_h
Array class with size defined at construction time.
Definition: itkArray.h:48
Provides local/dense/high-dimensionality transformation via a a displacement field.
typename DisplacementFieldType::SpacingType SpacingType
typename DisplacementFieldType::PixelType PixelType
typename DisplacementFieldType::IndexType IndexType
typename DisplacementFieldType::Pointer DisplacementFieldPointer
typename DisplacementFieldType::RegionType RegionType
typename DisplacementFieldType::DirectionType DirectionType
typename DisplacementFieldType::PointType PointType
typename DisplacementFieldType::SizeType SizeType
Class to hold and manage parameters of type Image<Vector<...>,...>, used in Transforms,...
Templated n-dimensional image class.
Definition: itkImage.h:89
TPixel PixelType
Definition: itkImage.h:108
Control indentation during Print() invocation.
Definition: itkIndent.h:50
Light weight base class for most itk classes.
Class to hold and manage different parameter types used during optimization.
typename InverseTransformBaseType::Pointer InverseTransformBasePointer
Definition: itkTransform.h:181
Base class for all vector image interpolators.
Provides local/dense/high-dimensionality transformation via a a velocity field.
typename VelocityFieldInterpolatorType::Pointer VelocityFieldInterpolatorPointer
void SetFixedParameters(const FixedParametersType &) override
~VelocityFieldTransform() override=default
typename VelocityFieldType::Pointer VelocityFieldPointer
DisplacementFieldType::Pointer CopyDisplacementField(const DisplacementFieldType *) const
void SetDisplacementField(DisplacementFieldType *displacementField) override
bool GetInverse(Self *inverse) const
virtual void SetFixedParametersFromVelocityField() const
void PrintSelf(std::ostream &os, Indent indent) const override
void UpdateTransformParameters(const DerivativeType &update, ScalarType factor=1.0) override
virtual void SetVelocityField(VelocityFieldType *)
InverseTransformBasePointer GetInverseTransform() const override
LightObject::Pointer InternalClone() const override
virtual void SetVelocityFieldInterpolator(VelocityFieldInterpolatorType *)
SmartPointer< Self > Pointer
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....