NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
itk::HistogramSimilarityMeasure< TFixedImage, TMovingImage > Class Template Reference

Computes similarity between two objects to be registered using Histogram. More...

Inheritance diagram for itk::HistogramSimilarityMeasure< TFixedImage, TMovingImage >:
Inheritance graph
[legend]
Collaboration diagram for itk::HistogramSimilarityMeasure< TFixedImage, TMovingImage >:
Collaboration graph
[legend]

Public Types

typedef HistogramSimilarityMeasure Self
 
typedef SimilarityMeasure
< TFixedImage, TMovingImage > 
Superclass
 
typedef SmartPointer< SelfPointer
 
typedef SmartPointer< const SelfConstPointer
 
typedef Superclass::MeasureType MeasureType
 
typedef Superclass::ParametersType ParametersType
 
typedef Superclass::DerivativeType DerivativeType
 
typedef
Superclass::FixedImagePixelType 
FixedImagePixelType
 
typedef
Superclass::MovingImagePixelType 
MovingImagePixelType
 
typedef
Statistics::UCLHistogram
< double, 2 > 
HistogramType
 
typedef HistogramType::Pointer HistogramPointer
 
typedef HistogramType::SizeType HistogramSizeType
 
typedef
HistogramType::MeasurementVectorType 
HistogramMeasurementVectorType
 
typedef
HistogramType::AbsoluteFrequencyType 
HistogramFrequencyType
 
typedef HistogramType::Iterator HistogramIteratorType
 
- Public Types inherited from itk::FiniteDifferenceGradientSimilarityMeasure< TFixedImage, TMovingImage >
typedef
FiniteDifferenceGradientSimilarityMeasure 
Self
 
typedef SimilarityMeasure
< TFixedImage, TMovingImage > 
Superclass
 
typedef SmartPointer< SelfPointer
 
typedef SmartPointer< const SelfConstPointer
 
typedef Array< double > ScalesType
 
typedef Superclass::DerivativeType DerivativeType
 
typedef Superclass::TransformType TransformType
 
typedef
Superclass::TransformParametersType 
TransformParametersType
 
typedef Superclass::MeasureType MeasureType
 
- Public Types inherited from itk::SimilarityMeasure< TFixedImage, TMovingImage >
typedef SimilarityMeasure Self
 
typedef
ImageToImageMetricWithConstraint
< TFixedImage, TMovingImage > 
Superclass
 
typedef SmartPointer< SelfPointer
 
typedef SmartPointer< const SelfConstPointer
 
typedef Superclass::TransformType TransformType
 
typedef itk::UCLBaseTransform
< double,
TFixedImage::ImageDimension,
TMovingImage::ImageDimension > 
UCLBaseTransformType
 
typedef
Superclass::TransformPointer 
TransformPointer
 
typedef
Superclass::TransformParametersType 
TransformParametersType
 
typedef
Superclass::TransformJacobianType 
TransformJacobianType
 
typedef Superclass::InputPointType InputPointType
 
typedef Superclass::OutputPointType OutputPointType
 
typedef Superclass::MeasureType MeasureType
 
typedef Superclass::DerivativeType DerivativeType
 
typedef Superclass::FixedImageType FixedImageType
 
typedef FixedImageType::SizeType FixedImageSizeType
 
typedef
Superclass::FixedImageType::PixelType 
FixedImagePixelType
 
typedef Superclass::MovingImageType MovingImageType
 
typedef MovingImageType::SizeType MovingImageSizeType
 
typedef
Superclass::MovingImageType::PixelType 
MovingImagePixelType
 
typedef
Superclass::FixedImageConstPointer 
FixedImageConstPointer
 
typedef
Superclass::MovingImageConstPointer 
MovingImageConstPointer
 
typedef ImageFileWriter
< TFixedImage > 
ImageFileWriterType
 
typedef
Superclass::InterpolatorType 
InterpolatorType
 
typedef Image< char,
TFixedImage::ImageDimension > 
MidwayImageType
 
typedef Image< float,
TFixedImage::ImageDimension > 
FloatImageType
 
typedef Image< unsigned char,
TFixedImage::ImageDimension > 
UnsignedCharImageType
 
typedef
SignedMaurerDistanceMapImageFilter
< UnsignedCharImageType,
FloatImageType
FixedDistanceMapImageFilterType
 
