SimpleITK  2.0.0
sitkImageRegistrationMethod.h
Go to the documentation of this file.
1 /*=========================================================================
2 *
3 * Copyright NumFOCUS
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 #ifndef sitkImageRegistrationMethod_h
19 #define sitkImageRegistrationMethod_h
20 
21 #include "sitkRegistration.h"
22 
23 #include "sitkDetail.h"
24 #include "sitkImage.h"
25 #include "sitkPixelIDTokens.h"
27 #include "sitkProcessObject.h"
28 
29 #include "sitkRandomSeed.h"
30 #include "sitkInterpolator.h"
31 #include "sitkTransform.h"
32 
33 
34 namespace itk
35 {
36 
37 #ifndef SWIG
38 template< typename TInternalComputationValueType> class ObjectToObjectOptimizerBaseTemplate;
39 template<typename TFixedImage,
40  typename TMovingImage,
41  typename TVirtualImage,
42  typename TInternalComputationValueType,
43  typename TMetricTraits >
44 class ImageToImageMetricv4;
45 
46 template<typename TFixedImageType,
47  typename TMovingImageType,
48  typename TVirtualImageType,
49  typename TCoordRep>
50 class DefaultImageToImageMetricTraitsv4;
51 
52 template<typename TMetric> class RegistrationParameterScalesEstimator;
53 
54 template<unsigned int VDimension> class SpatialObject;
55 
56 class Command;
57 class EventObject;
58 #endif
59 
60 
61 
62 namespace simple
63 {
64  class BSplineTransform;
65 
90  : public ProcessObject
91  {
92  public:
93 
96 
97  ~ImageRegistrationMethod() override;
98 
100 
101  std::string GetName() const override { return std::string("ImageRegistrationMethod"); }
102 
109  std::string ToString() const override;
110 
116  { return this->m_Interpolator; }
117  SITK_RETURN_SELF_TYPE_HEADER SetInterpolator ( InterpolatorEnum Interpolator )
118  { this->m_Interpolator = Interpolator; return *this; }
137 #if !defined(SWIG) || defined(JAVASWIG) || defined(CSHARPSWIG)
138  // Only wrap this method if the wrapping language is strongly typed
139  SITK_RETURN_SELF_TYPE_HEADER SetInitialTransform ( const Transform &transform );
140 #endif
141  SITK_RETURN_SELF_TYPE_HEADER SetInitialTransform ( Transform &transform, bool inPlace=true );
143  { return this->m_InitialTransform; }
145  { return this->m_InitialTransformInPlace;}
163  void SetInitialTransformAsBSpline( BSplineTransform &transform,
164  bool inPlace=true,
165  const std::vector<unsigned int> &scaleFactors=std::vector<unsigned int>() );
166 
180  SITK_RETURN_SELF_TYPE_HEADER SetMovingInitialTransform( const Transform &transform )
181  { this->m_MovingInitialTransform = transform; return *this; }
183  { return this->m_MovingInitialTransform; }
196  SITK_RETURN_SELF_TYPE_HEADER SetFixedInitialTransform( const Transform &transform )
197  { this->m_FixedInitialTransform = transform; return *this; }
199  { return this->m_FixedInitialTransform; }
207  SITK_RETURN_SELF_TYPE_HEADER SetVirtualDomain( const std::vector<uint32_t> &virtualSize,
208  const std::vector<double> &virtualOrigin,
209  const std::vector<double> &virtualSpacing,
210  const std::vector<double> &virtualDirection );
211  SITK_RETURN_SELF_TYPE_HEADER SetVirtualDomainFromImage( const Image &virtualImage );
220  SITK_RETURN_SELF_TYPE_HEADER SetMetricAsANTSNeighborhoodCorrelation( unsigned int radius );
221 
226  SITK_RETURN_SELF_TYPE_HEADER SetMetricAsCorrelation( );
227 
232  SITK_RETURN_SELF_TYPE_HEADER SetMetricAsDemons( double intensityDifferenceThreshold = 0.001 );
233 
238  SITK_RETURN_SELF_TYPE_HEADER SetMetricAsJointHistogramMutualInformation( unsigned int numberOfHistogramBins = 20,
239  double varianceForJointPDFSmoothing = 1.5);
240 
245  SITK_RETURN_SELF_TYPE_HEADER SetMetricAsMeanSquares( );
246 
252  SITK_RETURN_SELF_TYPE_HEADER SetMetricAsMattesMutualInformation( unsigned int numberOfHistogramBins = 50 );
253 
254 
257  EachIteration
258  };
259 
264  SITK_RETURN_SELF_TYPE_HEADER SetOptimizerAsConjugateGradientLineSearch( double learningRate,
265  unsigned int numberOfIterations,
266  double convergenceMinimumValue = 1e-6,
267  unsigned int convergenceWindowSize = 10,
268  double lineSearchLowerLimit = 0,
269  double lineSearchUpperLimit = 5.0,
270  double lineSearchEpsilon = 0.01,
271  unsigned int lineSearchMaximumIterations = 20,
272  EstimateLearningRateType estimateLearningRate = Once,
273  double maximumStepSizeInPhysicalUnits = 0.0 );
274 
279  SITK_RETURN_SELF_TYPE_HEADER SetOptimizerAsRegularStepGradientDescent( double learningRate,
280  double minStep,
281  unsigned int numberOfIterations,
282  double relaxationFactor=0.5,
283  double gradientMagnitudeTolerance = 1e-4,
284  EstimateLearningRateType estimateLearningRate = Never,
285  double maximumStepSizeInPhysicalUnits = 0.0);
286 
291  SITK_RETURN_SELF_TYPE_HEADER SetOptimizerAsGradientDescent( double learningRate,
292  unsigned int numberOfIterations,
293  double convergenceMinimumValue = 1e-6,
294  unsigned int convergenceWindowSize = 10,
295  EstimateLearningRateType estimateLearningRate = Once,
296  double maximumStepSizeInPhysicalUnits = 0.0);
297 
302  SITK_RETURN_SELF_TYPE_HEADER SetOptimizerAsGradientDescentLineSearch( double learningRate,
303  unsigned int numberOfIterations,
304  double convergenceMinimumValue = 1e-6,
305  unsigned int convergenceWindowSize = 10,
306  double lineSearchLowerLimit = 0,
307  double lineSearchUpperLimit = 5.0,
308  double lineSearchEpsilon = 0.01,
309  unsigned int lineSearchMaximumIterations = 20,
310  EstimateLearningRateType estimateLearningRate = Once,
311  double maximumStepSizeInPhysicalUnits = 0.0 );
312 
319  SITK_RETURN_SELF_TYPE_HEADER SetOptimizerAsLBFGSB(double gradientConvergenceTolerance = 1e-5,
320  unsigned int numberOfIterations = 500,
321  unsigned int maximumNumberOfCorrections = 5,
322  unsigned int maximumNumberOfFunctionEvaluations = 2000,
323  double costFunctionConvergenceFactor = 1e+7,
324  double lowerBound = std::numeric_limits<double>::min(),
325  double upperBound = std::numeric_limits<double>::max(),
326  bool trace = false );
327 
340  SITK_RETURN_SELF_TYPE_HEADER SetOptimizerAsLBFGS2( double solutionAccuracy = 1e-5,
341  unsigned int numberOfIterations = 0,
342  unsigned int hessianApproximateAccuracy = 6,
343  unsigned int deltaConvergenceDistance = 0,
344  double deltaConvergenceTolerance = 1e-5,
345  unsigned int lineSearchMaximumEvaluations = 40,
346  double lineSearchMinimumStep = 1e-20,
347  double lineSearchMaximumStep = 1e20,
348  double lineSearchAccuracy = 1e-4);
349 
350 
367  SITK_RETURN_SELF_TYPE_HEADER SetOptimizerAsExhaustive( const std::vector<unsigned int> &numberOfSteps,
368  double stepLength = 1.0 );
369 
374  SITK_RETURN_SELF_TYPE_HEADER SetOptimizerAsAmoeba(double simplexDelta,
375  unsigned int numberOfIterations,
376  double parametersConvergenceTolerance=1e-8,
377  double functionConvergenceTolerance=1e-4,
378  bool withRestarts = false );
379 
391  SITK_RETURN_SELF_TYPE_HEADER SetOptimizerWeights(const std::vector<double> &weights);
392  std::vector<double> GetOptimizerWeights( ) const;
399  SITK_RETURN_SELF_TYPE_HEADER SetOptimizerAsPowell(unsigned int numberOfIterations = 100,
400  unsigned int maximumLineIterations = 100,
401  double stepLength = 1,
402  double stepTolerance = 1e-6,
403  double valueTolerance = 1e-6 );
404 
413  SITK_RETURN_SELF_TYPE_HEADER SetOptimizerAsOnePlusOneEvolutionary(unsigned int numberOfIterations = 100,
414  double epsilon = 1.5e-4,
415  double initialRadius = 1.01,
416  double growthFactor = -1.0,
417  double shrinkFactor = -1.0,
418  unsigned int seed = sitkWallClock);
419 
420 
421 
423  SITK_RETURN_SELF_TYPE_HEADER SetOptimizerScales( const std::vector<double> &scales );
424 
431  SITK_RETURN_SELF_TYPE_HEADER SetOptimizerScalesFromJacobian( unsigned int centralRegionRadius = 5 );
432 
438  SITK_RETURN_SELF_TYPE_HEADER SetOptimizerScalesFromIndexShift( unsigned int centralRegionRadius = 5,
439  double smallParameterVariation = 0.01 );
440 
447  SITK_RETURN_SELF_TYPE_HEADER SetOptimizerScalesFromPhysicalShift( unsigned int centralRegionRadius = 5,
448  double smallParameterVariation = 0.01 );
449 
450 
460  SITK_RETURN_SELF_TYPE_HEADER SetMetricFixedMask( const Image &binaryMask );
461 
471  SITK_RETURN_SELF_TYPE_HEADER SetMetricMovingMask( const Image &binaryMask );
472 
491  SITK_RETURN_SELF_TYPE_HEADER SetMetricSamplingPercentage(double percentage, unsigned int seed = sitkWallClock);
492  SITK_RETURN_SELF_TYPE_HEADER SetMetricSamplingPercentagePerLevel(const std::vector<double> &percentage, unsigned int seed = sitkWallClock);
496  const std::vector<double> &GetMetricSamplingPercentagePerLevel() const;
497 
501  RANDOM
502  };
503 
508  SITK_RETURN_SELF_TYPE_HEADER SetMetricSamplingStrategy( MetricSamplingStrategyType strategy);
509 
519  SITK_RETURN_SELF_TYPE_HEADER SetMetricUseFixedImageGradientFilter(bool);
520  SITK_RETURN_SELF_TYPE_HEADER MetricUseFixedImageGradientFilterOn() {return this->SetMetricUseFixedImageGradientFilter(true);}
521  SITK_RETURN_SELF_TYPE_HEADER MetricUseFixedImageGradientFilterOff() {return this->SetMetricUseFixedImageGradientFilter(false);}
535  SITK_RETURN_SELF_TYPE_HEADER SetMetricUseMovingImageGradientFilter(bool);
536  SITK_RETURN_SELF_TYPE_HEADER MetricUseMovingImageGradientFilterOn() {return this->SetMetricUseMovingImageGradientFilter(true);}
537  SITK_RETURN_SELF_TYPE_HEADER MetricUseMovingImageGradientFilterOff() {return this->SetMetricUseMovingImageGradientFilter(false);}
548  SITK_RETURN_SELF_TYPE_HEADER SetShrinkFactorsPerLevel( const std::vector<unsigned int> &shrinkFactors );
549 
558  SITK_RETURN_SELF_TYPE_HEADER SetSmoothingSigmasPerLevel( const std::vector<double> &smoothingSigmas );
559 
566  SITK_RETURN_SELF_TYPE_HEADER SetSmoothingSigmasAreSpecifiedInPhysicalUnits(bool arg);
567  SITK_RETURN_SELF_TYPE_HEADER SmoothingSigmasAreSpecifiedInPhysicalUnitsOn() { this->SetSmoothingSigmasAreSpecifiedInPhysicalUnits(true); return *this;}
568  SITK_RETURN_SELF_TYPE_HEADER SmoothingSigmasAreSpecifiedInPhysicalUnitsOff() { this->SetSmoothingSigmasAreSpecifiedInPhysicalUnits(false); return *this;}
573  Transform Execute ( const Image &fixed, const Image & moving );
574 
575 
585  double MetricEvaluate( const Image &fixed, const Image & moving );
586 
587 
594  unsigned int GetOptimizerIteration() const;
595  std::vector<double> GetOptimizerPosition() const;
596  double GetOptimizerLearningRate() const;
597  double GetOptimizerConvergenceValue() const;
598  double GetMetricValue() const;
599 
608  uint64_t GetMetricNumberOfValidPoints() const;
609 
610 
611  unsigned int GetCurrentLevel() const;
612 
620  std::vector<double> GetOptimizerScales() const;
621 
624  std::string GetOptimizerStopConditionDescription() const;
625 
626  protected:
627 
628  template<class TImage>
629  Transform ExecuteInternal ( const Image &fixed, const Image &moving );
630 
631  template<class TImage>
632  double EvaluateInternal ( const Image &fixed, const Image &moving );
633 
634 
635  itk::ObjectToObjectOptimizerBaseTemplate<double> *CreateOptimizer( unsigned int numberOfTransformParameters );
636 
637  template<unsigned int VDimension>
638  itk::SpatialObject<VDimension> *CreateSpatialObjectMask(const Image &mask);
639 
640  template <class TImageType>
641  itk::ImageToImageMetricv4<TImageType,
642  TImageType,
643  TImageType,
644  double,
646  >* CreateMetric( );
647 
648  template <class TImageType>
649  void SetupMetric(
650  itk::ImageToImageMetricv4<TImageType,
651  TImageType,
652  TImageType,
653  double,
655  >*, const TImageType*, const TImageType* );
656 
657  template <typename TMetric>
659 
660  template <typename TTransformAdaptorPointer, typename TRegistrationMethod >
661  std::vector< TTransformAdaptorPointer >
662  CreateTransformParametersAdaptor(
663  TRegistrationMethod* method);
664 
665  void PreUpdate( itk::ProcessObject *p ) override;
666  void OnActiveProcessDelete( ) noexcept override;
667  unsigned long AddITKObserver(const itk::EventObject &, itk::Command *) override;
668  void RemoveITKObserver( EventCommand &e ) override;
669 
670  private:
671 
672  std::function<unsigned int()> m_pfGetOptimizerIteration;
673  std::function<std::vector<double>()> m_pfGetOptimizerPosition;
674  std::function<double()> m_pfGetOptimizerLearningRate;
675  std::function<double()> m_pfGetOptimizerConvergenceValue;
676  std::function<double()> m_pfGetMetricValue;
677  std::function<uint64_t()> m_pfGetMetricNumberOfValidPoints;
678  std::function<std::vector<double>()> m_pfGetOptimizerScales;
679  std::function<std::string()> m_pfGetOptimizerStopConditionDescription;
680 
681 
682  std::function<unsigned int()> m_pfGetCurrentLevel;
683 
684  std::function<void (itk::TransformBase *outTransform)> m_pfUpdateWithBestValue;
685 
686  template < class TMemberFunctionPointer >
688  {
689  using ObjectType = typename ::detail::FunctionTraits<TMemberFunctionPointer>::ClassType;
690 
691  template< typename TImageType >
692  TMemberFunctionPointer operator() ( ) const
693  {
694  return &ObjectType::template EvaluateInternal< TImageType >;
695  }
696  };
697 
698  typedef Transform (ImageRegistrationMethod::*MemberFunctionType)( const Image &fixed, const Image &moving );
699  typedef double (ImageRegistrationMethod::*EvaluateMemberFunctionType)( const Image &fixed, const Image &moving );
700  friend struct detail::MemberFunctionAddressor<MemberFunctionType>;
701  std::unique_ptr<detail::MemberFunctionFactory<MemberFunctionType> > m_MemberFactory;
702  std::unique_ptr<detail::MemberFunctionFactory<EvaluateMemberFunctionType> > m_EvaluateMemberFactory;
703 
709 
710  std::vector<uint32_t> m_VirtualDomainSize;
711  std::vector<double> m_VirtualDomainOrigin;
712  std::vector<double> m_VirtualDomainSpacing;
713  std::vector<double> m_VirtualDomainDirection;
714 
715  // optimizer
716  enum OptimizerType { ConjugateGradientLineSearch,
725  LBFGS2
726  };
748  std::vector<unsigned int> m_OptimizerNumberOfSteps;
761  unsigned int m_OptimizerSeed;
770 
771 
772  std::vector<unsigned int> m_TransformBSplineScaleFactors;
773 
774  std::vector<double> m_OptimizerWeights;
775 
780  PhysicalShift
781  };
783  std::vector<double> m_OptimizerScales;
786 
787  // metric
788  enum MetricType { ANTSNeighborhoodCorrelation,
793  MattesMutualInformation
794  };
796  unsigned int m_MetricRadius;
800 
803 
804  std::vector<double> m_MetricSamplingPercentage;
806  unsigned int m_MetricSamplingSeed;
807 
810 
811  std::vector<unsigned int> m_ShrinkFactorsPerLevel;
812  std::vector<double> m_SmoothingSigmasPerLevel;
814 
817  unsigned int m_Iteration;
819 
821  };
822 
823 }
824 }
825 
826 #endif // sitkImageRegistrationMethod_h
itk::simple::Image
The Image class for SimpleITK.
Definition: sitkImage.h:75
itk::simple::ImageRegistrationMethod::m_InitialTransformInPlace
bool m_InitialTransformInPlace
Definition: sitkImageRegistrationMethod.h:706
itk::simple::ImageRegistrationMethod::m_Iteration
unsigned int m_Iteration
Definition: sitkImageRegistrationMethod.h:817
itk::simple::ImageRegistrationMethod::SmoothingSigmasAreSpecifiedInPhysicalUnitsOn
Self & SmoothingSigmasAreSpecifiedInPhysicalUnitsOn()
Enable the smoothing sigmas for each level in physical units (default) or in terms of voxels.
Definition: sitkImageRegistrationMethod.h:567
itk::simple::ImageRegistrationMethod::m_MetricNumberOfHistogramBins
unsigned int m_MetricNumberOfHistogramBins
Definition: sitkImageRegistrationMethod.h:798
itk::simple::ImageRegistrationMethod::EvaluateMemberFunctionAddressor
Definition: sitkImageRegistrationMethod.h:687
sitkRandomSeed.h
itk::simple::ImageRegistrationMethod::SmoothingSigmasAreSpecifiedInPhysicalUnitsOff
Self & SmoothingSigmasAreSpecifiedInPhysicalUnitsOff()
Enable the smoothing sigmas for each level in physical units (default) or in terms of voxels.
Definition: sitkImageRegistrationMethod.h:568
itk::simple::ImageRegistrationMethod::m_OptimizerMaximumNumberOfFunctionEvaluations
unsigned int m_OptimizerMaximumNumberOfFunctionEvaluations
Definition: sitkImageRegistrationMethod.h:743
itk::simple::ImageRegistrationMethod::MetricUseMovingImageGradientFilterOff
Self & MetricUseMovingImageGradientFilterOff()
Enable image gradient computation by a filter.
Definition: sitkImageRegistrationMethod.h:537
itk::simple::InterpolatorEnum
InterpolatorEnum
Definition: sitkInterpolator.h:30
itk::simple::ImageRegistrationMethod::m_MetricValue
double m_MetricValue
Definition: sitkImageRegistrationMethod.h:816
itk::simple::ImageRegistrationMethod::m_OptimizerInitialRadius
double m_OptimizerInitialRadius
Definition: sitkImageRegistrationMethod.h:758
itk::simple::ImageRegistrationMethod::m_MetricSamplingStrategy
MetricSamplingStrategyType m_MetricSamplingStrategy
Definition: sitkImageRegistrationMethod.h:805
itk::simple::ImageRegistrationMethod::OptimizerType
OptimizerType
Definition: sitkImageRegistrationMethod.h:716
itk::simple::ImageRegistrationMethod::m_OptimizerMinimumStepLength
double m_OptimizerMinimumStepLength
Definition: sitkImageRegistrationMethod.h:729
itk::simple::ImageRegistrationMethod::m_OptimizerWeights
std::vector< double > m_OptimizerWeights
Definition: sitkImageRegistrationMethod.h:774
itk::simple::ImageRegistrationMethod::MetricType
MetricType
Definition: sitkImageRegistrationMethod.h:788
itk::simple::ImageRegistrationMethod::m_OptimizerConvergenceMinimumValue
double m_OptimizerConvergenceMinimumValue
Definition: sitkImageRegistrationMethod.h:739
itk::simple::Transform
A simplified wrapper around a variety of ITK transforms.
Definition: sitkTransform.h:80
itk::simple::detail::MemberFunctionAddressor
Definition: sitkDetail.h:32
itk::simple::ImageRegistrationMethod::m_MetricUseFixedImageGradientFilter
bool m_MetricUseFixedImageGradientFilter
Definition: sitkImageRegistrationMethod.h:808
itk::simple::ImageRegistrationMethod::Jacobian
@ Jacobian
Definition: sitkImageRegistrationMethod.h:778
itk::simple::ImageRegistrationMethod::m_OptimizerLowerBound
double m_OptimizerLowerBound
Definition: sitkImageRegistrationMethod.h:745
itk::simple::ImageRegistrationMethod::Exhaustive
@ Exhaustive
Definition: sitkImageRegistrationMethod.h:721
itk::simple::ImageRegistrationMethod::m_OptimizerLineSearchMaximumEvaluations
unsigned int m_OptimizerLineSearchMaximumEvaluations
Definition: sitkImageRegistrationMethod.h:766
itk::simple::ImageRegistrationMethod::m_OptimizerNumberOfIterations
unsigned int m_OptimizerNumberOfIterations
Definition: sitkImageRegistrationMethod.h:730
itk::simple::ImageRegistrationMethod::m_OptimizerSimplexDelta
double m_OptimizerSimplexDelta
Definition: sitkImageRegistrationMethod.h:750
itk::simple::ImageRegistrationMethod::RegularStepGradientDescent
@ RegularStepGradientDescent
Definition: sitkImageRegistrationMethod.h:717
itk::simple::ImageRegistrationMethod::m_OptimizerHessianApproximationAccuracy
unsigned int m_OptimizerHessianApproximationAccuracy
Definition: sitkImageRegistrationMethod.h:763
itk::simple::ImageRegistrationMethod::MetricUseFixedImageGradientFilterOn
Self & MetricUseFixedImageGradientFilterOn()
Enable image gradient computation by a filter.
Definition: sitkImageRegistrationMethod.h:520
SITKRegistration_EXPORT
#define SITKRegistration_EXPORT
Definition: sitkRegistration.h:32
sitkImage.h
itk::simple::ImageRegistrationMethod::OptimizerScalesType
OptimizerScalesType
Definition: sitkImageRegistrationMethod.h:776
itk::simple::ImageRegistrationMethod::EvaluateMemberFunctionAddressor::ObjectType
typename ::detail::FunctionTraits< TMemberFunctionPointer >::ClassType ObjectType
Definition: sitkImageRegistrationMethod.h:689
itk::RegistrationParameterScalesEstimator
Definition: sitkImageRegistrationMethod.h:52
itk::simple::ImageRegistrationMethod::m_OptimizerLineSearchMaximumStep
double m_OptimizerLineSearchMaximumStep
Definition: sitkImageRegistrationMethod.h:768
itk::simple::ImageRegistrationMethod::m_VirtualDomainDirection
std::vector< double > m_VirtualDomainDirection
Definition: sitkImageRegistrationMethod.h:713
itk::simple::ImageRegistrationMethod::m_OptimizerDeltaConvergenceTolerance
double m_OptimizerDeltaConvergenceTolerance
Definition: sitkImageRegistrationMethod.h:765
itk::simple::ImageRegistrationMethod::m_OptimizerConvergenceWindowSize
unsigned int m_OptimizerConvergenceWindowSize
Definition: sitkImageRegistrationMethod.h:740
itk::simple::ImageRegistrationMethod::m_OptimizerLineSearchMaximumIterations
unsigned int m_OptimizerLineSearchMaximumIterations
Definition: sitkImageRegistrationMethod.h:734
itk::simple::ImageRegistrationMethod::GetInterpolator
InterpolatorEnum GetInterpolator()
Set and get the interpolator to use.
Definition: sitkImageRegistrationMethod.h:115
itk::simple::ImageRegistrationMethod::m_MetricVarianceForJointPDFSmoothing
double m_MetricVarianceForJointPDFSmoothing
Definition: sitkImageRegistrationMethod.h:799
itk::simple::ImageRegistrationMethod::m_OptimizerTrace
bool m_OptimizerTrace
Definition: sitkImageRegistrationMethod.h:747
itk::simple::ImageRegistrationMethod::m_OptimizerSolutionAccuracy
double m_OptimizerSolutionAccuracy
Definition: sitkImageRegistrationMethod.h:762
itk::simple::ImageRegistrationMethod::m_MetricIntensityDifferenceThreshold
double m_MetricIntensityDifferenceThreshold
Definition: sitkImageRegistrationMethod.h:797
itk::simple::ImageRegistrationMethod::m_OptimizerLearningRate
double m_OptimizerLearningRate
Definition: sitkImageRegistrationMethod.h:728
itk::simple::ImageRegistrationMethod::MetricUseFixedImageGradientFilterOff
Self & MetricUseFixedImageGradientFilterOff()
Enable image gradient computation by a filter.
Definition: sitkImageRegistrationMethod.h:521
itk::simple::ImageRegistrationMethod::Correlation
@ Correlation
Definition: sitkImageRegistrationMethod.h:789
itk::simple::ImageRegistrationMethod::MetricUseMovingImageGradientFilterOn
Self & MetricUseMovingImageGradientFilterOn()
Enable image gradient computation by a filter.
Definition: sitkImageRegistrationMethod.h:536
itk::simple::Command
An implementation of the Command design pattern for callback.
Definition: sitkCommand.h:44
itk::simple::ImageRegistrationMethod::m_MetricMovingMaskImage
Image m_MetricMovingMaskImage
Definition: sitkImageRegistrationMethod.h:802
itk::simple::ImageRegistrationMethod::m_OptimizerMaximumNumberOfCorrections
unsigned int m_OptimizerMaximumNumberOfCorrections
Definition: sitkImageRegistrationMethod.h:742
itk::simple::ImageRegistrationMethod::m_MetricSamplingSeed
unsigned int m_MetricSamplingSeed
Definition: sitkImageRegistrationMethod.h:806
itk::simple::ImageRegistrationMethod::LBFGSB
@ LBFGSB
Definition: sitkImageRegistrationMethod.h:720
itk::simple::ImageRegistrationMethod::SetMovingInitialTransform
Self & SetMovingInitialTransform(const Transform &transform)
Set a fixed transform component towards moving domain.
Definition: sitkImageRegistrationMethod.h:180
sitkMemberFunctionFactory.h
itk::simple::ImageRegistrationMethod::REGULAR
@ REGULAR
Definition: sitkImageRegistrationMethod.h:500
itk::simple::ImageRegistrationMethod::m_SmoothingSigmasPerLevel
std::vector< double > m_SmoothingSigmasPerLevel
Definition: sitkImageRegistrationMethod.h:812
itk::simple::ImageRegistrationMethod::NONE
@ NONE
Definition: sitkImageRegistrationMethod.h:499
itk::simple::ImageRegistrationMethod::m_OptimizerType
OptimizerType m_OptimizerType
Definition: sitkImageRegistrationMethod.h:727
itk::simple::ImageRegistrationMethod::m_OptimizerWithRestarts
bool m_OptimizerWithRestarts
Definition: sitkImageRegistrationMethod.h:753
sitkDetail.h
itk::simple::ImageRegistrationMethod::m_OptimizerLineSearchLowerLimit
double m_OptimizerLineSearchLowerLimit
Definition: sitkImageRegistrationMethod.h:731
itk::simple::ImageRegistrationMethod::m_OptimizerFunctionConvergenceTolerance
double m_OptimizerFunctionConvergenceTolerance
Definition: sitkImageRegistrationMethod.h:752
itk::simple::ImageRegistrationMethod::m_OptimizerEstimateLearningRate
EstimateLearningRateType m_OptimizerEstimateLearningRate
Definition: sitkImageRegistrationMethod.h:735
itk::simple::ImageRegistrationMethod::OnePlusOneEvolutionary
@ OnePlusOneEvolutionary
Definition: sitkImageRegistrationMethod.h:724
itk::uint64_t
::uint64_t uint64_t
sitkProcessObject.h
sitkRegistration.h
itk::simple::ImageRegistrationMethod::m_OptimizerScalesType
OptimizerScalesType m_OptimizerScalesType
Definition: sitkImageRegistrationMethod.h:782
itk::simple::ImageRegistrationMethod::Demons
@ Demons
Definition: sitkImageRegistrationMethod.h:790
itk::simple::ImageRegistrationMethod::m_OptimizerSeed
unsigned int m_OptimizerSeed
Definition: sitkImageRegistrationMethod.h:761
itk::simple::ImageRegistrationMethod::GetFixedInitialTransform
Transform GetFixedInitialTransform() const
Set transform mapping to the fixed domain.
Definition: sitkImageRegistrationMethod.h:198
itk::simple::ImageRegistrationMethod::m_VirtualDomainSpacing
std::vector< double > m_VirtualDomainSpacing
Definition: sitkImageRegistrationMethod.h:712
itk::simple::ImageRegistrationMethod::GradientDescentLineSearch
@ GradientDescentLineSearch
Definition: sitkImageRegistrationMethod.h:719
itk::Command
class ITK_FORWARD_EXPORT Command
itk::simple::ImageRegistrationMethod::m_OptimizerEpsilon
double m_OptimizerEpsilon
Definition: sitkImageRegistrationMethod.h:757
itk::simple::ImageRegistrationMethod::GetInitialTransform
Transform GetInitialTransform()
Set the initial transform and parameters to optimize.
Definition: sitkImageRegistrationMethod.h:142
itk::simple::ImageRegistrationMethod::m_MetricSamplingPercentage
std::vector< double > m_MetricSamplingPercentage
Definition: sitkImageRegistrationMethod.h:804
itk::simple::ImageRegistrationMethod::m_EvaluateMemberFactory
std::unique_ptr< detail::MemberFunctionFactory< EvaluateMemberFunctionType > > m_EvaluateMemberFactory
Definition: sitkImageRegistrationMethod.h:702
itk::simple::ImageRegistrationMethod::m_ActiveOptimizer
itk::ObjectToObjectOptimizerBaseTemplate< double > * m_ActiveOptimizer
Definition: sitkImageRegistrationMethod.h:820
itk::simple::ImageRegistrationMethod::m_OptimizerUpperBound
double m_OptimizerUpperBound
Definition: sitkImageRegistrationMethod.h:746
itk::DefaultImageToImageMetricTraitsv4
Definition: sitkImageRegistrationMethod.h:50
itk::simple::ImageRegistrationMethod::m_OptimizerNumberOfSteps
std::vector< unsigned int > m_OptimizerNumberOfSteps
Definition: sitkImageRegistrationMethod.h:748
itk::simple::ImageRegistrationMethod::m_VirtualDomainOrigin
std::vector< double > m_VirtualDomainOrigin
Definition: sitkImageRegistrationMethod.h:711
itk::SpatialObject
Definition: sitkImageRegistrationMethod.h:54
itk::simple::ImageRegistrationMethod::IndexShift
@ IndexShift
Definition: sitkImageRegistrationMethod.h:779
itk::simple::ImageRegistrationMethod::m_MemberFactory
std::unique_ptr< detail::MemberFunctionFactory< MemberFunctionType > > m_MemberFactory
Definition: sitkImageRegistrationMethod.h:701
itk::simple::ImageRegistrationMethod::m_ShrinkFactorsPerLevel
std::vector< unsigned int > m_ShrinkFactorsPerLevel
Definition: sitkImageRegistrationMethod.h:811
itk::simple::ImageRegistrationMethod::m_OptimizerMaximumLineIterations
unsigned int m_OptimizerMaximumLineIterations
Definition: sitkImageRegistrationMethod.h:754
itk::simple::ImageRegistrationMethod::m_OptimizerGrowthFactor
double m_OptimizerGrowthFactor
Definition: sitkImageRegistrationMethod.h:759
itk::simple::ImageRegistrationMethod::m_InitialTransform
Transform m_InitialTransform
Definition: sitkImageRegistrationMethod.h:705
itk::simple::ImageRegistrationMethod::m_MovingInitialTransform
Transform m_MovingInitialTransform
Definition: sitkImageRegistrationMethod.h:707
sitkInterpolator.h
itk::simple::ImageRegistrationMethod::m_OptimizerGradientMagnitudeTolerance
double m_OptimizerGradientMagnitudeTolerance
Definition: sitkImageRegistrationMethod.h:738
itk::simple::ImageRegistrationMethod::m_OptimizerLineSearchEpsilon
double m_OptimizerLineSearchEpsilon
Definition: sitkImageRegistrationMethod.h:733
itk::simple::ImageRegistrationMethod::Amoeba
@ Amoeba
Definition: sitkImageRegistrationMethod.h:722
itk::simple::ImageRegistrationMethod::m_MetricRadius
unsigned int m_MetricRadius
Definition: sitkImageRegistrationMethod.h:796
itk::simple::ImageRegistrationMethod::m_OptimizerRelaxationFactor
double m_OptimizerRelaxationFactor
Definition: sitkImageRegistrationMethod.h:737
itk::simple::ImageRegistrationMethod::m_OptimizerDeltaConvergenceDistance
unsigned int m_OptimizerDeltaConvergenceDistance
Definition: sitkImageRegistrationMethod.h:764
itk::simple::ImageRegistrationMethod::m_SmoothingSigmasAreSpecifiedInPhysicalUnits
bool m_SmoothingSigmasAreSpecifiedInPhysicalUnits
Definition: sitkImageRegistrationMethod.h:813
itk::simple::ImageRegistrationMethod::m_OptimizerShrinkFactor
double m_OptimizerShrinkFactor
Definition: sitkImageRegistrationMethod.h:760
itk::simple::ImageRegistrationMethod::m_OptimizerGradientConvergenceTolerance
double m_OptimizerGradientConvergenceTolerance
Definition: sitkImageRegistrationMethod.h:741
itk::simple::ImageRegistrationMethod::m_VirtualDomainSize
std::vector< uint32_t > m_VirtualDomainSize
Definition: sitkImageRegistrationMethod.h:710
sitkTransform.h
itk::simple::ImageRegistrationMethod::GetMovingInitialTransform
Transform GetMovingInitialTransform() const
Set a fixed transform component towards moving domain.
Definition: sitkImageRegistrationMethod.h:182
itk::simple::ImageRegistrationMethod::m_OptimizerCostFunctionConvergenceFactor
double m_OptimizerCostFunctionConvergenceFactor
Definition: sitkImageRegistrationMethod.h:744
itk::simple::ImageRegistrationMethod::Never
@ Never
Never run estimation, use provided value.
Definition: sitkImageRegistrationMethod.h:255
sitkPixelIDTokens.h
itk::simple::ImageRegistrationMethod
An interface method to the modular ITKv4 registration framework.
Definition: sitkImageRegistrationMethod.h:89
itk::simple::sitkWallClock
@ sitkWallClock
Definition: sitkRandomSeed.h:31
itk::simple::ImageRegistrationMethod::Powell
@ Powell
Definition: sitkImageRegistrationMethod.h:723
itk
itk::simple::ImageRegistrationMethod::GetInitialTransformInPlace
bool GetInitialTransformInPlace() const
Set the initial transform and parameters to optimize.
Definition: sitkImageRegistrationMethod.h:144
itk::simple::ImageRegistrationMethod::m_OptimizerLineSearchMinimumStep
double m_OptimizerLineSearchMinimumStep
Definition: sitkImageRegistrationMethod.h:767
itk::simple::ImageRegistrationMethod::m_OptimizerLineSearchUpperLimit
double m_OptimizerLineSearchUpperLimit
Definition: sitkImageRegistrationMethod.h:732
itk::simple::ImageRegistrationMethod::m_OptimizerLineSearchAccuracy
double m_OptimizerLineSearchAccuracy
Definition: sitkImageRegistrationMethod.h:769
itk::ProcessObject
itk::simple::ImageRegistrationMethod::m_OptimizerMaximumStepSizeInPhysicalUnits
double m_OptimizerMaximumStepSizeInPhysicalUnits
Definition: sitkImageRegistrationMethod.h:736
itk::simple::ImageRegistrationMethod::m_OptimizerScalesCentralRegionRadius
unsigned int m_OptimizerScalesCentralRegionRadius
Definition: sitkImageRegistrationMethod.h:784
itk::ProcessObject
class ITK_FORWARD_EXPORT ProcessObject
itk::ObjectToObjectOptimizerBaseTemplate< double >
itk::simple::ProcessObject
Base class for SimpleITK classes based on ProcessObject.
Definition: sitkProcessObject.h:51
itk::simple::ImageRegistrationMethod::m_OptimizerScalesSmallParameterVariation
double m_OptimizerScalesSmallParameterVariation
Definition: sitkImageRegistrationMethod.h:785
itk::ImageToImageMetricv4
Definition: sitkImageRegistrationMethod.h:44
itk::simple::ImageRegistrationMethod::m_MetricUseMovingImageGradientFilter
bool m_MetricUseMovingImageGradientFilter
Definition: sitkImageRegistrationMethod.h:809
itk::simple::ImageRegistrationMethod::SetInterpolator
Self & SetInterpolator(InterpolatorEnum Interpolator)
Set and get the interpolator to use.
Definition: sitkImageRegistrationMethod.h:117
itk::simple::ImageRegistrationMethod::Manual
@ Manual
Definition: sitkImageRegistrationMethod.h:777
itk::simple::ImageRegistrationMethod::m_MetricFixedMaskImage
Image m_MetricFixedMaskImage
Definition: sitkImageRegistrationMethod.h:801
itk::EventObject
itk::simple::ImageRegistrationMethod::m_OptimizerValueTolerance
double m_OptimizerValueTolerance
Definition: sitkImageRegistrationMethod.h:756
itk::simple::ImageRegistrationMethod::Once
@ Once
Estimate learning once each level, ignore provided values.
Definition: sitkImageRegistrationMethod.h:256
itk::simple::ImageRegistrationMethod::EstimateLearningRateType
EstimateLearningRateType
Definition: sitkImageRegistrationMethod.h:255
itk::simple::ImageRegistrationMethod::m_FixedInitialTransform
Transform m_FixedInitialTransform
Definition: sitkImageRegistrationMethod.h:708
itk::simple::BSplineTransform
A deformable transform over a bounded spatial domain using a BSpline representation for a 2D or 3D co...
Definition: sitkBSplineTransform.h:35
itk::simple::ImageRegistrationMethod::GradientDescent
@ GradientDescent
Definition: sitkImageRegistrationMethod.h:718
itk::simple::ImageRegistrationMethod::m_OptimizerScales
std::vector< double > m_OptimizerScales
Definition: sitkImageRegistrationMethod.h:783
itk::simple::ImageRegistrationMethod::GetName
std::string GetName() const override
Definition: sitkImageRegistrationMethod.h:101
itk::simple::ImageRegistrationMethod::MetricSamplingStrategyType
MetricSamplingStrategyType
Definition: sitkImageRegistrationMethod.h:498
itk::simple::ImageRegistrationMethod::m_TransformBSplineScaleFactors
std::vector< unsigned int > m_TransformBSplineScaleFactors
Definition: sitkImageRegistrationMethod.h:772
itk::simple::ImageRegistrationMethod::m_OptimizerStepLength
double m_OptimizerStepLength
Definition: sitkImageRegistrationMethod.h:749
itk::simple::ImageRegistrationMethod::m_StopConditionDescription
std::string m_StopConditionDescription
Definition: sitkImageRegistrationMethod.h:815
itk::simple::ImageRegistrationMethod::m_Interpolator
InterpolatorEnum m_Interpolator
Definition: sitkImageRegistrationMethod.h:704
itk::TransformBaseTemplate
Definition: sitkTransform.h:30
itk::simple::ImageRegistrationMethod::m_MetricType
MetricType m_MetricType
Definition: sitkImageRegistrationMethod.h:795
itk::simple::ImageRegistrationMethod::m_NumberOfValidPoints
uint64_t m_NumberOfValidPoints
Definition: sitkImageRegistrationMethod.h:818
itk::simple::ImageRegistrationMethod::MeanSquares
@ MeanSquares
Definition: sitkImageRegistrationMethod.h:792
itk::simple::ImageRegistrationMethod::SetFixedInitialTransform
Self & SetFixedInitialTransform(const Transform &transform)
Set transform mapping to the fixed domain.
Definition: sitkImageRegistrationMethod.h:196
itk::simple::ImageRegistrationMethod::m_OptimizerParametersConvergenceTolerance
double m_OptimizerParametersConvergenceTolerance
Definition: sitkImageRegistrationMethod.h:751
itk::simple::ImageRegistrationMethod::m_OptimizerStepTolerance
double m_OptimizerStepTolerance
Definition: sitkImageRegistrationMethod.h:755
itk::simple::ImageRegistrationMethod::JointHistogramMutualInformation
@ JointHistogramMutualInformation
Definition: sitkImageRegistrationMethod.h:791