go home Home | Main Page | Modules | 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 <class TScalarType, unsigned int NDimensions, unsigned int VSplineOrder>
50
128template <class 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
215
218
220 static constexpr unsigned NumberOfWeights = WeightsFunctionType::NumberOfWeights;
221
222 unsigned int
224
225 NumberOfParametersType
227
229 void
230 GetJacobian(const InputPointType & inputPoint, JacobianType & j, NonZeroJacobianIndicesType & nzji) const override;
231
235 void
236 EvaluateJacobianWithImageGradientProduct(const InputPointType & inputPoint,
237 const MovingImageGradientType & movingImageGradient,
238 DerivativeType & imageJacobian,
239 NonZeroJacobianIndicesType & nonZeroJacobianIndices) const override;
240
242 void
243 GetSpatialJacobian(const InputPointType & inputPoint, SpatialJacobianType & sj) const override;
244
246 void
247 GetSpatialHessian(const InputPointType & inputPoint, SpatialHessianType & sh) const override;
248
250 void
251 GetJacobianOfSpatialJacobian(const InputPointType & inputPoint,
253 NonZeroJacobianIndicesType & nonZeroJacobianIndices) const override;
254
258 void
259 GetJacobianOfSpatialJacobian(const InputPointType & inputPoint,
262 NonZeroJacobianIndicesType & nonZeroJacobianIndices) const override;
263
265 void
266 GetJacobianOfSpatialHessian(const InputPointType & inputPoint,
268 NonZeroJacobianIndicesType & nonZeroJacobianIndices) const override;
269
273 void
274 GetJacobianOfSpatialHessian(const InputPointType & inputPoint,
277 NonZeroJacobianIndicesType & nonZeroJacobianIndices) const override;
278
279protected:
281 void
282 PrintSelf(std::ostream & os, Indent indent) const override;
283
286
288 // Why??
289 itkSetObjectMacro(WeightsFunction, WeightsFunctionType);
291
293 void
295
296 void
298 const RegionType & supportRegion) const override;
299
300 using typename Superclass::JacobianImageType;
301 using typename Superclass::JacobianPixelType;
302
307 WeightsFunctionPointer m_WeightsFunction{};
308 std::vector<DerivativeWeightsFunctionPointer> m_DerivativeWeightsFunctions{};
309 std::vector<std::vector<SODerivativeWeightsFunctionPointer>> m_SODerivativeWeightsFunctions{};
310
311private:
312 friend class MultiBSplineDeformableTransformWithNormal<ScalarType, Self::SpaceDimension, VSplineOrder>;
313};
314
315} // namespace itk
316
317#ifndef ITK_MANUAL_INSTANTIATION
318# include "itkAdvancedBSplineDeformableTransform.hxx"
319#endif
320
321#endif /* itkAdvancedBSplineDeformableTransform_h */
Base class for deformable transform using a B-spline representation.
Deformable transform using a B-spline representation.
unsigned int GetNumberOfAffectedWeights() const override
NumberOfParametersType GetNumberOfNonZeroJacobianIndices() const override
typename WeightsFunctionType::WeightsType WeightsType
typename DerivativeWeightsFunctionType::Pointer DerivativeWeightsFunctionPointer
ITK_DISALLOW_COPY_AND_MOVE(AdvancedBSplineDeformableTransform)
void GetJacobianOfSpatialJacobian(const InputPointType &inputPoint, JacobianOfSpatialJacobianType &jsj, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const override
void SetGridRegion(const RegionType &region) override
itkGetModifiableObjectMacro(WeightsFunction, WeightsFunctionType)
void ComputeNonZeroJacobianIndices(NonZeroJacobianIndicesType &nonZeroJacobianIndices, const RegionType &supportRegion) const override
void GetSpatialHessian(const InputPointType &inputPoint, SpatialHessianType &sh) const override
void GetJacobianOfSpatialHessian(const InputPointType &inputPoint, JacobianOfSpatialHessianType &jsh, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const override
typename SODerivativeWeightsFunctionType::Pointer SODerivativeWeightsFunctionPointer
typename WeightsFunctionType::Pointer WeightsFunctionPointer
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
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)
typename WeightsFunctionType::ContinuousIndexType ContinuousIndexType
itkStaticConstMacro(SplineOrder, unsigned int, VSplineOrder)
void EvaluateJacobianWithImageGradientProduct(const InputPointType &inputPoint, const MovingImageGradientType &movingImageGradient, DerivativeType &imageJacobian, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const override
typename SpatialJacobianType::InternalMatrixType InternalMatrixType
FixedArray< Matrix< ScalarType, InputSpaceDimension, InputSpaceDimension >, OutputSpaceDimension > SpatialHessianType
Matrix< ScalarType, OutputSpaceDimension, InputSpaceDimension > SpatialJacobianType
std::vector< SpatialHessianType > JacobianOfSpatialHessianType
std::vector< SpatialJacobianType > JacobianOfSpatialJacobianType
typename MovingImageGradientType::ValueType MovingImageGradientValueType
std::vector< unsigned long > NonZeroJacobianIndicesType
OutputCovariantVectorType MovingImageGradientType
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.
ContinuousIndex< TCoordRep, VSpaceDimension > ContinuousIndexType
This transform is a composition of B-spline transformations, allowing sliding motion between differen...


Generated on 2024-07-17 for elastix by doxygen 1.11.0 (9b424b03c9833626cd435af22a444888fbbb192d) elastix logo