typedef
SignedMaurerDistanceMapImageFilter
< UnsignedCharImageType,
FloatImageType
MovingDistanceMapImageFilterType
 
typedef
LinearInterpolateImageFunction
< FloatImageType, double > 
DistanceMapLinearInterpolatorType
 
typedef
itk::EulerAffineTransform
< double,
TFixedImage::ImageDimension,
TMovingImage::ImageDimension > 
AffineTransformType
 
typedef const
ImageMaskSpatialObject
< TFixedImage::ImageDimension > 
FixedMaskType
 
typedef const
ImageMaskSpatialObject
< TMovingImage::ImageDimension > 
MovingMaskType
 
- Public Types inherited from itk::ImageToImageMetricWithConstraint< TFixedImage, TMovingImage >
typedef
ImageToImageMetricWithConstraint 
Self
 
typedef ImageToImageMetric
< TFixedImage, TMovingImage > 
Superclass
 
typedef SmartPointer< SelfPointer
 
typedef SmartPointer< const SelfConstPointer
 
typedef itk::Constraint ConstraintType
 
typedef ConstraintType::Pointer ConstraintPointer
 
typedef MetricDerivativeBridge
< TFixedImage, TMovingImage > 
MetricDerivativeBridgeType
 
typedef
MetricDerivativeBridgeType::Pointer 
MetricDerivativePointer
 
typedef Superclass::MeasureType MeasureType
 
typedef Superclass::DerivativeType DerivativeType
 
typedef Superclass::ParametersType TransformParametersType
 

Public Member Functions

virtual const char * GetClassName () const
 
void Initialize () throw (ExceptionObject)
 
void SetHistogramSize (int x, int y)
 
virtual void SetHistogramSize (HistogramSizeType _arg)
 
virtual const HistogramSizeTypeGetHistogramSize ()
 
virtual HistogramTypeGetHistogram ()
 
virtual void SetUseParzenFilling (bool _arg)
 
virtual bool GetUseParzenFilling ()
 
double GetParzenValue (double x)
 
double GetParzenDerivative (double x)
 
- Public Member Functions inherited from itk::FiniteDifferenceGradientSimilarityMeasure< TFixedImage, TMovingImage >
virtual void GetCostFunctionDerivative (const TransformParametersType &parameters, DerivativeType &derivative) const
 
void SetTransform (TransformType *transform)
 
virtual void SetDerivativeStepLength (double _arg)
 
virtual double GetDerivativeStepLength ()
 
virtual void SetDerivativeStepLengthScales (ScalesType _arg)
 
virtual const ScalesTypeGetDerivativeStepLengthScales ()
 
virtual void SetUseDerivativeScaleArray (bool _arg)
 
virtual bool GetUseDerivativeScaleArray ()
 
- Public Member Functions inherited from itk::SimilarityMeasure< TFixedImage, TMovingImage >
void Initialize () throw (ExceptionObject)
 
void InitializeIntensityBounds () throw (ExceptionObject)
 
void SetIntensityBounds (const FixedImagePixelType fixedLower, const FixedImagePixelType fixedUpper, const MovingImagePixelType movingLower, const MovingImagePixelType movingUpper)
 
virtual FixedImagePixelType GetFixedLowerBound () const
 
virtual FixedImagePixelType GetFixedUpperBound () const
 
virtual MovingImagePixelType GetMovingLowerBound () const
 
virtual MovingImagePixelType GetMovingUpperBound () const
 
virtual long int GetNumberOfFixedSamples ()
 
virtual long int GetNumberOfMovingSamples ()
 
virtual void SetTwoSidedMetric (bool _arg)
 
virtual bool GetTwoSidedMetric ()
 
virtual void SetWriteFixedImage (bool _arg)
 
virtual bool GetWriteFixedImage ()
 
virtual void SetFixedImageFileName (std::string _arg)
 
virtual std::string GetFixedImageFileName ()
 
virtual void SetFixedImageFileExt (std::string _arg)
 
virtual std::string GetFixedImageFileExt ()
 
virtual void SetWriteTransformedMovingImage (bool _arg)
 
virtual bool GetWriteTransformedMovingImage ()
 
virtual void SetTransformedMovingImageFileName (std::string _arg)
 
