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
219
221 unsigned long
223 {
224 return this->m_WeightsFunction->GetNumberOfWeights();
225 }
226
227
228 unsigned int
230
231 NumberOfParametersType
233
235 void
236 GetJacobian(const InputPointType & inputPoint, JacobianType & j, NonZeroJacobianIndicesType & nzji) const override;
237
241 void
242 EvaluateJacobianWithImageGradientProduct(const InputPointType & inputPoint,
243 const MovingImageGradientType & movingImageGradient,
244 DerivativeType & imageJacobian,
245 NonZeroJacobianIndicesType & nonZeroJacobianIndices) const override;
246
248 void
249 GetSpatialJacobian(const InputPointType & inputPoint, SpatialJacobianType & sj) const override;
250
252 void
253 GetSpatialHessian(const InputPointType & inputPoint, SpatialHessianType & sh) const override;
254
256 void
257 GetJacobianOfSpatialJacobian(const InputPointType & inputPoint,
259 NonZeroJacobianIndicesType & nonZeroJacobianIndices) const override;
260
264 void
265 GetJacobianOfSpatialJacobian(const InputPointType & inputPoint,
268 NonZeroJacobianIndicesType & nonZeroJacobianIndices) const override;
269
271 void
272 GetJacobianOfSpatialHessian(const InputPointType & inputPoint,
274 NonZeroJacobianIndicesType & nonZeroJacobianIndices) const override;
275
279 void
280 GetJacobianOfSpatialHessian(const InputPointType & inputPoint,
283 NonZeroJacobianIndicesType & nonZeroJacobianIndices) const override;
284
285protected:
287 void
288 PrintSelf(std::ostream & os, Indent indent) const override;
289
292
294 // Why??
295 itkSetObjectMacro(WeightsFunction, WeightsFunctionType);
297
299 void
301
302 void
304 const RegionType & supportRegion) const override;
305
306 using typename Superclass::JacobianImageType;
307 using typename Superclass::JacobianPixelType;
308
314 std::vector<DerivativeWeightsFunctionPointer> m_DerivativeWeightsFunctions;
315 std::vector<std::vector<SODerivativeWeightsFunctionPointer>> m_SODerivativeWeightsFunctions;
316
317private:
318 friend class MultiBSplineDeformableTransformWithNormal<ScalarType, Self::SpaceDimension, VSplineOrder>;
319};
320
321} // namespace itk
322
323#ifndef ITK_MANUAL_INSTANTIATION
324# include "itkAdvancedBSplineDeformableTransform.hxx"
325#endif
326
327#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
std::vector< DerivativeWeightsFunctionPointer > m_DerivativeWeightsFunctions
typename WeightsFunctionType::WeightsType WeightsType
typename DerivativeWeightsFunctionType::Pointer DerivativeWeightsFunctionPointer
ITK_DISALLOW_COPY_AND_MOVE(AdvancedBSplineDeformableTransform)
std::vector< std::vector< SODerivativeWeightsFunctionPointer > > m_SODerivativeWeightsFunctions
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
Matrix< ScalarType, OutputSpaceDimension, InputSpaceDimension > SpatialJacobianType
std::vector< SpatialHessianType > JacobianOfSpatialHessianType
std::vector< SpatialJacobianType > JacobianOfSpatialJacobianType
FixedArray< Matrix< ScalarType, InputSpaceDimension, InputSpaceDimension >, OutputSpaceDimension > SpatialHessianType
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 2023-01-13 for elastix by doxygen 1.9.6 elastix logo