ITK  6.0.0
Insight Toolkit
itkTimeVaryingBSplineVelocityFieldTransformParametersAdaptor.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 itkTimeVaryingBSplineVelocityFieldTransformParametersAdaptor_h
19#define itkTimeVaryingBSplineVelocityFieldTransformParametersAdaptor_h
20
22
23namespace itk
24{
65template <typename TTransform>
67 : public TransformParametersAdaptor<TTransform>
68{
69public:
71
77
79 itkNewMacro(Self);
80
83
85 using TransformType = TTransform;
87 using ParametersType = typename TransformType::ParametersType;
88 using ParametersValueType = typename TransformType::ParametersValueType;
89 using FixedParametersType = typename TransformType::FixedParametersType;
90 using FixedParametersValueType = typename TransformType::FixedParametersValueType;
91
93 typename TransformType::TimeVaryingVelocityFieldControlPointLatticeType;
98 using VectorType = typename TimeVaryingVelocityFieldControlPointLatticeType::PixelType;
100 using SpacingType = typename TimeVaryingVelocityFieldControlPointLatticeType::SpacingType;
105
107 static constexpr unsigned int TotalDimension = TransformType::Dimension + 1;
108
110 itkSetMacro(SplineOrder, SizeValueType);
111
113 itkGetConstMacro(SplineOrder, SizeValueType);
114
116 void
118
120 itkGetConstReferenceMacro(RequiredTransformDomainMeshSize, MeshSizeType);
121
123 void
125
127 itkGetConstReferenceMacro(RequiredTransformDomainSize, SizeType);
128
130 void
132
134 itkGetConstReferenceMacro(RequiredTransformDomainSpacing, SpacingType);
135
137 void
139
141 itkGetConstReferenceMacro(RequiredTransformDomainOrigin, OriginType);
142
144 void
146
148 itkGetConstReferenceMacro(RequiredTransformDomainDirection, DirectionType);
149
151 const OriginType
153 {
154 OriginType requiredLatticeOrigin;
155 for (SizeValueType i = 0; i < TotalDimension; ++i)
156 {
157 requiredLatticeOrigin[i] = this->m_RequiredFixedParameters[TotalDimension + i];
158 }
159 return requiredLatticeOrigin;
160 }
164 const SpacingType
166 {
167 SpacingType requiredLatticeSpacing;
168 for (SizeValueType i = 0; i < TotalDimension; ++i)
169 {
170 FixedParametersValueType domainPhysicalDimensions =
171 static_cast<FixedParametersValueType>(this->m_RequiredTransformDomainSize[i] - 1.0) *
172 this->m_RequiredTransformDomainSpacing[i];
173 requiredLatticeSpacing[i] =
174 domainPhysicalDimensions / static_cast<FixedParametersValueType>(this->m_RequiredTransformDomainMeshSize[i]);
175 }
176 return requiredLatticeSpacing;
177 }
181 const SizeType
183 {
184 SizeType requiredLatticeSize;
185 for (SizeValueType i = 0; i < TotalDimension; ++i)
186 {
187 requiredLatticeSize[i] = static_cast<SizeValueType>(this->m_RequiredFixedParameters[i]);
188 }
189 return requiredLatticeSize;
190 }
194 const DirectionType
196 {
197 return this->m_RequiredTransformDomainDirection;
198 }
199
201 void
203
204 void
206
207protected:
210
211 void
212 PrintSelf(std::ostream & os, Indent indent) const override;
213
214private:
216 void
218
219 MeshSizeType m_RequiredTransformDomainMeshSize{};
220 OriginType m_RequiredTransformDomainOrigin{};
221 DirectionType m_RequiredTransformDomainDirection{};
222 SpacingType m_RequiredTransformDomainSpacing{};
223 SizeType m_RequiredTransformDomainSize{};
224
225 SizeValueType m_SplineOrder{};
226
227}; // class TimeVaryingBSplineVelocityFieldTransformParametersAdaptor
228} // namespace itk
229
230#ifndef ITK_MANUAL_INSTANTIATION
231# include "itkTimeVaryingBSplineVelocityFieldTransformParametersAdaptor.hxx"
232#endif
233
234#endif /* itkTimeVaryingBSplineVelocityFieldTransformParametersAdaptor_h */
Control indentation during Print() invocation.
Definition: itkIndent.h:50
Light weight base class for most itk classes.
TimeVaryingBSplineVelocityFieldTransformParametersAdaptor is a helper class intended to definition.
typename TimeVaryingVelocityFieldControlPointLatticeType::Pointer TimeVaryingVelocityFieldControlPointLatticePointer
void PrintSelf(std::ostream &os, Indent indent) const override
typename TransformType::TimeVaryingVelocityFieldControlPointLatticeType TimeVaryingVelocityFieldControlPointLatticeType
typename TimeVaryingVelocityFieldControlPointLatticeType::DirectionType DirectionType
void SetRequiredFixedParameters(const FixedParametersType) override
typename TimeVaryingVelocityFieldControlPointLatticeType::SizeValueType SizeValueType
Base helper class intended for multi-resolution image registration.
SmartPointer< Self > Pointer
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
unsigned long SizeValueType
Definition: itkIntTypes.h:86