virtual std::string GetTransformedMovingImageFileName ()
 
virtual void SetTransformedMovingImageFileExt (std::string _arg)
 
virtual std::string GetTransformedMovingImageFileExt ()
 
virtual void SetDirectVoxelComparison (bool _arg)
 
virtual bool GetDirectVoxelComparison ()
 
virtual void SetSymmetricMetric (int _arg)
 
virtual int GetSymmetricMetric ()
 
virtual void SetIsUpdateMatrix (bool _arg)
 
virtual bool GetIsUpdateMatrix ()
 
virtual void SetTransformedMovingImagePadValue (MovingImagePixelType _arg)
 
virtual MovingImagePixelType GetTransformedMovingImagePadValue ()
 
virtual void SetUseWeighting (bool _arg)
 
virtual bool GetUseWeighting ()
 
virtual void SetWeightingDistanceThreshold (double _arg)
 
virtual double GetWeightingDistanceThreshold ()
 
virtual void SetFixedImageInterpolator (InterpolatorType *_arg)
 
virtual void SetMovingImageInterpolator (InterpolatorType *_arg)
 
virtual InterpolatorTypeGetFixedImageInterpolator ()
 
virtual InterpolatorTypeGetMovingImageInterpolator ()
 
virtual void SetFixedImageTransform (TransformType *_arg)
 
virtual TransformTypeGetFixedImageTransform ()
 
virtual void SetInitialiseIntensityBoundsUsingMask (bool _arg)
 
virtual bool GetInitialiseIntensityBoundsUsingMask ()
 
virtual void SetIsResampleWholeImage (bool _arg)
 
virtual bool GetIsResampleWholeImage ()
 
virtual bool ShouldBeMaximized ()
 
virtual const TFixedImage * GetTransformedMovingImage () const
 
virtual const TFixedImage * GetTransformedFixedImage () const
 
double GetMeasureOfParameterChange (TransformParametersType lastP, TransformParametersType p)
 
- Public Member Functions inherited from itk::ImageToImageMetricWithConstraint< TFixedImage, TMovingImage >
virtual void SetDerivativeBridge (MetricDerivativeBridgeType *_arg)
 
virtual
MetricDerivativeBridgeType
GetDerivativeBridge ()
 
virtual void SetConstraint (ConstraintType *_arg)
 
virtual ConstraintTypeGetConstraint ()
 
virtual void SetWeightingFactor (double _arg)
 
virtual double GetWeightingFactor ()
 
virtual void SetUseConstraintGradient (bool _arg)
 
virtual bool GetUseConstraintGradient () const
 
virtual void SetPrintOutMetricEvaluation (bool _arg)
 
virtual bool GetPrintOutMetricEvaluation ()
 
virtual MeasureType GetValue (const TransformParametersType &parameters) const
 
virtual void GetConstraintDerivative (const TransformParametersType &parameters, DerivativeType &derivative) const
 
virtual void GetDerivative (const TransformParametersType &parameters, DerivativeType &derivative) const
 
virtual void GetValueAndDerivative (const TransformParametersType &parameters, MeasureType &Value, DerivativeType &derivative) const
 

Protected Member Functions

 HistogramSimilarityMeasure ()
 
virtual ~HistogramSimilarityMeasure ()
 
void ResetCostFunction ()
 
void AggregateCostFunctionPair (FixedImagePixelType fixedValue, MovingImagePixelType movingValue)
 
void PrintSelf (std::ostream &os, Indent indent) const
 
MeasureType MeanFixed () const
 
MeasureType MeanMoving () const
 
MeasureType VarianceFixed () const
 
MeasureType VarianceMoving () const
 
MeasureType Covariance () const
 
MeasureType EntropyFixed () const
 
MeasureType EntropyMoving () const
 
MeasureType JointEntropy () const
 
- Protected Member Functions inherited from itk::FiniteDifferenceGradientSimilarityMeasure< TFixedImage, TMovingImage >
 FiniteDifferenceGradientSimilarityMeasure ()
 
virtual ~FiniteDifferenceGradientSimilarityMeasure ()
 
void PrintSelf (std::ostream &os, Indent indent) const
 
- Protected Member Functions inherited from itk::SimilarityMeasure< TFixedImage, TMovingImage >
 SimilarityMeasure ()
 
