Loading...
Searching...
No Matches
itkAdvancedBSplineDeformableTransform.h
Go to the documentation of this file.
/*=========================================================================
*
* Copyright UMC Utrecht and contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0.txt
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*=========================================================================*/
/*=========================================================================
Program: Insight Segmentation & Registration Toolkit
Module: $RCSfile: itkAdvancedBSplineDeformableTransform.h,v $
Date: $Date: 2008-04-11 16:28:11 $
Version: $Revision: 1.38 $
Copyright (c) Insight Software Consortium. All rights reserved.
See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#ifndef itkAdvancedBSplineDeformableTransform_h
#define itkAdvancedBSplineDeformableTransform_h
#include "itkAdvancedBSplineDeformableTransformBase.h"
#include "itkImage.h"
#include "itkImageRegion.h"
#include "itkBSplineInterpolationWeightFunction2.h"
#include "itkBSplineInterpolationDerivativeWeightFunction.h"
#include "itkBSplineInterpolationSecondOrderDerivativeWeightFunction.h"
namespace itk
{
// Forward declarations for friendship
template <class TScalarType, unsigned int NDimensions, unsigned int VSplineOrder>
class ITK_TEMPLATE_EXPORT MultiBSplineDeformableTransformWithNormal;
template <class TScalarType = double, // Data type for scalars
unsigned int NDimensions = 3, // Number of dimensions
unsigned int VSplineOrder = 3>
// Spline order
class ITK_TEMPLATE_EXPORT AdvancedBSplineDeformableTransform
: public AdvancedBSplineDeformableTransformBase<TScalarType, NDimensions>
{
public:
ITK_DISALLOW_COPY_AND_MOVE(AdvancedBSplineDeformableTransform);
using Self = AdvancedBSplineDeformableTransform;
using Superclass = AdvancedBSplineDeformableTransformBase<TScalarType, NDimensions>;
using Pointer = SmartPointer<Self>;
using ConstPointer = SmartPointer<const Self>;
itkNewMacro(Self);
itkTypeMacro(AdvancedBSplineDeformableTransform, AdvancedBSplineDeformableTransformBase);
itkStaticConstMacro(SpaceDimension, unsigned int, NDimensions);
itkStaticConstMacro(SplineOrder, unsigned int, VSplineOrder);
using typename Superclass::ParametersType;
using typename Superclass::ParametersValueType;
using typename Superclass::NumberOfParametersType;
using typename Superclass::DerivativeType;
using typename Superclass::JacobianType;
using typename Superclass::ScalarType;
using typename Superclass::InputPointType;
using typename Superclass::OutputPointType;
using typename Superclass::InputVectorType;
using typename Superclass::OutputVectorType;
using typename Superclass::InputVnlVectorType;
using typename Superclass::OutputVnlVectorType;
using typename Superclass::InputCovariantVectorType;
using typename Superclass::OutputCovariantVectorType;
using typename Superclass::NonZeroJacobianIndicesType;
using typename Superclass::SpatialJacobianType;
using typename Superclass::JacobianOfSpatialJacobianType;
using typename Superclass::SpatialHessianType;
using typename Superclass::JacobianOfSpatialHessianType;
using typename Superclass::InternalMatrixType;
using typename Superclass::MovingImageGradientType;
using typename Superclass::MovingImageGradientValueType;
using typename Superclass::PixelType;
using typename Superclass::ImageType;
using typename Superclass::ImagePointer;
using typename Superclass::RegionType;
using typename Superclass::IndexType;
using typename Superclass::SizeType;
using typename Superclass::SpacingType;
using typename Superclass::DirectionType;
using typename Superclass::OriginType;
using typename Superclass::GridOffsetType;
void
SetGridRegion(const RegionType & region) override;
OutputPointType
TransformPoint(const InputPointType & point) const override;
using WeightsFunctionType = BSplineInterpolationWeightFunction2<ScalarType, Self::SpaceDimension, VSplineOrder>;
using WeightsFunctionPointer = typename WeightsFunctionType::Pointer;
using WeightsType = typename WeightsFunctionType::WeightsType;
using ContinuousIndexType = typename WeightsFunctionType::ContinuousIndexType;
using DerivativeWeightsFunctionType =
BSplineInterpolationDerivativeWeightFunction<ScalarType, Self::SpaceDimension, VSplineOrder>;
using DerivativeWeightsFunctionPointer = typename DerivativeWeightsFunctionType::Pointer;
using SODerivativeWeightsFunctionType =
BSplineInterpolationSecondOrderDerivativeWeightFunction<ScalarType, Self::SpaceDimension, VSplineOrder>;
using SODerivativeWeightsFunctionPointer = typename SODerivativeWeightsFunctionType::Pointer;
using typename Superclass::ParameterIndexArrayType;
static constexpr unsigned NumberOfWeights = WeightsFunctionType::NumberOfWeights;
unsigned int
GetNumberOfAffectedWeights() const override;
NumberOfParametersType
GetNumberOfNonZeroJacobianIndices() const override;
void
GetJacobian(const InputPointType & inputPoint, JacobianType & j, NonZeroJacobianIndicesType & nzji) const override;
void
EvaluateJacobianWithImageGradientProduct(const InputPointType & inputPoint,
const MovingImageGradientType & movingImageGradient,
DerivativeType & imageJacobian,
NonZeroJacobianIndicesType & nonZeroJacobianIndices) const override;
void
GetSpatialJacobian(const InputPointType & inputPoint, SpatialJacobianType & sj) const override;
void
GetSpatialHessian(const InputPointType & inputPoint, SpatialHessianType & sh) const override;
void
GetJacobianOfSpatialJacobian(const InputPointType & inputPoint,
JacobianOfSpatialJacobianType & jsj,
NonZeroJacobianIndicesType & nonZeroJacobianIndices) const override;
void
GetJacobianOfSpatialJacobian(const InputPointType & inputPoint,
SpatialJacobianType & sj,
JacobianOfSpatialJacobianType & jsj,
NonZeroJacobianIndicesType & nonZeroJacobianIndices) 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;
protected:
void
PrintSelf(std::ostream & os, Indent indent) const override;
AdvancedBSplineDeformableTransform();
~AdvancedBSplineDeformableTransform() override = default;
// Why??
itkSetObjectMacro(WeightsFunction, WeightsFunctionType);
itkGetModifiableObjectMacro(WeightsFunction, WeightsFunctionType);
void
WrapAsImages();
void
ComputeNonZeroJacobianIndices(NonZeroJacobianIndicesType & nonZeroJacobianIndices,
const RegionType & supportRegion) const override;
using typename Superclass::JacobianImageType;
using typename Superclass::JacobianPixelType;
WeightsFunctionPointer m_WeightsFunction{};
std::vector<DerivativeWeightsFunctionPointer> m_DerivativeWeightsFunctions{};
std::vector<std::vector<SODerivativeWeightsFunctionPointer>> m_SODerivativeWeightsFunctions{};
private:
friend class MultiBSplineDeformableTransformWithNormal<ScalarType, Self::SpaceDimension, VSplineOrder>;
};
} // namespace itk
#ifndef ITK_MANUAL_INSTANTIATION
# include "itkAdvancedBSplineDeformableTransform.hxx"
#endif
#endif /* itkAdvancedBSplineDeformableTransform_h */
TScalarType
double
itk::AdvancedBSplineDeformableTransformBase::InternalMatrixType
typename SpatialJacobianType::InternalMatrixType InternalMatrixType
Definition itkAdvancedTransform.h:140
itk::AdvancedBSplineDeformableTransformBase::ParameterIndexArrayType
Array< unsigned long > ParameterIndexArrayType
Definition itkAdvancedBSplineDeformableTransformBase.h:258
itk::AdvancedBSplineDeformableTransformBase::SpatialJacobianType
Matrix< ScalarType, OutputSpaceDimension, InputSpaceDimension > SpatialJacobianType
Definition itkAdvancedTransform.h:134
itk::AdvancedBSplineDeformableTransformBase::SpacingType
typename ImageType::SpacingType SpacingType
Definition itkAdvancedBSplineDeformableTransformBase.h:228
itk::AdvancedBSplineDeformableTransformBase::JacobianOfSpatialHessianType
std::vector< SpatialHessianType > JacobianOfSpatialHessianType
Definition itkAdvancedTransform.h:139
itk::AdvancedBSplineDeformableTransformBase::MovingImageGradientValueType
typename MovingImageGradientType::ValueType MovingImageGradientValueType
Definition itkAdvancedTransform.h:148
itk::AdvancedBSplineDeformableTransformBase::GridOffsetType
IndexType GridOffsetType
Definition itkAdvancedBSplineDeformableTransformBase.h:231
itk::AdvancedBSplineDeformableTransformBase::OriginType
typename ImageType::PointType OriginType
Definition itkAdvancedBSplineDeformableTransformBase.h:230
itk::AdvancedBSplineDeformableTransformBase::JacobianImageType
Image< JacobianPixelType, Self::SpaceDimension > JacobianImageType
Definition itkAdvancedBSplineDeformableTransformBase.h:402
itk::AdvancedBSplineDeformableTransformBase::ImageType
Image< PixelType, Self::SpaceDimension > ImageType
Definition itkAdvancedBSplineDeformableTransformBase.h:199
itk::AdvancedBSplineDeformableTransformBase::JacobianOfSpatialJacobianType
std::vector< SpatialJacobianType > JacobianOfSpatialJacobianType
Definition itkAdvancedTransform.h:135
itk::AdvancedBSplineDeformableTransformBase::ImagePointer
typename ImageType::Pointer ImagePointer
Definition itkAdvancedBSplineDeformableTransformBase.h:200
itk::AdvancedBSplineDeformableTransformBase::SpatialHessianType
FixedArray< Matrix< ScalarType, InputSpaceDimension, InputSpaceDimension >, OutputSpaceDimension > SpatialHessianType
Definition itkAdvancedTransform.h:137
itk::AdvancedBSplineDeformableTransformBase::NonZeroJacobianIndicesType
std::vector< unsigned long > NonZeroJacobianIndicesType
Definition itkAdvancedTransform.h:133
itk::AdvancedBSplineDeformableTransformBase::RegionType
ImageRegion< Self::SpaceDimension > RegionType
Definition itkAdvancedBSplineDeformableTransformBase.h:224
itk::AdvancedBSplineDeformableTransformBase::SizeType
typename RegionType::SizeType SizeType
Definition itkAdvancedBSplineDeformableTransformBase.h:227
itk::AdvancedBSplineDeformableTransformBase::DirectionType
typename ImageType::DirectionType DirectionType
Definition itkAdvancedBSplineDeformableTransformBase.h:229
itk::AdvancedBSplineDeformableTransformBase::JacobianPixelType
typename JacobianType::ValueType JacobianPixelType
Definition itkAdvancedBSplineDeformableTransformBase.h:401
itk::AdvancedBSplineDeformableTransformBase::MovingImageGradientType
OutputCovariantVectorType MovingImageGradientType
Definition itkAdvancedTransform.h:147
itk::AdvancedBSplineDeformableTransformBase< double, 3 >::AdvancedBSplineDeformableTransformBase
AdvancedBSplineDeformableTransformBase()=delete
itk::AdvancedBSplineDeformableTransformBase::IndexType
typename RegionType::IndexType IndexType
Definition itkAdvancedBSplineDeformableTransformBase.h:226
itk::AdvancedBSplineDeformableTransform::GetNumberOfAffectedWeights
unsigned int GetNumberOfAffectedWeights() const override
itk::AdvancedBSplineDeformableTransform::GetNumberOfNonZeroJacobianIndices
NumberOfParametersType GetNumberOfNonZeroJacobianIndices() const override
itk::AdvancedBSplineDeformableTransform< ScalarType, FixedImageDimension, 1 >::m_DerivativeWeightsFunctions
std::vector< DerivativeWeightsFunctionPointer > m_DerivativeWeightsFunctions
Definition itkAdvancedBSplineDeformableTransform.h:308
itk::AdvancedBSplineDeformableTransform< ScalarType, FixedImageDimension, 1 >::ConstPointer
SmartPointer< const Self > ConstPointer
Definition itkAdvancedBSplineDeformableTransform.h:142
itk::AdvancedBSplineDeformableTransform< ScalarType, FixedImageDimension, 1 >::WeightsType
typename WeightsFunctionType::WeightsType WeightsType
Definition itkAdvancedBSplineDeformableTransform.h:207
itk::AdvancedBSplineDeformableTransform< ScalarType, FixedImageDimension, 1 >::DerivativeWeightsFunctionPointer
typename DerivativeWeightsFunctionType::Pointer DerivativeWeightsFunctionPointer
Definition itkAdvancedBSplineDeformableTransform.h:211
itk::AdvancedBSplineDeformableTransform::ITK_DISALLOW_COPY_AND_MOVE
ITK_DISALLOW_COPY_AND_MOVE(AdvancedBSplineDeformableTransform)
itk::AdvancedBSplineDeformableTransform::AdvancedBSplineDeformableTransform
AdvancedBSplineDeformableTransform()
itk::AdvancedBSplineDeformableTransform< ScalarType, FixedImageDimension, 1 >::m_SODerivativeWeightsFunctions
std::vector< std::vector< SODerivativeWeightsFunctionPointer > > m_SODerivativeWeightsFunctions
Definition itkAdvancedBSplineDeformableTransform.h:309
itk::AdvancedBSplineDeformableTransform::GetJacobianOfSpatialJacobian
void GetJacobianOfSpatialJacobian(const InputPointType &inputPoint, JacobianOfSpatialJacobianType &jsj, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const override
itk::AdvancedBSplineDeformableTransform< ScalarType, FixedImageDimension, 1 >::DerivativeWeightsFunctionType
BSplineInterpolationDerivativeWeightFunction< ScalarType, Self::SpaceDimension, VSplineOrder > DerivativeWeightsFunctionType
Definition itkAdvancedBSplineDeformableTransform.h:209
itk::AdvancedBSplineDeformableTransform::SetGridRegion
void SetGridRegion(const RegionType &region) override
itk::AdvancedBSplineDeformableTransform::itkGetModifiableObjectMacro
itkGetModifiableObjectMacro(WeightsFunction, WeightsFunctionType)
itk::AdvancedBSplineDeformableTransform< ScalarType, FixedImageDimension, 1 >::SODerivativeWeightsFunctionType
BSplineInterpolationSecondOrderDerivativeWeightFunction< ScalarType, Self::SpaceDimension, VSplineOrder > SODerivativeWeightsFunctionType
Definition itkAdvancedBSplineDeformableTransform.h:212
itk::AdvancedBSplineDeformableTransform< ScalarType, FixedImageDimension, 1 >::Pointer
SmartPointer< Self > Pointer
Definition itkAdvancedBSplineDeformableTransform.h:141
itk::AdvancedBSplineDeformableTransform::ComputeNonZeroJacobianIndices
void ComputeNonZeroJacobianIndices(NonZeroJacobianIndicesType &nonZeroJacobianIndices, const RegionType &supportRegion) const override
itk::AdvancedBSplineDeformableTransform< ScalarType, FixedImageDimension, 1 >::m_WeightsFunction
WeightsFunctionPointer m_WeightsFunction
Definition itkAdvancedBSplineDeformableTransform.h:307
itk::AdvancedBSplineDeformableTransform< ScalarType, FixedImageDimension, 1 >::RegionType
ImageRegion< Self::SpaceDimension > RegionType
itk::AdvancedBSplineDeformableTransform::GetSpatialHessian
void GetSpatialHessian(const InputPointType &inputPoint, SpatialHessianType &sh) const override
itk::AdvancedBSplineDeformableTransform::GetJacobianOfSpatialHessian
void GetJacobianOfSpatialHessian(const InputPointType &inputPoint, JacobianOfSpatialHessianType &jsh, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const override
itk::AdvancedBSplineDeformableTransform< ScalarType, FixedImageDimension, 1 >::SODerivativeWeightsFunctionPointer
typename SODerivativeWeightsFunctionType::Pointer SODerivativeWeightsFunctionPointer
Definition itkAdvancedBSplineDeformableTransform.h:214
itk::AdvancedBSplineDeformableTransform< ScalarType, FixedImageDimension, 1 >::NumberOfWeights
static constexpr unsigned NumberOfWeights
Definition itkAdvancedBSplineDeformableTransform.h:220
itk::AdvancedBSplineDeformableTransform< ScalarType, FixedImageDimension, 1 >::WeightsFunctionPointer
typename WeightsFunctionType::Pointer WeightsFunctionPointer
Definition itkAdvancedBSplineDeformableTransform.h:206
itk::AdvancedBSplineDeformableTransform::GetJacobianOfSpatialHessian
void GetJacobianOfSpatialHessian(const InputPointType &inputPoint, SpatialHessianType &sh, JacobianOfSpatialHessianType &jsh, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const override
itk::AdvancedBSplineDeformableTransform::GetSpatialJacobian
void GetSpatialJacobian(const InputPointType &inputPoint, SpatialJacobianType &sj) const override
itk::AdvancedBSplineDeformableTransform< ScalarType, FixedImageDimension, 1 >::Superclass
AdvancedBSplineDeformableTransformBase< ScalarType, NDimensions > Superclass
Definition itkAdvancedBSplineDeformableTransform.h:140
itk::AdvancedBSplineDeformableTransform::PrintSelf
void PrintSelf(std::ostream &os, Indent indent) const override
itk::AdvancedBSplineDeformableTransform::~AdvancedBSplineDeformableTransform
~AdvancedBSplineDeformableTransform() override=default
itk::AdvancedBSplineDeformableTransform::TransformPoint
OutputPointType TransformPoint(const InputPointType &point) const override
itk::AdvancedBSplineDeformableTransform< ScalarType, FixedImageDimension, 1 >::Self
AdvancedBSplineDeformableTransform Self
Definition itkAdvancedBSplineDeformableTransform.h:139
itk::AdvancedBSplineDeformableTransform< ScalarType, FixedImageDimension, 1 >::WeightsFunctionType
BSplineInterpolationWeightFunction2< ScalarType, Self::SpaceDimension, VSplineOrder > WeightsFunctionType
Definition itkAdvancedBSplineDeformableTransform.h:205
itk::AdvancedBSplineDeformableTransform::GetJacobian
void GetJacobian(const InputPointType &inputPoint, JacobianType &j, NonZeroJacobianIndicesType &nzji) const override
itk::AdvancedBSplineDeformableTransform::GetJacobianOfSpatialJacobian
void GetJacobianOfSpatialJacobian(const InputPointType &inputPoint, SpatialJacobianType &sj, JacobianOfSpatialJacobianType &jsj, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const override
itk::AdvancedBSplineDeformableTransform::itkStaticConstMacro
itkStaticConstMacro(SpaceDimension, unsigned int, NDimensions)
itk::AdvancedBSplineDeformableTransform< ScalarType, FixedImageDimension, 1 >::ContinuousIndexType
typename WeightsFunctionType::ContinuousIndexType ContinuousIndexType
Definition itkAdvancedBSplineDeformableTransform.h:208
itk::AdvancedBSplineDeformableTransform::WrapAsImages
void WrapAsImages()
itk::AdvancedBSplineDeformableTransform::itkStaticConstMacro
itkStaticConstMacro(SplineOrder, unsigned int, VSplineOrder)
itk::AdvancedBSplineDeformableTransform::EvaluateJacobianWithImageGradientProduct
void EvaluateJacobianWithImageGradientProduct(const InputPointType &inputPoint, const MovingImageGradientType &movingImageGradient, DerivativeType &imageJacobian, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const override
itk::BSplineInterpolationDerivativeWeightFunction
Returns the weights over the support region used for B-spline interpolation/reconstruction.
Definition itkBSplineInterpolationDerivativeWeightFunction.h:46
itk::BSplineInterpolationDerivativeWeightFunction< ScalarType, Self::SpaceDimension, VSplineOrder >::Pointer
SmartPointer< Self > Pointer
Definition itkBSplineInterpolationDerivativeWeightFunction.h:53
itk::BSplineInterpolationSecondOrderDerivativeWeightFunction
Returns the weights over the support region used for B-spline interpolation/reconstruction.
Definition itkBSplineInterpolationSecondOrderDerivativeWeightFunction.h:47
itk::BSplineInterpolationSecondOrderDerivativeWeightFunction< ScalarType, Self::SpaceDimension, VSplineOrder >::Pointer
SmartPointer< Self > Pointer
Definition itkBSplineInterpolationSecondOrderDerivativeWeightFunction.h:54
itk::BSplineInterpolationWeightFunction2
Returns the weights over the support region used for B-spline interpolation/reconstruction.
Definition itkBSplineInterpolationWeightFunction2.h:45
itk::BSplineInterpolationWeightFunction2< ScalarType, Self::SpaceDimension, VSplineOrder >::ContinuousIndexType
ContinuousIndex< ScalarType, VSpaceDimension > ContinuousIndexType
itk::BSplineInterpolationWeightFunction2< ScalarType, Self::SpaceDimension, VSplineOrder >::Pointer
SmartPointer< Self > Pointer
Definition itkBSplineInterpolationWeightFunction2.h:52
itk::BSplineInterpolationWeightFunction2< ScalarType, Self::SpaceDimension, VSplineOrder >::WeightsType
FixedArray< double, NumberOfWeights > WeightsType
itk::BSplineInterpolationWeightFunctionBase::NumberOfWeights
static constexpr unsigned long NumberOfWeights
Definition itkBSplineInterpolationWeightFunctionBase.h:74
itk::MultiBSplineDeformableTransformWithNormal
This transform is a composition of B-spline transformations, allowing sliding motion between differen...
Definition itkMultiBSplineDeformableTransformWithNormal.h:44
itkAdvancedBSplineDeformableTransformBase.h
itkBSplineInterpolationDerivativeWeightFunction.h
itkBSplineInterpolationSecondOrderDerivativeWeightFunction.h
itkBSplineInterpolationWeightFunction2.h
itk
Definition itkAdvancedImageToImageMetric.h:43

Generated on 1768596610 for elastix by 1.15.0 |