Loading...
Searching...
No Matches
itkDistancePreservingRigidityPenaltyTerm.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.
*
*=========================================================================*/
#ifndef itkDistancePreservingRigidityPenaltyTerm_h
#define itkDistancePreservingRigidityPenaltyTerm_h
#include "itkTransformPenaltyTerm.h"
#include "itkAdvancedBSplineDeformableTransform.h"
#include "itkAdvancedCombinationTransform.h"
#include "itkNeighborhood.h"
#include "itkImageRegionIterator.h"
#include "itkNeighborhoodOperatorImageFilter.h"
#include "itkNeighborhoodIterator.h"
#include "itkImageRegionIterator.h"
#include "itkMultiResolutionPyramidImageFilter.h"
namespace itk
{
template <class TFixedImage, class TScalarType>
class ITK_TEMPLATE_EXPORT DistancePreservingRigidityPenaltyTerm : public TransformPenaltyTerm<TFixedImage, TScalarType>
{
public:
ITK_DISALLOW_COPY_AND_MOVE(DistancePreservingRigidityPenaltyTerm);
using Self = DistancePreservingRigidityPenaltyTerm;
using Superclass = TransformPenaltyTerm<TFixedImage, TScalarType>;
using Pointer = SmartPointer<Self>;
using ConstPointer = SmartPointer<const Self>;
itkNewMacro(Self);
itkTypeMacro(DistancePreservingRigidityPenaltyTerm, TransformPenaltyTerm);
using typename Superclass::CoordinateRepresentationType;
using typename Superclass::MovingImageType;
using typename Superclass::MovingImagePixelType;
using typename Superclass::MovingImagePointer;
using typename Superclass::MovingImageConstPointer;
using typename Superclass::FixedImageType;
using typename Superclass::FixedImagePointer;
using typename Superclass::FixedImageConstPointer;
using typename Superclass::FixedImageRegionType;
using typename Superclass::TransformType;
using typename Superclass::TransformPointer;
using typename Superclass::InputPointType;
using typename Superclass::OutputPointType;
using typename Superclass::TransformParametersType;
using typename Superclass::TransformJacobianType;
using typename Superclass::InterpolatorType;
using typename Superclass::InterpolatorPointer;
using typename Superclass::RealType;
using typename Superclass::GradientPixelType;
using typename Superclass::GradientImageType;
using typename Superclass::GradientImagePointer;
using typename Superclass::FixedImageMaskType;
using typename Superclass::FixedImageMaskPointer;
using typename Superclass::MovingImageMaskType;
using typename Superclass::MovingImageMaskPointer;
using typename Superclass::MeasureType;
using typename Superclass::DerivativeType;
using typename Superclass::DerivativeValueType;
using typename Superclass::ParametersType;
using typename Superclass::FixedImagePixelType;
using typename Superclass::ImageSampleContainerType;
using typename Superclass::ImageSampleContainerPointer;
using typename Superclass::ScalarType;
using typename Superclass::SpatialJacobianType;
using typename Superclass::JacobianOfSpatialJacobianType;
using typename Superclass::SpatialHessianType;
using typename Superclass::JacobianOfSpatialHessianType;
using typename Superclass::InternalMatrixType;
itkStaticConstMacro(FixedImageDimension, unsigned int, FixedImageType::ImageDimension);
itkStaticConstMacro(MovingImageDimension, unsigned int, FixedImageType::ImageDimension);
itkStaticConstMacro(ImageDimension, unsigned int, FixedImageType::ImageDimension);
void
Initialize() override;
using BSplineTransformType = AdvancedBSplineDeformableTransform<ScalarType, FixedImageDimension, 3>;
using BSplineTransformPointer = typename BSplineTransformType::Pointer;
using GridSpacingType = typename BSplineTransformType::SpacingType;
using CoefficientImageType = typename BSplineTransformType::ImageType;
using CoefficientImagePointer = typename CoefficientImageType::Pointer;
using CoefficientImageSpacingType = typename CoefficientImageType::SpacingType;
using CombinationTransformType = AdvancedCombinationTransform<ScalarType, FixedImageDimension>;
MeasureType
GetValue(const ParametersType & parameters) const override;
void
GetDerivative(const ParametersType & parameters, DerivativeType & derivative) const override;
void
GetValueAndDerivative(const ParametersType & parameters,
MeasureType & value,
DerivativeType & derivative) const override;
itkSetObjectMacro(BSplineTransform, BSplineTransformType);
using BSplineKnotImageType = Image<signed short, Self::MovingImageDimension>;
using BSplineKnotImagePointer = typename BSplineKnotImageType::Pointer;
using BSplineKnotImageRegionType = typename BSplineKnotImageType::RegionType;
using PenaltyGridImageType = Image<signed short, Self::MovingImageDimension>;
using PenaltyGridImagePointer = typename PenaltyGridImageType::Pointer;
using PenaltyGridImageRegionType = typename PenaltyGridImageType::RegionType;
using SegmentedImageType = Image<signed short, Self::MovingImageDimension>;
using SegmentedImagePointer = typename SegmentedImageType::Pointer;
using SegmentedImageRegionType = typename SegmentedImageType::RegionType;
itkSetObjectMacro(SegmentedImage, SegmentedImageType);
itkGetModifiableObjectMacro(SegmentedImage, SegmentedImageType);
itkSetObjectMacro(SampledSegmentedImage, SegmentedImageType);
itkGetModifiableObjectMacro(SampledSegmentedImage, SegmentedImageType);
itkGetConstMacro(NumberOfRigidGrids, unsigned int);
protected:
DistancePreservingRigidityPenaltyTerm();
~DistancePreservingRigidityPenaltyTerm() override = default;
void
PrintSelf(std::ostream & os, Indent indent) const override;
private:
BSplineTransformPointer m_BSplineTransform{};
mutable MeasureType m_RigidityPenaltyTermValue{};
BSplineKnotImagePointer m_BSplineKnotImage{};
PenaltyGridImagePointer m_PenaltyGridImage{};
SegmentedImagePointer m_SegmentedImage{};
SegmentedImagePointer m_SampledSegmentedImage{};
unsigned int m_NumberOfRigidGrids{};
};
// end class DistancePreservingRigidityPenaltyTerm
} // end namespace itk
#ifndef ITK_MANUAL_INSTANTIATION
# include "itkDistancePreservingRigidityPenaltyTerm.hxx"
#endif
#endif // #ifndef itkDistancePreservingRigidityPenaltyTerm_h
BSplineTransform
itk::AdvancedBSplineDeformableTransform
Deformable transform using a B-spline representation.
Definition itkAdvancedBSplineDeformableTransform.h:134
itk::AdvancedBSplineDeformableTransform< ScalarType, FixedImageDimension, 3 >::SpacingType
typename ImageType::SpacingType SpacingType
itk::AdvancedBSplineDeformableTransform< ScalarType, FixedImageDimension, 3 >::ImageType
Image< PixelType, Self::SpaceDimension > ImageType
itk::AdvancedBSplineDeformableTransform< ScalarType, FixedImageDimension, 3 >::Pointer
SmartPointer< Self > Pointer
Definition itkAdvancedBSplineDeformableTransform.h:141
itk::AdvancedCombinationTransform
This class combines two transforms: an 'initial transform' with a 'current transform'.
Definition itkAdvancedCombinationTransform.h:57
itk::AdvancedImageToImageMetric< TFixedImage, TFixedImage >::ImageSampleContainerPointer
typename ImageSamplerType::OutputVectorContainerPointer ImageSampleContainerPointer
Definition itkAdvancedImageToImageMetric.h:145
itk::AdvancedImageToImageMetric< TFixedImage, TFixedImage >::FixedImagePixelType
typename FixedImageType::PixelType FixedImagePixelType
Definition itkAdvancedImageToImageMetric.h:137
itk::AdvancedImageToImageMetric< TFixedImage, TFixedImage >::DerivativeValueType
typename DerivativeType::ValueType DerivativeValueType
Definition itkAdvancedImageToImageMetric.h:133
itk::AdvancedImageToImageMetric< TFixedImage, TFixedImage >::ImageSampleContainerType
typename ImageSamplerType::OutputVectorContainerType ImageSampleContainerType
Definition itkAdvancedImageToImageMetric.h:144
itk::AdvancedImageToImageMetric< TFixedImage, TFixedImage >::MovingImagePointer
typename MovingImageType::Pointer MovingImagePointer
Definition itkAdvancedImageToImageMetric.h:104
itk::AdvancedImageToImageMetric< TFixedImage, TFixedImage >::FixedImageMaskType
ImageMaskSpatialObject< Self::FixedImageDimension > FixedImageMaskType
Definition itkAdvancedImageToImageMetric.h:124
itk::AdvancedImageToImageMetric< TFixedImage, TFixedImage >::FixedImagePointer
typename FixedImageType::Pointer FixedImagePointer
Definition itkAdvancedImageToImageMetric.h:107
itk::AdvancedImageToImageMetric< TFixedImage, TFixedImage >::MovingImageMaskPointer
SmartPointer< MovingImageMaskType > MovingImageMaskPointer
Definition itkAdvancedImageToImageMetric.h:128
itk::AdvancedImageToImageMetric< TFixedImage, TFixedImage >::FixedImageMaskPointer
SmartPointer< FixedImageMaskType > FixedImageMaskPointer
Definition itkAdvancedImageToImageMetric.h:125
itk::AdvancedImageToImageMetric< TFixedImage, TFixedImage >::MovingImageMaskType
ImageMaskSpatialObject< Self::MovingImageDimension > MovingImageMaskType
Definition itkAdvancedImageToImageMetric.h:127
itk::DistancePreservingRigidityPenaltyTerm< typename MetricBase< TElastix >::FixedImageType, double >::m_PenaltyGridImage
PenaltyGridImagePointer m_PenaltyGridImage
Definition itkDistancePreservingRigidityPenaltyTerm.h:219
itk::DistancePreservingRigidityPenaltyTerm< typename MetricBase< TElastix >::FixedImageType, double >::GridSpacingType
typename BSplineTransformType::SpacingType GridSpacingType
Definition itkDistancePreservingRigidityPenaltyTerm.h:147
itk::DistancePreservingRigidityPenaltyTerm< typename MetricBase< TElastix >::FixedImageType, double >::BSplineKnotImageRegionType
typename BSplineKnotImageType::RegionType BSplineKnotImageRegionType
Definition itkDistancePreservingRigidityPenaltyTerm.h:175
itk::DistancePreservingRigidityPenaltyTerm< typename MetricBase< TElastix >::FixedImageType, double >::BSplineTransformPointer
typename BSplineTransformType::Pointer BSplineTransformPointer
Definition itkDistancePreservingRigidityPenaltyTerm.h:146
itk::DistancePreservingRigidityPenaltyTerm< typename MetricBase< TElastix >::FixedImageType, double >::PenaltyGridImageRegionType
typename PenaltyGridImageType::RegionType PenaltyGridImageRegionType
Definition itkDistancePreservingRigidityPenaltyTerm.h:180
itk::DistancePreservingRigidityPenaltyTerm::ITK_DISALLOW_COPY_AND_MOVE
ITK_DISALLOW_COPY_AND_MOVE(DistancePreservingRigidityPenaltyTerm)
itk::DistancePreservingRigidityPenaltyTerm::~DistancePreservingRigidityPenaltyTerm
~DistancePreservingRigidityPenaltyTerm() override=default
itk::DistancePreservingRigidityPenaltyTerm< typename MetricBase< TElastix >::FixedImageType, double >::BSplineKnotImagePointer
typename BSplineKnotImageType::Pointer BSplineKnotImagePointer
Definition itkDistancePreservingRigidityPenaltyTerm.h:174
itk::DistancePreservingRigidityPenaltyTerm::itkStaticConstMacro
itkStaticConstMacro(ImageDimension, unsigned int, FixedImageType::ImageDimension)
itk::DistancePreservingRigidityPenaltyTerm< typename MetricBase< TElastix >::FixedImageType, double >::m_BSplineKnotImage
BSplineKnotImagePointer m_BSplineKnotImage
Definition itkDistancePreservingRigidityPenaltyTerm.h:218
itk::DistancePreservingRigidityPenaltyTerm< typename MetricBase< TElastix >::FixedImageType, double >::BSplineKnotImageType
Image< signed short, Self::MovingImageDimension > BSplineKnotImageType
Definition itkDistancePreservingRigidityPenaltyTerm.h:173
itk::DistancePreservingRigidityPenaltyTerm< typename MetricBase< TElastix >::FixedImageType, double >::SegmentedImagePointer
typename SegmentedImageType::Pointer SegmentedImagePointer
Definition itkDistancePreservingRigidityPenaltyTerm.h:184
itk::DistancePreservingRigidityPenaltyTerm::itkStaticConstMacro
itkStaticConstMacro(FixedImageDimension, unsigned int, FixedImageType::ImageDimension)
itk::DistancePreservingRigidityPenaltyTerm::itkGetModifiableObjectMacro
itkGetModifiableObjectMacro(SegmentedImage, SegmentedImageType)
itk::DistancePreservingRigidityPenaltyTerm::GetDerivative
void GetDerivative(const ParametersType &parameters, DerivativeType &derivative) const override
itk::DistancePreservingRigidityPenaltyTerm< typename MetricBase< TElastix >::FixedImageType, double >::m_BSplineTransform
BSplineTransformPointer m_BSplineTransform
Definition itkDistancePreservingRigidityPenaltyTerm.h:214
itk::DistancePreservingRigidityPenaltyTerm::itkGetModifiableObjectMacro
itkGetModifiableObjectMacro(SampledSegmentedImage, SegmentedImageType)
itk::DistancePreservingRigidityPenaltyTerm< typename MetricBase< TElastix >::FixedImageType, double >::PenaltyGridImagePointer
typename PenaltyGridImageType::Pointer PenaltyGridImagePointer
Definition itkDistancePreservingRigidityPenaltyTerm.h:179
itk::DistancePreservingRigidityPenaltyTerm< typename MetricBase< TElastix >::FixedImageType, double >::ConstPointer
SmartPointer< const Self > ConstPointer
Definition itkDistancePreservingRigidityPenaltyTerm.h:85
itk::DistancePreservingRigidityPenaltyTerm< typename MetricBase< TElastix >::FixedImageType, double >::BSplineTransformType
AdvancedBSplineDeformableTransform< ScalarType, FixedImageDimension, 3 > BSplineTransformType
Definition itkDistancePreservingRigidityPenaltyTerm.h:145
itk::DistancePreservingRigidityPenaltyTerm< typename MetricBase< TElastix >::FixedImageType, double >::SegmentedImageType
Image< signed short, Self::MovingImageDimension > SegmentedImageType
Definition itkDistancePreservingRigidityPenaltyTerm.h:183
itk::DistancePreservingRigidityPenaltyTerm::itkStaticConstMacro
itkStaticConstMacro(MovingImageDimension, unsigned int, FixedImageType::ImageDimension)
itk::DistancePreservingRigidityPenaltyTerm< typename MetricBase< TElastix >::FixedImageType, double >::Self
DistancePreservingRigidityPenaltyTerm Self
Definition itkDistancePreservingRigidityPenaltyTerm.h:82
itk::DistancePreservingRigidityPenaltyTerm::PrintSelf
void PrintSelf(std::ostream &os, Indent indent) const override
itk::DistancePreservingRigidityPenaltyTerm< typename MetricBase< TElastix >::FixedImageType, double >::m_SampledSegmentedImage
SegmentedImagePointer m_SampledSegmentedImage
Definition itkDistancePreservingRigidityPenaltyTerm.h:221
itk::DistancePreservingRigidityPenaltyTerm< typename MetricBase< TElastix >::FixedImageType, double >::m_SegmentedImage
SegmentedImagePointer m_SegmentedImage
Definition itkDistancePreservingRigidityPenaltyTerm.h:220
itk::DistancePreservingRigidityPenaltyTerm::DistancePreservingRigidityPenaltyTerm
DistancePreservingRigidityPenaltyTerm()
itk::DistancePreservingRigidityPenaltyTerm< typename MetricBase< TElastix >::FixedImageType, double >::CoefficientImageType
typename BSplineTransformType::ImageType CoefficientImageType
Definition itkDistancePreservingRigidityPenaltyTerm.h:148
itk::DistancePreservingRigidityPenaltyTerm::GetValueAndDerivative
void GetValueAndDerivative(const ParametersType &parameters, MeasureType &value, DerivativeType &derivative) const override
itk::DistancePreservingRigidityPenaltyTerm< typename MetricBase< TElastix >::FixedImageType, double >::Pointer
SmartPointer< Self > Pointer
Definition itkDistancePreservingRigidityPenaltyTerm.h:84
itk::DistancePreservingRigidityPenaltyTerm< typename MetricBase< TElastix >::FixedImageType, double >::CombinationTransformType
AdvancedCombinationTransform< ScalarType, FixedImageDimension > CombinationTransformType
Definition itkDistancePreservingRigidityPenaltyTerm.h:151
itk::DistancePreservingRigidityPenaltyTerm< typename MetricBase< TElastix >::FixedImageType, double >::m_RigidityPenaltyTermValue
MeasureType m_RigidityPenaltyTermValue
Definition itkDistancePreservingRigidityPenaltyTerm.h:216
itk::DistancePreservingRigidityPenaltyTerm< typename MetricBase< TElastix >::FixedImageType, double >::CoefficientImagePointer
typename CoefficientImageType::Pointer CoefficientImagePointer
Definition itkDistancePreservingRigidityPenaltyTerm.h:149
itk::DistancePreservingRigidityPenaltyTerm< typename MetricBase< TElastix >::FixedImageType, double >::CoefficientImageSpacingType
typename CoefficientImageType::SpacingType CoefficientImageSpacingType
Definition itkDistancePreservingRigidityPenaltyTerm.h:150
itk::DistancePreservingRigidityPenaltyTerm::Initialize
void Initialize() override
itk::DistancePreservingRigidityPenaltyTerm::GetValue
MeasureType GetValue(const ParametersType &parameters) const override
itk::DistancePreservingRigidityPenaltyTerm< typename MetricBase< TElastix >::FixedImageType, double >::PenaltyGridImageType
Image< signed short, Self::MovingImageDimension > PenaltyGridImageType
Definition itkDistancePreservingRigidityPenaltyTerm.h:178
itk::DistancePreservingRigidityPenaltyTerm< typename MetricBase< TElastix >::FixedImageType, double >::m_NumberOfRigidGrids
unsigned int m_NumberOfRigidGrids
Definition itkDistancePreservingRigidityPenaltyTerm.h:223
itk::DistancePreservingRigidityPenaltyTerm< typename MetricBase< TElastix >::FixedImageType, double >::SegmentedImageRegionType
typename SegmentedImageType::RegionType SegmentedImageRegionType
Definition itkDistancePreservingRigidityPenaltyTerm.h:185
itk::DistancePreservingRigidityPenaltyTerm< typename MetricBase< TElastix >::FixedImageType, double >::Superclass
TransformPenaltyTerm< typename MetricBase< TElastix >::FixedImageType, double > Superclass
Definition itkDistancePreservingRigidityPenaltyTerm.h:83
itk::TransformPenaltyTerm::ScalarType
TScalarType ScalarType
Definition itkTransformPenaltyTerm.h:105
itk::TransformPenaltyTerm::JacobianOfSpatialJacobianType
typename TransformType::JacobianOfSpatialJacobianType JacobianOfSpatialJacobianType
Definition itkTransformPenaltyTerm.h:110
itk::TransformPenaltyTerm::TransformType
typename Superclass::AdvancedTransformType TransformType
Definition itkTransformPenaltyTerm.h:108
itk::TransformPenaltyTerm::SpatialHessianType
typename TransformType::SpatialHessianType SpatialHessianType
Definition itkTransformPenaltyTerm.h:111
itk::TransformPenaltyTerm::SpatialJacobianType
typename TransformType::SpatialJacobianType SpatialJacobianType
Definition itkTransformPenaltyTerm.h:109
itk::TransformPenaltyTerm::InternalMatrixType
typename TransformType::InternalMatrixType InternalMatrixType
Definition itkTransformPenaltyTerm.h:113
itk::TransformPenaltyTerm::JacobianOfSpatialHessianType
typename TransformType::JacobianOfSpatialHessianType JacobianOfSpatialHessianType
Definition itkTransformPenaltyTerm.h:112
itk::TransformPenaltyTerm< TFixedImage, TScalarType >::TransformPenaltyTerm
TransformPenaltyTerm()=default
itkAdvancedBSplineDeformableTransform.h
itkAdvancedCombinationTransform.h
itkTransformPenaltyTerm.h
itk
Definition itkAdvancedImageToImageMetric.h:43

Generated on 1768596610 for elastix by 1.15.0 |