virtual ~SimilarityMeasure ()
 
void PrintSelf (std::ostream &os, Indent indent) const
 
virtual MeasureType GetSimilarity (const TransformParametersType &parameters) const
 
virtual void AggregateCostFunctionPairWithWeighting (FixedImagePixelType fixedValue, MovingImagePixelType movingValue, double weight)
 
virtual MeasureType FinalizeCostFunction ()=0
 
void WriteImage (const TFixedImage *image, std::string filename) const
 
virtual MeasureType GetSymmetricSimilarity (const TransformParametersType &parameters)
 
virtual MeasureType GetSymmetricSimilarityAtHalfway (const TransformParametersType &parameters)
 
virtual MeasureType GetSimilarityUsingFixedAndMovingImageTransforms (const TransformParametersType &parameters)
 
virtual void InitializeSymmetricMetric ()
 
virtual void InitializeDistanceWeightings ()
 
- Protected Member Functions inherited from itk::ImageToImageMetricWithConstraint< TFixedImage, TMovingImage >
 ImageToImageMetricWithConstraint ()
 
virtual ~ImageToImageMetricWithConstraint ()
 
void PrintSelf (std::ostream &os, Indent indent) const
 
virtual void GetCostFunctionDerivative (const TransformParametersType &parameters, DerivativeType &derivative) const =0
 

Protected Attributes

HistogramSizeType m_HistogramSize
 
HistogramPointer m_Histogram
 
- Protected Attributes inherited from itk::SimilarityMeasure< TFixedImage, TMovingImage >
TFixedImage::Pointer m_TransformedMovingImage
 
TFixedImage::Pointer m_TransformedFixedImage
 
InterpolatorType::Pointer m_FixedImageInterpolator
 
InterpolatorType::Pointer m_MovingImageInterpolator
 
FixedImagePixelType m_FixedLowerBound
 
FixedImagePixelType m_FixedUpperBound
 
MovingImagePixelType m_MovingLowerBound
 
MovingImagePixelType m_MovingUpperBound
 
bool m_UseWeighting
 
double m_WeightingDistanceThreshold
 
MidwayImageType::Pointer m_MidwayImage
 
FixedDistanceMapImageFilterType::Pointer m_FixedDistanceMap
 
MovingDistanceMapImageFilterType::Pointer m_MovingDistanceMap
 
DistanceMapLinearInterpolatorType::Pointer m_FixedDistanceMapInterpolator
 
DistanceMapLinearInterpolatorType::Pointer m_MovingDistanceMapInterpolator
 
TransformType::Pointer m_FixedImageTransform
 
bool m_InitialiseIntensityBoundsUsingMask
 
bool m_IsResampleWholeImage
 
- Protected Attributes inherited from itk::ImageToImageMetricWithConstraint< TFixedImage, TMovingImage >
MetricDerivativePointer m_DerivativeBridge
 
ConstraintPointer m_Constraint
 
double m_WeightingFactor
 
bool m_UseConstraintGradient
 
bool m_PrintOutMetricEvaluation
 

Additional Inherited Members

- Static Public Attributes inherited from itk::SimilarityMeasure< TFixedImage, TMovingImage >
static const int SYMMETRIC_METRIC_AVERAGE
 
static const int SYMMETRIC_METRIC_MID_WAY
 
static const int SYMMETRIC_METRIC_BOTH_FIXED_AND_MOVING_TRANSFORM
 

Detailed Description

template<class TFixedImage, class TMovingImage>
class itk::HistogramSimilarityMeasure< TFixedImage, TMovingImage >

Computes similarity between two objects to be registered using Histogram.

As of 20090126, provides support for filling histogram in a Parzen window type approach. However, the code is a bit simple for now, and we assume that the image has the same number of intensity values as the histogram has bins. So you MUST rescale your image to fit the histogram first.

Member Typedef Documentation

