18#ifndef itkSyNImageRegistrationMethod_h
19#define itkSyNImageRegistrationMethod_h
66template <
typename TFixedImage,
67 typename TMovingImage,
68 typename TOutputTransform = DisplacementFieldTransform<double, TFixedImage::ImageDimension>,
69 typename TVirtualImage = TFixedImage,
70 typename TPointSet = PointSet<unsigned int, TFixedImage::ImageDimension>>
87 static constexpr unsigned int ImageDimension = TFixedImage::ImageDimension;
95 using typename Superclass::FixedImagesContainerType;
98 using typename Superclass::MovingImagesContainerType;
100 using typename Superclass::PointSetType;
102 using typename Superclass::PointSetsContainerType;
105 using typename Superclass::ImageMetricType;
110 using typename Superclass::FixedImageMaskType;
112 using typename Superclass::FixedImageMasksContainerType;
113 using typename Superclass::MovingImageMaskType;
115 using typename Superclass::MovingImageMasksContainerType;
118 using typename Superclass::VirtualImageBaseType;
119 using typename Superclass::VirtualImageBaseConstPointer;
121 using typename Superclass::MultiMetricType;
122 using typename Superclass::MetricType;
124 using typename Superclass::PointSetMetricType;
126 using typename Superclass::InitialTransformType;
129 using RealType =
typename OutputTransformType::ScalarType;
136 using typename Superclass::CompositeTransformType;
139 using typename Superclass::DecoratedOutputTransformType;
163 itkSetMacro(ConvergenceWindowSize,
unsigned int);
164 itkGetConstMacro(ConvergenceWindowSize,
unsigned int);
171 itkSetMacro(DownsampleImagesForMetricDerivatives,
bool);
172 itkGetConstMacro(DownsampleImagesForMetricDerivatives,
bool);
178 itkSetMacro(AverageMidPointGradients,
bool);
179 itkGetConstMacro(AverageMidPointGradients,
bool);
185 itkSetMacro(GaussianSmoothingVarianceForTheUpdateField,
RealType);
186 itkGetConstReferenceMacro(GaussianSmoothingVarianceForTheUpdateField,
RealType);
192 itkSetMacro(GaussianSmoothingVarianceForTheTotalField,
RealType);
193 itkGetConstReferenceMacro(GaussianSmoothingVarianceForTheTotalField,
RealType);
263 unsigned int m_ConvergenceWindowSize{ 10 };
266 bool m_DownsampleImagesForMetricDerivatives{
true };
267 bool m_AverageMidPointGradients{
false };
270 RealType m_GaussianSmoothingVarianceForTheUpdateField{ 3.0 };
271 RealType m_GaussianSmoothingVarianceForTheTotalField{ 0.5 };
275#ifndef ITK_MANUAL_INSTANTIATION
276# include "itkSyNImageRegistrationMethod.hxx"
Implementation of an image mask as spatial object.
Interface method for the current registration framework.
std::vector< MovingImageMaskConstPointer > MovingImageMasksContainerType
std::vector< FixedImageMaskConstPointer > FixedImageMasksContainerType
std::vector< PointSetConstPointer > PointSetsContainerType
std::vector< MovingImageConstPointer > MovingImagesContainerType
std::vector< FixedImageConstPointer > FixedImagesContainerType
Templated n-dimensional image class.
Control indentation during Print() invocation.
Light weight base class for most itk classes.
Interface method for the performing greedy SyN image registration.
virtual DisplacementFieldPointer GaussianSmoothDisplacementField(const DisplacementFieldType *, const RealType)
typename OutputTransformType::ScalarType RealType
void PrintSelf(std::ostream &os, Indent indent) const override
typename ImageMaskSpatialObjectType::ImageType FixedMaskImageType
typename CompositeTransformType::TransformType TransformBaseType
typename ImageMetricType::Pointer ImageMetricPointer
virtual DisplacementFieldPointer ComputeUpdateField(const FixedImagesContainerType, const PointSetsContainerType, const TransformBaseType *, const MovingImagesContainerType, const PointSetsContainerType, const TransformBaseType *, const FixedImageMasksContainerType, const MovingImageMasksContainerType, MeasureType &)
typename DerivativeType::ValueType DerivativeValueType
virtual DisplacementFieldPointer ScaleUpdateField(const DisplacementFieldType *)
typename ImageMaskSpatialObjectType::ImageType MovingMaskImageType
virtual void StartOptimization()
typename FixedImageType::Pointer FixedImagePointer
typename DisplacementFieldType::Pointer DisplacementFieldPointer
TOutputTransform OutputTransformType
void InitializeRegistrationAtEachLevel(const SizeValueType) override
typename MovingImageType::Pointer MovingImagePointer
virtual DisplacementFieldPointer ComputeMetricGradientField(const FixedImagesContainerType, const PointSetsContainerType, const TransformBaseType *, const MovingImagesContainerType, const PointSetsContainerType, const TransformBaseType *, const FixedImageMasksContainerType, const MovingImageMasksContainerType, MeasureType &)
TFixedImage FixedImageType
typename DisplacementFieldType::PixelType DisplacementVectorType
SyNImageRegistrationMethod()
~SyNImageRegistrationMethod() override=default
typename Superclass::VirtualImageType VirtualImageType
typename DecoratedOutputTransformType::Pointer DecoratedOutputTransformPointer
typename MetricType::Pointer MetricPointer
typename OutputTransformType::DisplacementFieldType DisplacementFieldType
typename OutputTransformType::Pointer OutputTransformPointer
void GenerateData() override
virtual DisplacementFieldPointer InvertDisplacementField(const DisplacementFieldType *, const DisplacementFieldType *=nullptr)
TMovingImage MovingImageType
typename DisplacementFieldTransformType::Pointer DisplacementFieldTransformPointer
typename ImageMetricType::MeasureType MeasureType
typename OutputTransformType::DerivativeType DerivativeType
typename PointSetType::Pointer PointSetPointer
SmartPointer< Self > Pointer
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
unsigned long SizeValueType