go home Home | Main Page | Topics | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkAdvancedBSplineDeformableTransform.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright UMC Utrecht and contributors
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/*=========================================================================
19
20 Program: Insight Segmentation & Registration Toolkit
21 Module: $RCSfile: itkAdvancedBSplineDeformableTransform.h,v $
22 Date: $Date: 2008-04-11 16:28:11 $
23 Version: $Revision: 1.38 $
24
25 Copyright (c) Insight Software Consortium. All rights reserved.
26 See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
27
28 This software is distributed WITHOUT ANY WARRANTY; without even
29 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
30 PURPOSE. See the above copyright notices for more information.
31
32=========================================================================*/
33#ifndef itkAdvancedBSplineDeformableTransform_h
34#define itkAdvancedBSplineDeformableTransform_h
35
37
38#include "itkImage.h"
39#include "itkImageRegion.h"
43
44namespace itk
45{
46
47// Forward declarations for friendship
48template <typename TScalarType, unsigned int NDimensions, unsigned int VSplineOrder>
50
128template <typename TScalarType = double, // Data type for scalars
129 unsigned int NDimensions = 3, // Number of dimensions
130 unsigned int VSplineOrder = 3>
131// Spline order
132class ITK_TEMPLATE_EXPORT AdvancedBSplineDeformableTransform
133 : public AdvancedBSplineDeformableTransformBase<TScalarType, NDimensions>
134{
135public:
137
141 using Pointer = SmartPointer<Self>;
142 using ConstPointer = SmartPointer<const Self>;
143
145 itkNewMacro(Self);
146
149
151 itkStaticConstMacro(SpaceDimension, unsigned int, NDimensions);
152
154 itkStaticConstMacro(SplineOrder, unsigned int, VSplineOrder);
155
157 using typename Superclass::ParametersType;
158 using typename Superclass::ParametersValueType;
159 using typename Superclass::NumberOfParametersType;
160 using typename Superclass::DerivativeType;
161 using typename Superclass::JacobianType;
162 using typename Superclass::ScalarType;
163 using typename Superclass::InputPointType;
164 using typename Superclass::OutputPointType;
165 using typename Superclass::InputVectorType;
166 using typename Superclass::OutputVectorType;
167 using typename Superclass::InputVnlVectorType;
168 using typename Superclass::OutputVnlVectorType;
169 using typename Superclass::InputCovariantVectorType;
170 using typename Superclass::OutputCovariantVectorType;
171
173 using typename Superclass::SpatialJacobianType;
175 using typename Superclass::SpatialHessianType;
177 using typename Superclass::InternalMatrixType;
180
182 using typename Superclass::PixelType;
183 using typename Superclass::ImageType;
184 using typename Superclass::ImagePointer;
185
187 using typename Superclass::RegionType;
188
189 using typename Superclass::IndexType;
190 using typename Superclass::SizeType;
191 using typename Superclass::SpacingType;
192 using typename Superclass::DirectionType;
193 using typename Superclass::OriginType;
194 using typename Superclass::GridOffsetType;
195
197 void
198 SetGridRegion(const RegionType & region) override;
199
201 OutputPointType
202 TransformPoint(const InputPointType & point) const override;
203
216
217 static_assert(std::is_base_of_v<WeightFunctionBaseType, WeightsFunctionType>);
218 static_assert(std::is_base_of_v<WeightFunctionBaseType, DerivativeWeightsFunctionType>);
219 static_assert(std::is_base_of_v<WeightFunctionBaseType, SODerivativeWeightsFunctionType>);
220
223
226
227 unsigned int
229
230 NumberOfParametersType
232
234 void
235 GetJacobian(const InputPointType & inputPoint, JacobianType & j, NonZeroJacobianIndicesType & nzji) const override;
236
240 void
241 EvaluateJacobianWithImageGradientProduct(const InputPointType & inputPoint,
242 const MovingImageGradientType & movingImageGradient,
243 DerivativeType & imageJacobian,
244 NonZeroJacobianIndicesType & nonZeroJacobianIndices) const override;
245
247 void
248 GetSpatialJacobian(const InputPointType & inputPoint, SpatialJacobianType & sj) const override;
249
251 void
252 GetSpatialHessian(const InputPointType & inputPoint, SpatialHessianType & sh) const override;
253
255 void
256 GetJacobianOfSpatialJacobian(const InputPointType & inputPoint,
258 NonZeroJacobianIndicesType & nonZeroJacobianIndices) const override;
259
263 void
264 GetJacobianOfSpatialJacobian(const InputPointType & inputPoint,
267 NonZeroJacobianIndicesType & nonZeroJacobianIndices) const override;
268
270 void
271 GetJacobianOfSpatialHessian(const InputPointType & inputPoint,
273 NonZeroJacobianIndicesType & nonZeroJacobianIndices) const override;
274
278 void
279 GetJacobianOfSpatialHessian(const InputPointType & inputPoint,
282 NonZeroJacobianIndicesType & nonZeroJacobianIndices) const override;
283
284protected:
286 void
287 PrintSelf(std::ostream & os, Indent indent) const override;
288
291
293 void
295
296 void
298 const RegionType & supportRegion) const override;
299
300 using typename Superclass::JacobianImageType;
301 using typename Superclass::JacobianPixelType;
302
309
310private:
312
313 friend class MultiBSplineDeformableTransformWithNormal<ScalarType, Self::SpaceDimension, VSplineOrder>;
314};
315
316} // namespace itk
317
318#ifndef ITK_MANUAL_INSTANTIATION
319# include "itkAdvancedBSplineDeformableTransform.hxx"
320#endif
321
322#endif /* itkAdvancedBSplineDeformableTransform_h */
typename SpatialJacobianType::InternalMatrixType InternalMatrixType
Image< JacobianPixelType, Self::SpaceDimension > JacobianImageType
FixedArray< Matrix< ScalarType, InputSpaceDimension, InputSpaceDimension >, OutputSpaceDimension > SpatialHessianType
std::vector< SpatialHessianType > JacobianOfSpatialHessianType
typename MovingImageGradientType::ValueType MovingImageGradientValueType
Matrix< ScalarType, OutputSpaceDimension, InputSpaceDimension > SpatialJacobianType
std::vector< SpatialJacobianType > JacobianOfSpatialJacobianType
SODerivativeWeightsFunctionPointer m_SODerivativeWeightsFunctions[NDimensions][NDimensions]
unsigned int GetNumberOfAffectedWeights() const override
NumberOfParametersType GetNumberOfNonZeroJacobianIndices() const override
itkOverrideGetNameOfClassMacro(AdvancedBSplineDeformableTransform)
BSplineInterpolationDerivativeWeightFunction< ScalarType, Self::SpaceDimension, VSplineOrder > DerivativeWeightsFunctionType
ITK_DISALLOW_COPY_AND_MOVE(AdvancedBSplineDeformableTransform)
void GetJacobianOfSpatialJacobian(const InputPointType &inputPoint, JacobianOfSpatialJacobianType &jsj, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const override
BSplineInterpolationWeightFunctionBase< ScalarType, NDimensions, VSplineOrder > WeightFunctionBaseType
void SetGridRegion(const RegionType &region) override
void ComputeNonZeroJacobianIndices(NonZeroJacobianIndicesType &nonZeroJacobianIndices, const RegionType &supportRegion) const override
BSplineInterpolationSecondOrderDerivativeWeightFunction< ScalarType, Self::SpaceDimension, VSplineOrder > SODerivativeWeightsFunctionType
void GetSpatialHessian(const InputPointType &inputPoint, SpatialHessianType &sh) const override
void GetJacobianOfSpatialHessian(const InputPointType &inputPoint, JacobianOfSpatialHessianType &jsh, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const override
void GetJacobianOfSpatialHessian(const InputPointType &inputPoint, SpatialHessianType &sh, JacobianOfSpatialHessianType &jsh, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const override
void GetSpatialJacobian(const InputPointType &inputPoint, SpatialJacobianType &sj) const override
void PrintSelf(std::ostream &os, Indent indent) const override
~AdvancedBSplineDeformableTransform() override=default
OutputPointType TransformPoint(const InputPointType &point) const override
BSplineInterpolationWeightFunction2< ScalarType, Self::SpaceDimension, VSplineOrder > WeightsFunctionType
void GetJacobian(const InputPointType &inputPoint, JacobianType &j, NonZeroJacobianIndicesType &nzji) const override
void GetJacobianOfSpatialJacobian(const InputPointType &inputPoint, SpatialJacobianType &sj, JacobianOfSpatialJacobianType &jsj, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const override
itkStaticConstMacro(SpaceDimension, unsigned int, NDimensions)
itkStaticConstMacro(SplineOrder, unsigned int, VSplineOrder)
void EvaluateJacobianWithImageGradientProduct(const InputPointType &inputPoint, const MovingImageGradientType &movingImageGradient, DerivativeType &imageJacobian, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const override
Returns the weights over the support region used for B-spline interpolation/reconstruction.
Returns the weights over the support region used for B-spline interpolation/reconstruction.
Returns the weights over the support region used for B-spline interpolation/reconstruction.
Returns the weights over the support region used for B-spline interpolation/reconstruction.
This transform is a composition of B-spline transformations, allowing sliding motion between differen...


Generated on 26-02-2026 for elastix by doxygen 1.16.1 (669aeeefca743c148e2d935b3d3c69535c7491e6) elastix logo