template<class TFixedImage , class TMovingImage >
typedef SmartPointer<const Self> itk::HistogramSimilarityMeasure< TFixedImage, TMovingImage >::ConstPointer
template<class TFixedImage , class TMovingImage >
typedef Superclass::DerivativeType itk::HistogramSimilarityMeasure< TFixedImage, TMovingImage >::DerivativeType
template<class TFixedImage , class TMovingImage >
typedef Superclass::FixedImagePixelType itk::HistogramSimilarityMeasure< TFixedImage, TMovingImage >::FixedImagePixelType
template<class TFixedImage , class TMovingImage >
typedef HistogramType::AbsoluteFrequencyType itk::HistogramSimilarityMeasure< TFixedImage, TMovingImage >::HistogramFrequencyType
template<class TFixedImage , class TMovingImage >
typedef HistogramType::Iterator itk::HistogramSimilarityMeasure< TFixedImage, TMovingImage >::HistogramIteratorType
template<class TFixedImage , class TMovingImage >
typedef HistogramType::MeasurementVectorType itk::HistogramSimilarityMeasure< TFixedImage, TMovingImage >::HistogramMeasurementVectorType
template<class TFixedImage , class TMovingImage >
typedef HistogramType::Pointer itk::HistogramSimilarityMeasure< TFixedImage, TMovingImage >::HistogramPointer
template<class TFixedImage , class TMovingImage >
typedef HistogramType::SizeType itk::HistogramSimilarityMeasure< TFixedImage, TMovingImage >::HistogramSizeType
template<class TFixedImage , class TMovingImage >
typedef Statistics::UCLHistogram<double, 2> itk::HistogramSimilarityMeasure< TFixedImage, TMovingImage >::HistogramType

Typedefs for histogram.

template<class TFixedImage , class TMovingImage >
typedef Superclass::MeasureType itk::HistogramSimilarityMeasure< TFixedImage, TMovingImage >::MeasureType

Types transferred from the base class

template<class TFixedImage , class TMovingImage >
typedef Superclass::MovingImagePixelType itk::HistogramSimilarityMeasure< TFixedImage, TMovingImage >::MovingImagePixelType
template<class TFixedImage , class TMovingImage >
typedef Superclass::ParametersType itk::HistogramSimilarityMeasure< TFixedImage, TMovingImage >::ParametersType
template<class TFixedImage , class TMovingImage >
typedef SmartPointer<Self> itk::HistogramSimilarityMeasure< TFixedImage, TMovingImage >::Pointer
template<class TFixedImage , class TMovingImage >
typedef HistogramSimilarityMeasure itk::HistogramSimilarityMeasure< TFixedImage, TMovingImage >::Self

Standard class typedefs.

template<class TFixedImage , class TMovingImage >
typedef SimilarityMeasure<TFixedImage, TMovingImage> itk::HistogramSimilarityMeasure< TFixedImage, TMovingImage >::Superclass

Constructor & Destructor Documentation

template<class TFixedImage , class TMovingImage >
itk::HistogramSimilarityMeasure< TFixedImage, TMovingImage >::HistogramSimilarityMeasure ( )
protected
template<class TFixedImage , class TMovingImage >
virtual itk::HistogramSimilarityMeasure< TFixedImage, TMovingImage >::~HistogramSimilarityMeasure ( )
inlineprotectedvirtual

Member Function Documentation

template<class TFixedImage , class TMovingImage >
void itk::HistogramSimilarityMeasure< TFixedImage, TMovingImage >::AggregateCostFunctionPair ( FixedImagePixelType  fixedValue,
MovingImagePixelType  movingValue 
)
protectedvirtual

Use this method to add corresponding pairs of image values, called repeatedly during a single value of the cost function.

Implements itk::SimilarityMeasure< TFixedImage, TMovingImage >.

template<class TFixedImage , class TMovingImage >
MeasureType itk::HistogramSimilarityMeasure< TFixedImage, TMovingImage >::Covariance ( ) const
inlineprotected

Returns the co-variance.

template<class TFixedImage , class TMovingImage >
MeasureType itk::HistogramSimilarityMeasure< TFixedImage, TMovingImage >::EntropyFixed ( ) const
inlineprotected

Returns the entropy in the fixed direction.

template<class TFixedImage , class TMovingImage >
MeasureType itk::HistogramSimilarityMeasure< TFixedImage, TMovingImage >::EntropyMoving ( ) const
inlineprotected

Returns the entropy in the moving direction.

template<class TFixedImage , class TMovingImage >
virtual const char* itk::HistogramSimilarityMeasure< TFixedImage, TMovingImage >::GetClassName ( ) const
virtual
template<class TFixedImage , class TMovingImage >
virtual HistogramType* itk::HistogramSimilarityMeasure< TFixedImage, TMovingImage >::GetHistogram ( )
virtual

