Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages |
#include <elxMetricBase.h>
This class is the elastix base class for all Metrics.
This class contains the common functionality for all Metrics.
The parameters used in this class are:
ShowExactMetricValue: Flag that can set to "true" or "false". If "true" the metric computes the exact metric value (computed on all voxels rather than on the set of spatial samples) and shows it each iteration. Must be given for each resolution.
example: (ShowExactMetricValue "true" "true" "false")
Default is "false" for all resolutions.
ExactMetricSampleGridSpacing: Set an integer downsampling rate for computing the "exact" metric. Only meaningful if set in combination with the ShowExactMetricValue set to "true". In some cases, it might be an overkill to really compute the exact metric with the ShowExactMetricValue. The metric computed on a downsampled image might already be accurate enough to draw conclusions about the rate of convergence for example. The downsampling rate must be given for each resolution, for each dimension.
example: (ExactMetricSampleGridSpacing 1 1 2 2 )
This example for a 2D registration of 2 resolutions sets the downsampling rate to 1 in the first resolution (so: use really all pixels), and to 2 in the second resolution. Default: 1 in each resolution and each dimension.
CheckNumberOfSamples: Whether the metric checks if at least a certain fraction (default 1/4) of the samples map inside the moving image. Can be given for each resolution or for all resolutions at once.
example: (CheckNumberOfSamples "false" "true" "false")
The default is true. In general it is wise to set this to true, since it detects if the registration is going really bad.
RequiredRatioOfValidSamples: Defines the fraction needed in CheckNumberOfSamples.
example: (RequiredRatioOfValidSamples 0.1)
The default is 0.25.
Definition at line 72 of file elxMetricBase.h.
Protected Types | |
typedef ExactMetricImageSamplerType::Pointer | ExactMetricImageSamplerPointer |
typedef itk::ImageGridSampler< FixedImageType > | ExactMetricImageSamplerType |
typedef ExactMetricImageSamplerType::SampleGridSpacingType | ExactMetricSampleGridSpacingType |
typedef ITKBaseType::ParametersType | ParametersType |
Protected Member Functions | |
virtual MeasureType | GetExactValue (const ParametersType ¶meters) |
MetricBase () | |
~MetricBase () override | |
Protected Member Functions inherited from elastix::BaseComponentSE< TElastix > | |
BaseComponentSE ()=default | |
~BaseComponentSE () override=default | |
Protected Member Functions inherited from elastix::BaseComponent | |
BaseComponent ()=default | |
virtual | ~BaseComponent ()=default |
Protected Attributes | |
MeasureType | m_CurrentExactMetricValue |
unsigned int | m_ExactMetricEachXNumberOfIterations |
ExactMetricSampleGridSpacingType | m_ExactMetricSampleGridSpacing |
ExactMetricImageSamplerPointer | m_ExactMetricSampler |
bool | m_ShowExactMetricValue |
Protected Attributes inherited from elastix::BaseComponentSE< TElastix > | |
ConfigurationPointer | m_Configuration {} |
ElastixPointer | m_Elastix {} |
RegistrationPointer | m_Registration {} |
Private Member Functions | |
MetricBase (const Self &) | |
void | operator= (const Self &) |
Additional Inherited Members | |
Static Public Member Functions inherited from elastix::BaseComponent | |
static std::string | ConvertSecondsToDHMS (const double totalSeconds, const unsigned int precision) |
static void | InitializeElastixExecutable () |
static bool | IsElastixLibrary () |
typedef itk::AdvancedImageToImageMetric< FixedImageType, MovingImageType > elastix::MetricBase< TElastix >::AdvancedMetricType |
Definition at line 102 of file elxMetricBase.h.
typedef Superclass::ConfigurationPointer elastix::MetricBase< TElastix >::ConfigurationPointer |
Definition at line 87 of file elxMetricBase.h.
typedef Superclass::ConfigurationType elastix::MetricBase< TElastix >::ConfigurationType |
Definition at line 86 of file elxMetricBase.h.
typedef ITKBaseType::ParametersValueType elastix::MetricBase< TElastix >::CoordinateRepresentationType |
Typedefs for point sets.
Definition at line 111 of file elxMetricBase.h.
typedef Superclass::ElastixPointer elastix::MetricBase< TElastix >::ElastixPointer |
Definition at line 85 of file elxMetricBase.h.
typedef Superclass::ElastixType elastix::MetricBase< TElastix >::ElastixType |
Typedef's inherited from Elastix.
Definition at line 84 of file elxMetricBase.h.
|
protected |
Definition at line 195 of file elxMetricBase.h.
|
protected |
The full sampler used by the GetExactValue method.
Definition at line 194 of file elxMetricBase.h.
|
protected |
Definition at line 196 of file elxMetricBase.h.
typedef ElastixType::FixedImageType elastix::MetricBase< TElastix >::FixedImageType |
Other typedef's.
Definition at line 92 of file elxMetricBase.h.
typedef itk::PointSet< CoordinateRepresentationType, FixedImageDimension, itk::DefaultStaticMeshTraits< CoordinateRepresentationType, FixedImageDimension, FixedImageDimension, CoordinateRepresentationType, CoordinateRepresentationType, CoordinateRepresentationType > > elastix::MetricBase< TElastix >::FixedPointSetType |
Definition at line 118 of file elxMetricBase.h.
typedef FixedImageType::PointType elastix::MetricBase< TElastix >::FixedPointType |
Definition at line 93 of file elxMetricBase.h.
typedef FixedPointType::ValueType elastix::MetricBase< TElastix >::FixedPointValueType |
Definition at line 94 of file elxMetricBase.h.
typedef AdvancedMetricType::ImageSamplerType elastix::MetricBase< TElastix >::ImageSamplerBaseType |
Typedefs for sampler support.
Definition at line 128 of file elxMetricBase.h.
typedef itk::SingleValuedCostFunction elastix::MetricBase< TElastix >::ITKBaseType |
ITKBaseType.
Definition at line 100 of file elxMetricBase.h.
typedef ITKBaseType::MeasureType elastix::MetricBase< TElastix >::MeasureType |
Return type of GetValue
Definition at line 131 of file elxMetricBase.h.
typedef AdvancedMetricType::MovingImageDerivativeScalesType elastix::MetricBase< TElastix >::MovingImageDerivativeScalesType |
Definition at line 103 of file elxMetricBase.h.
typedef ElastixType::MovingImageType elastix::MetricBase< TElastix >::MovingImageType |
Definition at line 95 of file elxMetricBase.h.
typedef itk::PointSet< CoordinateRepresentationType, MovingImageDimension, itk::DefaultStaticMeshTraits< CoordinateRepresentationType, MovingImageDimension, MovingImageDimension, CoordinateRepresentationType, CoordinateRepresentationType, CoordinateRepresentationType > > elastix::MetricBase< TElastix >::MovingPointSetType |
Definition at line 125 of file elxMetricBase.h.
typedef MovingImageType::PointType elastix::MetricBase< TElastix >::MovingPointType |
Definition at line 96 of file elxMetricBase.h.
typedef MovingPointType::ValueType elastix::MetricBase< TElastix >::MovingPointValueType |
Definition at line 97 of file elxMetricBase.h.
|
protected |
The parameters type.
Definition at line 191 of file elxMetricBase.h.
typedef Superclass::RegistrationPointer elastix::MetricBase< TElastix >::RegistrationPointer |
Definition at line 89 of file elxMetricBase.h.
typedef Superclass::RegistrationType elastix::MetricBase< TElastix >::RegistrationType |
Definition at line 88 of file elxMetricBase.h.
typedef MetricBase elastix::MetricBase< TElastix >::Self |
Standard ITK stuff.
Definition at line 77 of file elxMetricBase.h.
typedef BaseComponentSE< TElastix > elastix::MetricBase< TElastix >::Superclass |
Definition at line 78 of file elxMetricBase.h.
|
protected |
The constructor.
|
inlineoverrideprotected |
The destructor.
Definition at line 201 of file elxMetricBase.h.
|
private |
The private constructor.
|
overridevirtual |
Execute stuff after each iteration:
Reimplemented from elastix::BaseComponent.
|
overridevirtual |
Execute stuff before each resolution:
Reimplemented from elastix::BaseComponent.
|
virtual |
Methods to get the image sampler. The image sampler is only used when the metric is of type AdvancedMetricType, and has UseImageSampler set to true. In other cases, the function returns 0.
|
virtual |
Returns whether the metric uses a sampler. When the metric is not of AdvancedMetricType, the function returns false immediately.
|
inlinevirtual |
Cast to ITKBaseType.
Definition at line 134 of file elxMetricBase.h.
|
inlinevirtual |
Cast to ITKBaseType, to use in const functions.
Definition at line 141 of file elxMetricBase.h.
|
virtual |
Run-time type information (and related methods).
Reimplemented in elastix::AdvancedKappaStatisticMetric< TElastix >, elastix::AdvancedMattesMutualInformationMetric< TElastix >, elastix::AdvancedMeanSquaresMetric< TElastix >, elastix::AdvancedNormalizedCorrelationMetric< TElastix >, elastix::TransformBendingEnergyPenalty< TElastix >, elastix::CorrespondingPointsEuclideanDistanceMetric< TElastix >, elastix::DisplacementMagnitudePenalty< TElastix >, elastix::DistancePreservingRigidityPenalty< TElastix >, elastix::GradientDifferenceMetric< TElastix >, elastix::KNNGraphAlphaMutualInformationMetric< TElastix >, elastix::MissingStructurePenalty< TElastix >, elastix::MutualInformationHistogramMetric< TElastix >, elastix::NormalizedGradientCorrelationMetric< TElastix >, elastix::NormalizedMutualInformationMetric< TElastix >, elastix::PatternIntensityMetric< TElastix >, elastix::PCAMetric< TElastix >, elastix::PCAMetric2< TElastix >, elastix::PolydataDummyPenalty< TElastix >, elastix::TransformRigidityPenalty< TElastix >, elastix::StatisticalShapePenalty< TElastix >, elastix::SumOfPairwiseCorrelationCoefficientsMetric< TElastix >, elastix::SumSquaredTissueVolumeDifferenceMetric< TElastix >, elastix::VarianceOverLastDimensionMetric< TElastix >, and elastix::ViolaWellsMutualInformationMetric< TElastix >.
|
inlinevirtual |
Get the last computed exact metric value
Definition at line 185 of file elxMetricBase.h.
|
protectedvirtual |
Get the exact value. Mutual information computed over all points. It is meant in situations when you optimize using just a subset of pixels, but are interested in the exact value of the metric.
This method only works when the itkYourMetric inherits from the AdvancedMetricType. In other cases it returns 0. You may re-implement this method in the elxYourMetric, if you like.
|
inlinevirtual |
Get if the exact metric value is computed
Definition at line 181 of file elxMetricBase.h.
elastix::MetricBase< TElastix >::itkStaticConstMacro | ( | FixedImageDimension | , |
unsigned int | , | ||
FixedImageType::ImageDimension | |||
) |
Get the dimension of the fixed image.
elastix::MetricBase< TElastix >::itkStaticConstMacro | ( | MovingImageDimension | , |
unsigned int | , | ||
MovingImageType::ImageDimension | |||
) |
Get the dimension of the moving image.
|
private |
The private copy constructor.
|
virtual |
Force the metric to base its computation on a new subset of image samples. Not every metric may have implemented this.
Reimplemented in elastix::CorrespondingPointsEuclideanDistanceMetric< TElastix >, elastix::MissingStructurePenalty< TElastix >, elastix::PolydataDummyPenalty< TElastix >, elastix::TransformRigidityPenalty< TElastix >, and elastix::StatisticalShapePenalty< TElastix >.
|
virtual |
Method to set the image sampler. The image sampler is only used when the metric is of type AdvancedMetricType, and has UseImageSampler set to true. In other cases, the function does nothing.
|
protected |
Definition at line 218 of file elxMetricBase.h.
|
protected |
Definition at line 220 of file elxMetricBase.h.
|
protected |
Definition at line 219 of file elxMetricBase.h.
|
protected |
Definition at line 217 of file elxMetricBase.h.
|
protected |
Definition at line 216 of file elxMetricBase.h.
Generated on 1667476801 for elastix by 1.9.4 |