ITK  6.0.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 {}
174
179 itkSetClampMacro(LowerTimeBound, ScalarType, 0.0, 1.0);
180
185 itkGetConstMacro(LowerTimeBound, ScalarType);
186
191 itkSetClampMacro(UpperTimeBound, ScalarType, 0.0, 1.0);
192
197 itkGetConstMacro(UpperTimeBound, ScalarType);
198
202 itkSetMacro(NumberOfIntegrationSteps, unsigned int);
203
207 itkGetConstMacro(NumberOfIntegrationSteps, unsigned int);
208
209protected:
211 ~VelocityFieldTransform() override = default;
212 void
213 PrintSelf(std::ostream & os, Indent indent) const override;
214
216 typename LightObject::Pointer
217 InternalClone() const override;
218
221
222 ScalarType m_LowerTimeBound{};
223 ScalarType m_UpperTimeBound{};
224
225 unsigned int m_NumberOfIntegrationSteps{};
226
227 VelocityFieldPointer m_VelocityField{};
228
230 typename VelocityFieldInterpolatorType::Pointer m_VelocityFieldInterpolator{};
231
234 unsigned long m_VelocityFieldSetTime{};
235
236private:
241 virtual void
243};
244} // end namespace itk
245
246#ifndef ITK_MANUAL_INSTANTIATION
247# include "itkVelocityFieldTransform.hxx"
248#endif
249
250#endif // itkVelocityFieldTransform_h
OptimizerParameters< FixedParametersValueType > FixedParametersType
SmartPointer< const Self > ConstPointer
SmartPointer< Self > Pointer
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
typename InverseTransformBaseType::Pointer InverseTransformBasePointer
Definition: itkTransform.h:167
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....