Return the joint histogram. This is updated during every call to the GetValue() method and the GetDerivative() method.

template<class TFixedImage , class TMovingImage >
virtual const HistogramSizeType& itk::HistogramSimilarityMeasure< TFixedImage, TMovingImage >::GetHistogramSize ( )
virtual

Gets the histogram size.

template<class TFixedImage , class TMovingImage >
double itk::HistogramSimilarityMeasure< TFixedImage, TMovingImage >::GetParzenDerivative ( double  x)

Returns the Parzen derivative.

template<class TFixedImage , class TMovingImage >
double itk::HistogramSimilarityMeasure< TFixedImage, TMovingImage >::GetParzenValue ( double  x)

Returns the Parzen value.

template<class TFixedImage , class TMovingImage >
virtual bool itk::HistogramSimilarityMeasure< TFixedImage, TMovingImage >::GetUseParzenFilling ( )
virtual
template<class TFixedImage , class TMovingImage >
void itk::HistogramSimilarityMeasure< TFixedImage, TMovingImage >::Initialize ( )
throw (ExceptionObject
)

Initializes the metric.

template<class TFixedImage , class TMovingImage >
MeasureType itk::HistogramSimilarityMeasure< TFixedImage, TMovingImage >::JointEntropy ( ) const
inlineprotected

Returns joint entropy.

template<class TFixedImage , class TMovingImage >
MeasureType itk::HistogramSimilarityMeasure< TFixedImage, TMovingImage >::MeanFixed ( ) const
inlineprotected

Returns the mean in the x-direction.

template<class TFixedImage , class TMovingImage >
MeasureType itk::HistogramSimilarityMeasure< TFixedImage, TMovingImage >::MeanMoving ( ) const
inlineprotected

Returns the mean in the y-direction.

template<class TFixedImage , class TMovingImage >
void itk::HistogramSimilarityMeasure< TFixedImage, TMovingImage >::PrintSelf ( std::ostream &  os,
Indent  indent 
) const
protected

PrintSelf funtion

template<class TFixedImage , class TMovingImage >
void itk::HistogramSimilarityMeasure< TFixedImage, TMovingImage >::ResetCostFunction ( )
inlineprotectedvirtual

Called at the start of each evaluation.

Implements itk::SimilarityMeasure< TFixedImage, TMovingImage >.

template<class TFixedImage , class TMovingImage >
void itk::HistogramSimilarityMeasure< TFixedImage, TMovingImage >::SetHistogramSize ( int  x,
int  y 
)
inline

Overload this method, to make it easier for users.

template<class TFixedImage , class TMovingImage >
virtual void itk::HistogramSimilarityMeasure< TFixedImage, TMovingImage >::SetHistogramSize ( HistogramSizeType  _arg)
virtual

Sets the histogram size. Note this function must be called before Initialize().

template<class TFixedImage , class TMovingImage >
virtual void itk::HistogramSimilarityMeasure< TFixedImage, TMovingImage >::SetUseParzenFilling ( bool  _arg)
virtual

If set to true, we fill histogram with a gaussian per sample. Default false. NOTE: For now, for this to work properly, the image must have the same number of intensity values as the histogram.

template<class TFixedImage , class TMovingImage >
MeasureType itk::HistogramSimilarityMeasure< TFixedImage, TMovingImage >::VarianceFixed ( ) const
inlineprotected

Returns the variance in the x-direction.

template<class TFixedImage , class TMovingImage >
MeasureType itk::HistogramSimilarityMeasure< TFixedImage, TMovingImage >::VarianceMoving ( ) const
inlineprotected

Returns the variance in the y-direction.

Member Data Documentation

template<class TFixedImage , class TMovingImage >
HistogramPointer itk::HistogramSimilarityMeasure< TFixedImage, TMovingImage >::m_Histogram
protected

Pointer to the joint histogram. This is updated during every call to GetValue()

template<class TFixedImage , class TMovingImage >
HistogramSizeType itk::HistogramSimilarityMeasure< TFixedImage, TMovingImage >::m_HistogramSize
protected

The histogram size.


The documentation for this class was generated from the following file: