18 #ifndef itkImageRegistrationMethodv4_h
19 #define itkImageRegistrationMethodv4_h
33 #include "ITKRegistrationMethodsv4Export.h"
59 extern ITKRegistrationMethodsv4_EXPORT std::ostream &
112 template <
typename TFixedImage,
113 typename TMovingImage,
114 typename TOutputTransform = Transform<double, TFixedImage::ImageDimension, TFixedImage::ImageDimension>,
115 typename TVirtualImage = TFixedImage,
116 typename TPointSet = PointSet<unsigned int, TFixedImage::ImageDimension>>
132 static constexpr
unsigned int ImageDimension = TFixedImage::ImageDimension;
154 using RealType =
typename OutputTransformType::ScalarType;
215 #if !defined(ITK_LEGACY_REMOVE)
230 this->SetFixedImage(0, image);
232 virtual const FixedImageType *
235 return this->GetFixedImage(0);
239 virtual const FixedImageType * GetFixedImage(
SizeValueType)
const;
246 this->SetMovingImage(0, image);
248 virtual const MovingImageType *
251 return this->GetMovingImage(0);
255 virtual const MovingImageType * GetMovingImage(
SizeValueType)
const;
262 this->SetFixedPointSet(0, pointSet);
264 virtual const PointSetType *
267 return this->GetFixedPointSet(0);
271 virtual const PointSetType * GetFixedPointSet(
SizeValueType)
const;
278 this->SetMovingPointSet(0, pointSet);
280 virtual const PointSetType *
283 return this->GetMovingPointSet(0);
287 virtual const PointSetType * GetMovingPointSet(
SizeValueType)
const;
291 itkSetObjectMacro(
Optimizer, OptimizerType);
292 itkGetModifiableObjectMacro(
Optimizer, OptimizerType);
304 SetOptimizerWeights(OptimizerWeightsType &);
305 itkGetConstMacro(OptimizerWeights, OptimizerWeightsType);
309 itkSetObjectMacro(Metric, MetricType);
310 itkGetModifiableObjectMacro(Metric, MetricType);
330 MetricSamplingReinitializeSeed();
332 MetricSamplingReinitializeSeed(
int seed);
337 SetMetricSamplingPercentage(
const RealType);
341 SetMetricSamplingPercentagePerLevel(
const MetricSamplingPercentageArrayType & samplingPercentages);
342 itkGetConstMacro(MetricSamplingPercentagePerLevel, MetricSamplingPercentageArrayType);
346 itkSetGetDecoratedObjectInputMacro(FixedInitialTransform, InitialTransformType);
349 itkSetGetDecoratedObjectInputMacro(MovingInitialTransform, InitialTransformType);
366 itkSetGetDecoratedObjectInputMacro(InitialTransform, InitialTransformType);
370 SetTransformParametersAdaptorsPerLevel(TransformParametersAdaptorsContainerType &);
371 const TransformParametersAdaptorsContainerType &
372 GetTransformParametersAdaptorsPerLevel()
const;
397 for (
unsigned int level = 0; level < factors.
Size(); ++level)
400 shrinkFactors.Fill(factors[level]);
401 this->SetShrinkFactorsPerDimension(level, shrinkFactors);
409 ShrinkFactorsPerDimensionContainerType
412 if (level >= this->m_ShrinkFactorsPerLevel.size())
414 itkExceptionMacro(
"Requesting level greater than the number of levels.");
416 return this->m_ShrinkFactorsPerLevel[level];
426 if (level >= this->m_ShrinkFactorsPerLevel.size())
428 this->m_ShrinkFactorsPerLevel.resize(level + 1);
430 this->m_ShrinkFactorsPerLevel[level] = factors;
440 itkSetMacro(SmoothingSigmasPerLevel, SmoothingSigmasArrayType);
441 itkGetConstMacro(SmoothingSigmasPerLevel, SmoothingSigmasArrayType);
448 itkSetMacro(SmoothingSigmasAreSpecifiedInPhysicalUnits,
bool);
449 itkGetConstMacro(SmoothingSigmasAreSpecifiedInPhysicalUnits,
bool);
450 itkBooleanMacro(SmoothingSigmasAreSpecifiedInPhysicalUnits);
455 using Superclass::MakeOutput;
468 return this->GetOutput();
470 virtual const DecoratedOutputTransformType *
473 return this->GetOutput();
476 virtual OutputTransformType *
477 GetModifiableTransform();
478 virtual const OutputTransformType *
479 GetTransform()
const;
488 itkGetConstReferenceMacro(CurrentMetricValue, RealType);
491 itkGetConstReferenceMacro(CurrentConvergenceValue, RealType);
494 itkGetConstReferenceMacro(IsConverged,
bool);
499 itkSetMacro(InPlace,
bool);
500 itkGetConstMacro(InPlace,
bool);
501 itkBooleanMacro(InPlace);
509 itkBooleanMacro(InitializeCenterOfLinearOutputTransform);
510 itkSetMacro(InitializeCenterOfLinearOutputTransform,
bool);
511 itkGetConstMacro(InitializeCenterOfLinearOutputTransform,
bool);
527 InitializeCenterOfLinearOutputTransform();
533 PrintSelf(std::ostream & os,
Indent indent)
const override;
537 GenerateData()
override;
547 virtual VirtualImageBaseConstPointer
548 GetCurrentLevelVirtualDomainImage();
552 SetMetricSamplePoints();
604 template <
typename TTransform>
608 ptr = TTransform::New();
619 #ifndef ITK_MANUAL_INSTANTIATION
620 # include "itkImageRegistrationMethodv4.hxx"