SimpleITK
1.0.1
|
An interface method to the modular ITKv4 registration framework. More...
#include <sitkImageRegistrationMethod.h>
Classes | |
struct | EvaluateMemberFunctionAddressor |
Public Types | |
enum | EstimateLearningRateType { Never, Once, EachIteration } |
enum | MetricSamplingStrategyType { NONE, REGULAR, RANDOM } |
typedef ImageRegistrationMethod | Self |
typedef ProcessObject | Superclass |
Public Types inherited from itk::simple::ProcessObject | |
typedef ProcessObject | Self |
Public Member Functions | |
Transform | Execute (const Image &fixed, const Image &moving) |
Optimize the configured registration problem. More... | |
unsigned int | GetCurrentLevel () const |
double | GetMetricValue () const |
std::string | GetName () const |
double | GetOptimizerConvergenceValue () const |
unsigned int | GetOptimizerIteration () const |
double | GetOptimizerLearningRate () const |
std::vector< double > | GetOptimizerPosition () const |
std::vector< double > | GetOptimizerScales () const |
Get the OptimizerScales. More... | |
std::string | GetOptimizerStopConditionDescription () const |
ImageRegistrationMethod () | |
double | MetricEvaluate (const Image &fixed, const Image &moving) |
Get the value of the metric given the state of the method. More... | |
Self & | SetMetricAsANTSNeighborhoodCorrelation (unsigned int radius) |
Use normalized cross correlation using a small neighborhood for each voxel between two images, with speed optimizations for dense registration. More... | |
Self & | SetMetricAsCorrelation () |
Use negative normalized cross correlation image metric. More... | |
Self & | SetMetricAsDemons (double intensityDifferenceThreshold=0.001) |
Use demons image metric. More... | |
Self & | SetMetricAsJointHistogramMutualInformation (unsigned int numberOfHistogramBins=20, double varianceForJointPDFSmoothing=1.5) |
Use mutual information between two images. More... | |
Self & | SetMetricAsMattesMutualInformation (unsigned int numberOfHistogramBins=50) |
Use the mutual information between two images to be registered using the method of Mattes et al. More... | |
Self & | SetMetricAsMeanSquares () |
Use negative means squares image metric. More... | |
Self & | SetMetricFixedMask (const Image &binaryMask) |
Set an image mask in order to restrict the sampled points for the metric. More... | |
Self & | SetMetricMovingMask (const Image &binaryMask) |
Set an image mask in order to restrict the sampled points for the metric in the moving image space. More... | |
Self & | SetMetricSamplingStrategy (MetricSamplingStrategyType strategy) |
Set sampling strategy for sample generation. More... | |
Self & | SetOptimizerAsAmoeba (double simplexDelta, unsigned int numberOfIterations, double parametersConvergenceTolerance=1e-8, double functionConvergenceTolerance=1e-4, bool withRestarts=false) |
Set optimizer to Nelder-Mead downhill simplex algorithm. More... | |
Self & | SetOptimizerAsConjugateGradientLineSearch (double learningRate, unsigned int numberOfIterations, double convergenceMinimumValue=1e-6, unsigned int convergenceWindowSize=10, double lineSearchLowerLimit=0, double lineSearchUpperLimit=5.0, double lineSearchEpsilon=0.01, unsigned int lineSearchMaximumIterations=20, EstimateLearningRateType estimateLearningRate=Once, double maximumStepSizeInPhysicalUnits=0.0) |
Conjugate gradient descent optimizer with a golden section line search for nonlinear optimization. More... | |
Self & | SetOptimizerAsExhaustive (const std::vector< unsigned int > &numberOfSteps, double stepLength=1.0) |
Set the optimizer to sample the metric at regular steps. More... | |
Self & | SetOptimizerAsGradientDescent (double learningRate, unsigned int numberOfIterations, double convergenceMinimumValue=1e-6, unsigned int convergenceWindowSize=10, EstimateLearningRateType estimateLearningRate=Once, double maximumStepSizeInPhysicalUnits=0.0) |
Gradient descent optimizer. More... | |
Self & | SetOptimizerAsGradientDescentLineSearch (double learningRate, unsigned int numberOfIterations, double convergenceMinimumValue=1e-6, unsigned int convergenceWindowSize=10, double lineSearchLowerLimit=0, double lineSearchUpperLimit=5.0, double lineSearchEpsilon=0.01, unsigned int lineSearchMaximumIterations=20, EstimateLearningRateType estimateLearningRate=Once, double maximumStepSizeInPhysicalUnits=0.0) |
Gradient descent optimizer with a golden section line search. More... | |
Self & | SetOptimizerAsLBFGSB (double gradientConvergenceTolerance=1e-5, unsigned int numberOfIterations=500, unsigned int maximumNumberOfCorrections=5, unsigned int maximumNumberOfFunctionEvaluations=2000, double costFunctionConvergenceFactor=1e+7, double lowerBound=std::numeric_limits< double >::min(), double upperBound=std::numeric_limits< double >::max(), bool trace=false) |
Limited memory Broyden Fletcher Goldfarb Shannon minimization with simple bounds. More... | |
Self & | SetOptimizerAsOnePlusOneEvolutionary (unsigned int numberOfIterations=100, double epsilon=1.5e-4, double initialRadius=1.01, double growthFactor=-1.0, double shrinkFactor=-1.0, unsigned int seed=sitkWallClock) |
1+1 evolutionary optimizer strategy. More... | |
Self & | SetOptimizerAsPowell (unsigned int numberOfIterations=100, unsigned int maximumLineIterations=100, double stepLength=1, double stepTolerance=1e-6, double valueTolerance=1e-6) |
Powell optimization using Brent line search. More... | |
Self & | SetOptimizerAsRegularStepGradientDescent (double learningRate, double minStep, unsigned int numberOfIterations, double relaxationFactor=0.5, double gradientMagnitudeTolerance=1e-4, EstimateLearningRateType estimateLearningRate=Never, double maximumStepSizeInPhysicalUnits=0.0) |
Regular Step Gradient descent optimizer. More... | |
Self & | SetOptimizerScales (const std::vector< double > &scales) |
Manually set per parameter weighting for the transform parameters. More... | |
Self & | SetOptimizerScalesFromIndexShift (unsigned int centralRegionRadius=5, double smallParameterVariation=0.01) |
Estimate scales from maximum voxel shift in index space cause by parameter change. More... | |
Self & | SetOptimizerScalesFromJacobian (unsigned int centralRegionRadius=5) |
Estimate scales from Jacobian norms. More... | |
Self & | SetOptimizerScalesFromPhysicalShift (unsigned int centralRegionRadius=5, double smallParameterVariation=0.01) |
Estimating scales of transform parameters a step sizes, from the maximum voxel shift in physical space caused by a parameter change. More... | |
Self & | SetShrinkFactorsPerLevel (const std::vector< unsigned int > &shrinkFactors) |
Set the shrink factors for each level where each level has the same shrink factor for each dimension. More... | |
Self & | SetSmoothingSigmasPerLevel (const std::vector< double > &smoothingSigmas) |
Set the sigmas of Gaussian used for smoothing at each level. More... | |
std::string | ToString () const |
Print the information about the object to a string. More... | |
virtual | ~ImageRegistrationMethod () |
InterpolatorEnum | GetInterpolator () |
Set and get the interpolator to use. More... | |
Self & | SetInterpolator (InterpolatorEnum Interpolator) |
Set and get the interpolator to use. More... | |
Self & | SetInitialTransform (const Transform &transform) |
Set the initial transform and parameters to optimize. More... | |
Self & | SetInitialTransform (Transform &transform, bool inPlace=true) |
Set the initial transform and parameters to optimize. More... | |
Transform | GetInitialTransform () |
Set the initial transform and parameters to optimize. More... | |
bool | GetInitialTransformInPlace () const |
Set the initial transform and parameters to optimize. More... | |
Self & | SetMovingInitialTransform (const Transform &transform) |
Set a fixed transform component towards moving domain. More... | |
Transform | GetMovingInitialTransform () const |
Set a fixed transform component towards moving domain. More... | |
Self & | SetFixedInitialTransform (const Transform &transform) |
Set transform mapping to the fixed domain. More... | |
Transform | GetFixedInitialTransform () const |
Set transform mapping to the fixed domain. More... | |
Self & | SetVirtualDomain (const std::vector< uint32_t > &virtualSize, const std::vector< double > &virtualOrigin, const std::vector< double > &virtualSpacing, const std::vector< double > &virtualDirection) |
Set the virtual domain used for sampling. More... | |
Self & | SetVirtualDomainFromImage (const Image &virtualImage) |
Set the virtual domain used for sampling. More... | |
Self & | SetOptimizerWeights (const std::vector< double > &weights) |
A per parameter weighting array for the optimizer. More... | |
std::vector< double > | GetOptimizerWeights () const |
A per parameter weighting array for the optimizer. More... | |
Self & | SetMetricSamplingPercentage (double percentage, unsigned int seed=sitkWallClock) |
Set percentage of pixels sampled for metric evaluation. More... | |
Self & | SetMetricSamplingPercentagePerLevel (const std::vector< double > &percentage, unsigned int seed=sitkWallClock) |
Set percentage of pixels sampled for metric evaluation. More... | |
Self & | SetMetricUseFixedImageGradientFilter (bool) |
Enable image gradient computation by a filter. More... | |
Self & | MetricUseFixedImageGradientFilterOn () |
Enable image gradient computation by a filter. More... | |
Self & | MetricUseFixedImageGradientFilterOff () |
Enable image gradient computation by a filter. More... | |
Self & | SetMetricUseMovingImageGradientFilter (bool) |
Enable image gradient computation by a filter. More... | |
Self & | MetricUseMovingImageGradientFilterOn () |
Enable image gradient computation by a filter. More... | |
Self & | MetricUseMovingImageGradientFilterOff () |
Enable image gradient computation by a filter. More... | |
Self & | SetSmoothingSigmasAreSpecifiedInPhysicalUnits (bool arg) |
Enable the smoothing sigmas for each level in physical units (default) or in terms of voxels. More... | |
Self & | SmoothingSigmasAreSpecifiedInPhysicalUnitsOn () |
Enable the smoothing sigmas for each level in physical units (default) or in terms of voxels. More... | |
Self & | SmoothingSigmasAreSpecifiedInPhysicalUnitsOff () |
Enable the smoothing sigmas for each level in physical units (default) or in terms of voxels. More... | |
Public Member Functions inherited from itk::simple::ProcessObject | |
virtual void | Abort () |
virtual int | AddCommand (itk::simple::EventEnum event, itk::simple::Command &cmd) |
Add a Command Object to observer the event. More... | |
virtual float | GetProgress () const |
An Active Measurement of the progress of execution. More... | |
virtual bool | HasCommand (itk::simple::EventEnum event) const |
Query of this object has any registered commands for event. More... | |
ProcessObject () | |
virtual void | RemoveAllCommands () |
Remove all registered commands. More... | |
virtual | ~ProcessObject () |
virtual void | DebugOn () |
virtual void | DebugOff () |
virtual bool | GetDebug () const |
virtual void | SetDebug (bool debugFlag) |
virtual void | SetNumberOfThreads (unsigned int n) |
virtual unsigned int | GetNumberOfThreads () const |
Protected Member Functions | |
virtual unsigned long | AddITKObserver (const itk::EventObject &, itk::Command *) |
template<class TImageType > | |
itk::ImageToImageMetricv4< TImageType, TImageType, TImageType, double, itk::DefaultImageToImageMetricTraitsv4< TImageType, TImageType, TImageType, double > > * | CreateMetric () |
itk::ObjectToObjectOptimizerBaseTemplate< double > * | CreateOptimizer (unsigned int numberOfTransformParameters) |
template<typename TMetric > | |
itk::RegistrationParameterScalesEstimator< TMetric > * | CreateScalesEstimator () |
template<unsigned int VDimension> | |
itk::SpatialObject< VDimension > * | CreateSpatialObjectMask (const Image &mask) |
template<typename TTransformAdaptorPointer , typename TRegistrationMethod > | |
std::vector< TTransformAdaptorPointer > | CreateTransformParametersAdaptor (TRegistrationMethod *method) |
template<class TImage > | |
double | EvaluateInternal (const Image &fixed, const Image &moving) |
template<class TImage > | |
Transform | ExecuteInternal (const Image &fixed, const Image &moving) |
virtual void | OnActiveProcessDelete () throw () |
virtual void | PreUpdate (itk::ProcessObject *p) |
virtual void | RemoveITKObserver (EventCommand &e) |
template<class TImageType > | |
void | SetupMetric (itk::ImageToImageMetricv4< TImageType, TImageType, TImageType, double, itk::DefaultImageToImageMetricTraitsv4< TImageType, TImageType, TImageType, double > > *, const TImageType *, const TImageType *) |
Protected Member Functions inherited from itk::simple::ProcessObject | |
virtual itk::ProcessObject * | GetActiveProcess () |
virtual void | onCommandDelete (const itk::simple::Command *cmd) throw () |
Protected Member Functions inherited from itk::simple::NonCopyable | |
NonCopyable () | |
Private Types | |
typedef double(ImageRegistrationMethod::* | EvaluateMemberFunctionType) (const Image &fixed, const Image &moving) |
typedef Transform(ImageRegistrationMethod::* | MemberFunctionType) (const Image &fixed, const Image &moving) |
enum | MetricType { ANTSNeighborhoodCorrelation, Correlation, Demons, JointHistogramMutualInformation, MeanSquares, MattesMutualInformation } |
enum | OptimizerScalesType { Manual, Jacobian, IndexShift, PhysicalShift } |
enum | OptimizerType { ConjugateGradientLineSearch, RegularStepGradientDescent, GradientDescent, GradientDescentLineSearch, LBFGSB, Exhaustive, Amoeba, Powell, OnePlusOneEvolutionary } |
Friends | |
struct | detail::MemberFunctionAddressor< MemberFunctionType > |
Additional Inherited Members | |
Static Public Member Functions inherited from itk::simple::ProcessObject | |
static bool | GetGlobalDefaultDebug () |
static void | GlobalDefaultDebugOff () |
static void | GlobalDefaultDebugOn () |
static void | SetGlobalDefaultDebug (bool debugFlag) |
static void | GlobalWarningDisplayOn () |
static void | GlobalWarningDisplayOff () |
static void | SetGlobalWarningDisplay (bool flag) |
static bool | GetGlobalWarningDisplay () |
static void | SetGlobalDefaultNumberOfThreads (unsigned int n) |
static unsigned int | GetGlobalDefaultNumberOfThreads () |
static double | GetGlobalDefaultCoordinateTolerance () |
Access the global tolerance to determine congruent spaces. More... | |
static void | SetGlobalDefaultCoordinateTolerance (double) |
Access the global tolerance to determine congruent spaces. More... | |
static double | GetGlobalDefaultDirectionTolerance () |
Access the global tolerance to determine congruent spaces. More... | |
static void | SetGlobalDefaultDirectionTolerance (double) |
Access the global tolerance to determine congruent spaces. More... | |
Static Protected Member Functions inherited from itk::simple::ProcessObject | |
template<class TImageType > | |
static TImageType::ConstPointer | CastImageToITK (const Image &img) |
template<class TImageType > | |
static Image | CastITKToImage (TImageType *img) |
template<class TPixelType , unsigned int VImageDimension, unsigned int VLength, template< typename, unsigned int > class TVector> | |
static Image | CastITKToImage (itk::Image< TVector< TPixelType, VLength >, VImageDimension > *img) |
static const itk::EventObject & | GetITKEventObject (EventEnum e) |
template<typename T > | |
static std::ostream & | ToStringHelper (std::ostream &os, const T &v) |
static std::ostream & | ToStringHelper (std::ostream &os, const char &v) |
static std::ostream & | ToStringHelper (std::ostream &os, const signed char &v) |
static std::ostream & | ToStringHelper (std::ostream &os, const unsigned char &v) |
An interface method to the modular ITKv4 registration framework.
This interface method class encapsulates typical registration usage by incorporating all the necessary elements for performing a simple image registration between two images. This method also allows for multistage registration whereby each stage is characterized by possibly different transforms and different image metrics. For example, many users will want to perform a linear registration followed by deformable registration where both stages are performed in multiple levels. Each level can be characterized by:
Multiple stages are handled by linking multiple instantiations of this class where the output transform is added to the optional composite transform input.
Definition at line 88 of file sitkImageRegistrationMethod.h.
|
private |
Definition at line 627 of file sitkImageRegistrationMethod.h.
|
private |
Definition at line 626 of file sitkImageRegistrationMethod.h.
Definition at line 93 of file sitkImageRegistrationMethod.h.
Definition at line 94 of file sitkImageRegistrationMethod.h.
Enumerator | |
---|---|
Never |
Never run estimation, use provided value. |
Once |
Estimate learning once each level, ignore provided values. |
EachIteration |
Estimate learning rate at each iteration. |
Definition at line 234 of file sitkImageRegistrationMethod.h.
Enumerator | |
---|---|
NONE | |
REGULAR | |
RANDOM |
Definition at line 443 of file sitkImageRegistrationMethod.h.
|
private |
Enumerator | |
---|---|
ANTSNeighborhoodCorrelation | |
Correlation | |
Demons | |
JointHistogramMutualInformation | |
MeanSquares | |
MattesMutualInformation |
Definition at line 704 of file sitkImageRegistrationMethod.h.
Enumerator | |
---|---|
Manual | |
Jacobian | |
IndexShift | |
PhysicalShift |
Definition at line 692 of file sitkImageRegistrationMethod.h.
|
private |
Enumerator | |
---|---|
ConjugateGradientLineSearch | |
RegularStepGradientDescent | |
GradientDescent | |
GradientDescentLineSearch | |
LBFGSB | |
Exhaustive | |
Amoeba | |
Powell | |
OnePlusOneEvolutionary |
Definition at line 644 of file sitkImageRegistrationMethod.h.
itk::simple::ImageRegistrationMethod::ImageRegistrationMethod | ( | ) |
|
virtual |
|
protectedvirtual |
Reimplemented from itk::simple::ProcessObject.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Transform itk::simple::ImageRegistrationMethod::Execute | ( | const Image & | fixed, |
const Image & | moving | ||
) |
Optimize the configured registration problem.
|
protected |
unsigned int itk::simple::ImageRegistrationMethod::GetCurrentLevel | ( | ) | const |
|
inline |
Set transform mapping to the fixed domain.
This transform is used to map from the virtual domain to the fixed image domain.
By default this transform is an identity, and not used.
Definition at line 177 of file sitkImageRegistrationMethod.h.
|
inline |
Set the initial transform and parameters to optimize.
This transform is applied before the MovingInitialTransform, to map from the virtual image domain to the moving image domain.
If the inPlace flag is explicitly false, then the ITK registration will internally make a copy, and the transform will not be accessible during registration. Otherwise, the accessible InitialTransform value will be the same object used during registration, and will have a modified value upon completion.
Definition at line 140 of file sitkImageRegistrationMethod.h.
|
inline |
Set the initial transform and parameters to optimize.
This transform is applied before the MovingInitialTransform, to map from the virtual image domain to the moving image domain.
If the inPlace flag is explicitly false, then the ITK registration will internally make a copy, and the transform will not be accessible during registration. Otherwise, the accessible InitialTransform value will be the same object used during registration, and will have a modified value upon completion.
Definition at line 142 of file sitkImageRegistrationMethod.h.
|
inline |
Set and get the interpolator to use.
Definition at line 113 of file sitkImageRegistrationMethod.h.
double itk::simple::ImageRegistrationMethod::GetMetricValue | ( | ) | const |
|
inline |
Set a fixed transform component towards moving domain.
The InitialTransform is added to this transform to form the composite transform which maps from the virtual domain to the moving image's domain. The parameters of this transform are not optimized. This is an advanced option used when the output transformed with be composed into a composite transform.
By default this transform is an identity, and not used.
Definition at line 161 of file sitkImageRegistrationMethod.h.
|
inlinevirtual |
return user readable name for the filter
Implements itk::simple::ProcessObject.
Definition at line 99 of file sitkImageRegistrationMethod.h.
double itk::simple::ImageRegistrationMethod::GetOptimizerConvergenceValue | ( | ) | const |
unsigned int itk::simple::ImageRegistrationMethod::GetOptimizerIteration | ( | ) | const |
Active measurements which can be obtained during call backs.
This is a measurement. Its value is updated in the Execute methods, so the value will only be valid after an execution.
double itk::simple::ImageRegistrationMethod::GetOptimizerLearningRate | ( | ) | const |
std::vector<double> itk::simple::ImageRegistrationMethod::GetOptimizerPosition | ( | ) | const |
std::vector<double> itk::simple::ImageRegistrationMethod::GetOptimizerScales | ( | ) | const |
Get the OptimizerScales.
If the scales are explicitly set then this method returns those values. If an estimator is used then this is an active measurement returning the scales estimated by the estimator and is only available during execution.
std::string itk::simple::ImageRegistrationMethod::GetOptimizerStopConditionDescription | ( | ) | const |
Measurement updated at the end of execution.
std::vector<double> itk::simple::ImageRegistrationMethod::GetOptimizerWeights | ( | ) | const |
A per parameter weighting array for the optimizer.
Allows setting of a per-local-parameter weighting array. If unset, the weights are treated as identity. Weights are multiplied by the gradient at the same time scaling is applied. Weights are similar to the scales but not estimated, and may be used, for example, to easily mask out a particular parameter during optimization to hold it constant. Or they may be used to apply another kind of prior knowledge.
double itk::simple::ImageRegistrationMethod::MetricEvaluate | ( | const Image & | fixed, |
const Image & | moving | ||
) |
Get the value of the metric given the state of the method.
Passing a fixed and moving image, this method constructs and configures a metric object to obtain the value. This will take into consideration the current transforms, metric, interpolator, and image masks. It does not take into consideration the sampling strategy, smoothing sigmas, or the shrink factors.
|
inline |
Enable image gradient computation by a filter.
By default the image gradient is computed by itk::GradientRecursiveGaussianImageFiter. If disabled then a central difference function with be computed as needed.
Definition at line 466 of file sitkImageRegistrationMethod.h.
|
inline |
Enable image gradient computation by a filter.
By default the image gradient is computed by itk::GradientRecursiveGaussianImageFiter. If disabled then a central difference function with be computed as needed.
Definition at line 465 of file sitkImageRegistrationMethod.h.
|
inline |
Enable image gradient computation by a filter.
By default the image gradient is computed by itk::GradientRecursiveGaussianImageFiter. If disabled then a central difference function with be computed as needed.
Definition at line 481 of file sitkImageRegistrationMethod.h.
|
inline |
Enable image gradient computation by a filter.
By default the image gradient is computed by itk::GradientRecursiveGaussianImageFiter. If disabled then a central difference function with be computed as needed.
Definition at line 480 of file sitkImageRegistrationMethod.h.
|
protectedvirtual |
Reimplemented from itk::simple::ProcessObject.
|
protectedvirtual |
Reimplemented from itk::simple::ProcessObject.
|
protectedvirtual |
Reimplemented from itk::simple::ProcessObject.
|
inline |
Set transform mapping to the fixed domain.
This transform is used to map from the virtual domain to the fixed image domain.
By default this transform is an identity, and not used.
Definition at line 175 of file sitkImageRegistrationMethod.h.
Set the initial transform and parameters to optimize.
This transform is applied before the MovingInitialTransform, to map from the virtual image domain to the moving image domain.
If the inPlace flag is explicitly false, then the ITK registration will internally make a copy, and the transform will not be accessible during registration. Otherwise, the accessible InitialTransform value will be the same object used during registration, and will have a modified value upon completion.
Self& itk::simple::ImageRegistrationMethod::SetInitialTransform | ( | Transform & | transform, |
bool | inPlace = true |
||
) |
Set the initial transform and parameters to optimize.
This transform is applied before the MovingInitialTransform, to map from the virtual image domain to the moving image domain.
If the inPlace flag is explicitly false, then the ITK registration will internally make a copy, and the transform will not be accessible during registration. Otherwise, the accessible InitialTransform value will be the same object used during registration, and will have a modified value upon completion.
|
inline |
Set and get the interpolator to use.
Definition at line 115 of file sitkImageRegistrationMethod.h.
Self& itk::simple::ImageRegistrationMethod::SetMetricAsANTSNeighborhoodCorrelation | ( | unsigned int | radius | ) |
Use normalized cross correlation using a small neighborhood for each voxel between two images, with speed optimizations for dense registration.
Self& itk::simple::ImageRegistrationMethod::SetMetricAsCorrelation | ( | ) |
Use negative normalized cross correlation image metric.
Self& itk::simple::ImageRegistrationMethod::SetMetricAsDemons | ( | double | intensityDifferenceThreshold = 0.001 | ) |
Use demons image metric.
Self& itk::simple::ImageRegistrationMethod::SetMetricAsJointHistogramMutualInformation | ( | unsigned int | numberOfHistogramBins = 20 , |
double | varianceForJointPDFSmoothing = 1.5 |
||
) |
Use mutual information between two images.
Self& itk::simple::ImageRegistrationMethod::SetMetricAsMattesMutualInformation | ( | unsigned int | numberOfHistogramBins = 50 | ) |
Use the mutual information between two images to be registered using the method of Mattes et al.
Self& itk::simple::ImageRegistrationMethod::SetMetricAsMeanSquares | ( | ) |
Use negative means squares image metric.
Set an image mask in order to restrict the sampled points for the metric.
The image is expected to be in the same physical space as the FixedImage, and if the pixel type is not UInt8 than the image will base cast.
Set an image mask in order to restrict the sampled points for the metric in the moving image space.
The image is expected to be in the same physical space as the MovingImage, and if the pixel type is not UInt8 than the image will base cast.
Self& itk::simple::ImageRegistrationMethod::SetMetricSamplingPercentage | ( | double | percentage, |
unsigned int | seed = sitkWallClock |
||
) |
Set percentage of pixels sampled for metric evaluation.
The seed parameter is used to seed the pseudo-random number generator used in generating the sampling set of points. If the seed parameter is 0, then the wall clock is used, otherwise the fixed seed is used for reproducible behavior.
Self& itk::simple::ImageRegistrationMethod::SetMetricSamplingPercentagePerLevel | ( | const std::vector< double > & | percentage, |
unsigned int | seed = sitkWallClock |
||
) |
Set percentage of pixels sampled for metric evaluation.
The seed parameter is used to seed the pseudo-random number generator used in generating the sampling set of points. If the seed parameter is 0, then the wall clock is used, otherwise the fixed seed is used for reproducible behavior.
Self& itk::simple::ImageRegistrationMethod::SetMetricSamplingStrategy | ( | MetricSamplingStrategyType | strategy | ) |
Set sampling strategy for sample generation.
Self& itk::simple::ImageRegistrationMethod::SetMetricUseFixedImageGradientFilter | ( | bool | ) |
Enable image gradient computation by a filter.
By default the image gradient is computed by itk::GradientRecursiveGaussianImageFiter. If disabled then a central difference function with be computed as needed.
Self& itk::simple::ImageRegistrationMethod::SetMetricUseMovingImageGradientFilter | ( | bool | ) |
Enable image gradient computation by a filter.
By default the image gradient is computed by itk::GradientRecursiveGaussianImageFiter. If disabled then a central difference function with be computed as needed.
|
inline |
Set a fixed transform component towards moving domain.
The InitialTransform is added to this transform to form the composite transform which maps from the virtual domain to the moving image's domain. The parameters of this transform are not optimized. This is an advanced option used when the output transformed with be composed into a composite transform.
By default this transform is an identity, and not used.
Definition at line 159 of file sitkImageRegistrationMethod.h.
Self& itk::simple::ImageRegistrationMethod::SetOptimizerAsAmoeba | ( | double | simplexDelta, |
unsigned int | numberOfIterations, | ||
double | parametersConvergenceTolerance = 1e-8 , |
||
double | functionConvergenceTolerance = 1e-4 , |
||
bool | withRestarts = false |
||
) |
Set optimizer to Nelder-Mead downhill simplex algorithm.
Self& itk::simple::ImageRegistrationMethod::SetOptimizerAsConjugateGradientLineSearch | ( | double | learningRate, |
unsigned int | numberOfIterations, | ||
double | convergenceMinimumValue = 1e-6 , |
||
unsigned int | convergenceWindowSize = 10 , |
||
double | lineSearchLowerLimit = 0 , |
||
double | lineSearchUpperLimit = 5.0 , |
||
double | lineSearchEpsilon = 0.01 , |
||
unsigned int | lineSearchMaximumIterations = 20 , |
||
EstimateLearningRateType | estimateLearningRate = Once , |
||
double | maximumStepSizeInPhysicalUnits = 0.0 |
||
) |
Conjugate gradient descent optimizer with a golden section line search for nonlinear optimization.
Self& itk::simple::ImageRegistrationMethod::SetOptimizerAsExhaustive | ( | const std::vector< unsigned int > & | numberOfSteps, |
double | stepLength = 1.0 |
||
) |
Set the optimizer to sample the metric at regular steps.
At each iteration the GetOptimizerIteration, can be used to index into the sampling grid along with the GetCurrentMetricValue.
The resulting transform and value at the end of execution is the best location.
The OptimizerScales can be used to perform anisotropic sampling.
Self& itk::simple::ImageRegistrationMethod::SetOptimizerAsGradientDescent | ( | double | learningRate, |
unsigned int | numberOfIterations, | ||
double | convergenceMinimumValue = 1e-6 , |
||
unsigned int | convergenceWindowSize = 10 , |
||
EstimateLearningRateType | estimateLearningRate = Once , |
||
double | maximumStepSizeInPhysicalUnits = 0.0 |
||
) |
Gradient descent optimizer.
Self& itk::simple::ImageRegistrationMethod::SetOptimizerAsGradientDescentLineSearch | ( | double | learningRate, |
unsigned int | numberOfIterations, | ||
double | convergenceMinimumValue = 1e-6 , |
||
unsigned int | convergenceWindowSize = 10 , |
||
double | lineSearchLowerLimit = 0 , |
||
double | lineSearchUpperLimit = 5.0 , |
||
double | lineSearchEpsilon = 0.01 , |
||
unsigned int | lineSearchMaximumIterations = 20 , |
||
EstimateLearningRateType | estimateLearningRate = Once , |
||
double | maximumStepSizeInPhysicalUnits = 0.0 |
||
) |
Gradient descent optimizer with a golden section line search.
Self& itk::simple::ImageRegistrationMethod::SetOptimizerAsLBFGSB | ( | double | gradientConvergenceTolerance = 1e-5 , |
unsigned int | numberOfIterations = 500 , |
||
unsigned int | maximumNumberOfCorrections = 5 , |
||
unsigned int | maximumNumberOfFunctionEvaluations = 2000 , |
||
double | costFunctionConvergenceFactor = 1e+7 , |
||
double | lowerBound = std::numeric_limits< double >::min() , |
||
double | upperBound = std::numeric_limits< double >::max() , |
||
bool | trace = false |
||
) |
Limited memory Broyden Fletcher Goldfarb Shannon minimization with simple bounds.
The default parameters utilize LBFGSB in unbounded mode.
Self& itk::simple::ImageRegistrationMethod::SetOptimizerAsOnePlusOneEvolutionary | ( | unsigned int | numberOfIterations = 100 , |
double | epsilon = 1.5e-4 , |
||
double | initialRadius = 1.01 , |
||
double | growthFactor = -1.0 , |
||
double | shrinkFactor = -1.0 , |
||
unsigned int | seed = sitkWallClock |
||
) |
1+1 evolutionary optimizer strategy.
The seed parameter is used to seed the pseudo-random number generator. If the seed parameter is 0, then the wall clock is used to seed, otherwise the fixed seed is used for reproducible behavior.
Self& itk::simple::ImageRegistrationMethod::SetOptimizerAsPowell | ( | unsigned int | numberOfIterations = 100 , |
unsigned int | maximumLineIterations = 100 , |
||
double | stepLength = 1 , |
||
double | stepTolerance = 1e-6 , |
||
double | valueTolerance = 1e-6 |
||
) |
Powell optimization using Brent line search.
Self& itk::simple::ImageRegistrationMethod::SetOptimizerAsRegularStepGradientDescent | ( | double | learningRate, |
double | minStep, | ||
unsigned int | numberOfIterations, | ||
double | relaxationFactor = 0.5 , |
||
double | gradientMagnitudeTolerance = 1e-4 , |
||
EstimateLearningRateType | estimateLearningRate = Never , |
||
double | maximumStepSizeInPhysicalUnits = 0.0 |
||
) |
Regular Step Gradient descent optimizer.
Self& itk::simple::ImageRegistrationMethod::SetOptimizerScales | ( | const std::vector< double > & | scales | ) |
Manually set per parameter weighting for the transform parameters.
Self& itk::simple::ImageRegistrationMethod::SetOptimizerScalesFromIndexShift | ( | unsigned int | centralRegionRadius = 5 , |
double | smallParameterVariation = 0.01 |
||
) |
Estimate scales from maximum voxel shift in index space cause by parameter change.
Self& itk::simple::ImageRegistrationMethod::SetOptimizerScalesFromJacobian | ( | unsigned int | centralRegionRadius = 5 | ) |
Estimate scales from Jacobian norms.
This scales estimator works well with versor based transforms.
Self& itk::simple::ImageRegistrationMethod::SetOptimizerScalesFromPhysicalShift | ( | unsigned int | centralRegionRadius = 5 , |
double | smallParameterVariation = 0.01 |
||
) |
Estimating scales of transform parameters a step sizes, from the maximum voxel shift in physical space caused by a parameter change.
Self& itk::simple::ImageRegistrationMethod::SetOptimizerWeights | ( | const std::vector< double > & | weights | ) |
A per parameter weighting array for the optimizer.
Allows setting of a per-local-parameter weighting array. If unset, the weights are treated as identity. Weights are multiplied by the gradient at the same time scaling is applied. Weights are similar to the scales but not estimated, and may be used, for example, to easily mask out a particular parameter during optimization to hold it constant. Or they may be used to apply another kind of prior knowledge.
Self& itk::simple::ImageRegistrationMethod::SetShrinkFactorsPerLevel | ( | const std::vector< unsigned int > & | shrinkFactors | ) |
Set the shrink factors for each level where each level has the same shrink factor for each dimension.
Self& itk::simple::ImageRegistrationMethod::SetSmoothingSigmasAreSpecifiedInPhysicalUnits | ( | bool | arg | ) |
Enable the smoothing sigmas for each level in physical units (default) or in terms of voxels.
Self& itk::simple::ImageRegistrationMethod::SetSmoothingSigmasPerLevel | ( | const std::vector< double > & | smoothingSigmas | ) |
Set the sigmas of Gaussian used for smoothing at each level.
|
protected |
Self& itk::simple::ImageRegistrationMethod::SetVirtualDomain | ( | const std::vector< uint32_t > & | virtualSize, |
const std::vector< double > & | virtualOrigin, | ||
const std::vector< double > & | virtualSpacing, | ||
const std::vector< double > & | virtualDirection | ||
) |
Set the virtual domain used for sampling.
Set the virtual domain used for sampling.
|
inline |
Enable the smoothing sigmas for each level in physical units (default) or in terms of voxels.
Definition at line 507 of file sitkImageRegistrationMethod.h.
|
inline |
Enable the smoothing sigmas for each level in physical units (default) or in terms of voxels.
Definition at line 506 of file sitkImageRegistrationMethod.h.
|
virtual |
Print the information about the object to a string.
If called when the process is being executed ( during a callback ), the ITK Optimizer and Transform objects will be printed.
Reimplemented from itk::simple::ProcessObject.
|
friend |
Definition at line 628 of file sitkImageRegistrationMethod.h.
|
private |
Definition at line 735 of file sitkImageRegistrationMethod.h.
|
private |
Definition at line 630 of file sitkImageRegistrationMethod.h.
|
private |
Definition at line 636 of file sitkImageRegistrationMethod.h.
|
private |
Definition at line 633 of file sitkImageRegistrationMethod.h.
|
private |
Definition at line 634 of file sitkImageRegistrationMethod.h.
|
private |
Definition at line 632 of file sitkImageRegistrationMethod.h.
|
private |
Definition at line 733 of file sitkImageRegistrationMethod.h.
|
private |
Definition at line 629 of file sitkImageRegistrationMethod.h.
|
private |
Definition at line 717 of file sitkImageRegistrationMethod.h.
|
private |
Definition at line 713 of file sitkImageRegistrationMethod.h.
|
private |
Definition at line 718 of file sitkImageRegistrationMethod.h.
|
private |
Definition at line 714 of file sitkImageRegistrationMethod.h.
|
private |
Definition at line 712 of file sitkImageRegistrationMethod.h.
|
private |
Definition at line 720 of file sitkImageRegistrationMethod.h.
|
private |
Definition at line 722 of file sitkImageRegistrationMethod.h.
|
private |
Definition at line 721 of file sitkImageRegistrationMethod.h.
|
private |
Definition at line 711 of file sitkImageRegistrationMethod.h.
|
private |
Definition at line 724 of file sitkImageRegistrationMethod.h.
|
private |
Definition at line 725 of file sitkImageRegistrationMethod.h.
|
private |
Definition at line 732 of file sitkImageRegistrationMethod.h.
|
private |
Definition at line 715 of file sitkImageRegistrationMethod.h.
|
private |
Definition at line 635 of file sitkImageRegistrationMethod.h.
|
private |
Definition at line 666 of file sitkImageRegistrationMethod.h.
|
private |
Definition at line 667 of file sitkImageRegistrationMethod.h.
|
private |
Definition at line 671 of file sitkImageRegistrationMethod.h.
|
private |
Definition at line 684 of file sitkImageRegistrationMethod.h.
|
private |
Definition at line 662 of file sitkImageRegistrationMethod.h.
|
private |
Definition at line 679 of file sitkImageRegistrationMethod.h.
|
private |
Definition at line 668 of file sitkImageRegistrationMethod.h.
|
private |
Definition at line 665 of file sitkImageRegistrationMethod.h.
|
private |
Definition at line 686 of file sitkImageRegistrationMethod.h.
|
private |
Definition at line 685 of file sitkImageRegistrationMethod.h.
|
private |
Definition at line 655 of file sitkImageRegistrationMethod.h.
|
private |
Definition at line 660 of file sitkImageRegistrationMethod.h.
|
private |
Definition at line 658 of file sitkImageRegistrationMethod.h.
|
private |
Definition at line 661 of file sitkImageRegistrationMethod.h.
|
private |
Definition at line 659 of file sitkImageRegistrationMethod.h.
|
private |
Definition at line 672 of file sitkImageRegistrationMethod.h.
|
private |
Definition at line 681 of file sitkImageRegistrationMethod.h.
|
private |
Definition at line 669 of file sitkImageRegistrationMethod.h.
|
private |
Definition at line 670 of file sitkImageRegistrationMethod.h.
|
private |
Definition at line 663 of file sitkImageRegistrationMethod.h.
|
private |
Definition at line 656 of file sitkImageRegistrationMethod.h.
|
private |
Definition at line 657 of file sitkImageRegistrationMethod.h.
|
private |
Definition at line 675 of file sitkImageRegistrationMethod.h.
|
private |
Definition at line 678 of file sitkImageRegistrationMethod.h.
|
private |
Definition at line 664 of file sitkImageRegistrationMethod.h.
|
private |
Definition at line 699 of file sitkImageRegistrationMethod.h.
|
private |
Definition at line 700 of file sitkImageRegistrationMethod.h.
|
private |
Definition at line 701 of file sitkImageRegistrationMethod.h.
|
private |
Definition at line 698 of file sitkImageRegistrationMethod.h.
|
private |
Definition at line 688 of file sitkImageRegistrationMethod.h.
|
private |
Definition at line 687 of file sitkImageRegistrationMethod.h.
|
private |
Definition at line 677 of file sitkImageRegistrationMethod.h.
|
private |
Definition at line 676 of file sitkImageRegistrationMethod.h.
|
private |
Definition at line 682 of file sitkImageRegistrationMethod.h.
|
private |
Definition at line 674 of file sitkImageRegistrationMethod.h.
|
private |
Definition at line 654 of file sitkImageRegistrationMethod.h.
|
private |
Definition at line 673 of file sitkImageRegistrationMethod.h.
|
private |
Definition at line 683 of file sitkImageRegistrationMethod.h.
|
private |
Definition at line 690 of file sitkImageRegistrationMethod.h.
|
private |
Definition at line 680 of file sitkImageRegistrationMethod.h.
|
private |
Definition at line 610 of file sitkImageRegistrationMethod.h.
|
private |
Definition at line 605 of file sitkImageRegistrationMethod.h.
|
private |
Definition at line 604 of file sitkImageRegistrationMethod.h.
|
private |
Definition at line 601 of file sitkImageRegistrationMethod.h.
|
private |
Definition at line 603 of file sitkImageRegistrationMethod.h.
|
private |
Definition at line 602 of file sitkImageRegistrationMethod.h.
|
private |
Definition at line 606 of file sitkImageRegistrationMethod.h.
|
private |
Definition at line 607 of file sitkImageRegistrationMethod.h.
|
private |
Definition at line 612 of file sitkImageRegistrationMethod.h.
|
private |
Definition at line 727 of file sitkImageRegistrationMethod.h.
|
private |
Definition at line 729 of file sitkImageRegistrationMethod.h.
|
private |
Definition at line 728 of file sitkImageRegistrationMethod.h.
|
private |
Definition at line 731 of file sitkImageRegistrationMethod.h.
|
private |
Definition at line 641 of file sitkImageRegistrationMethod.h.
|
private |
Definition at line 639 of file sitkImageRegistrationMethod.h.
|
private |
Definition at line 638 of file sitkImageRegistrationMethod.h.
|
private |
Definition at line 640 of file sitkImageRegistrationMethod.h.