Class RegistrationMeasureLeastSquares


  • public class RegistrationMeasureLeastSquares
    extends RegistrationMeasure
    Concrete implementation of the RegistrationMeasure class based on sum of the squared differences between the target image and the registered source image. The error value is normalized by computing the root mean squared error. The differences between corresponding target image and registered source image are maintained in a separate image and a cummulative sum of squared differences is maintained.
    • Field Detail

      • m_afImageErr

        protected float[] m_afImageErr
        Current error at each sample (registered-target). Has the same number of samples as the target and registered images.
      • m_dSumSquaredError

        protected double m_dSumSquaredError
        Current sum of squared error measure.
    • Constructor Detail

      • RegistrationMeasureLeastSquares

        public RegistrationMeasureLeastSquares()
        Constructor.
    • Method Detail

      • getStaticName

        public static java.lang.String getStaticName()
        Return the name of the particular registration measure without having an instance.
        Returns:
        String Contains the name of the particular registration measure.
      • createNew

        public RegistrationMeasure createNew()
        Create a new instance of this measure. That is, the same type and having the same properties. But initially, the target is not defined.
        Specified by:
        createNew in class RegistrationMeasure
        Returns:
        RegistrationMeasure Newly created instance.
      • getError

        public double getError()
        Return the current error measure between the target image and the registered source image.
        Specified by:
        getError in class RegistrationMeasure
        Returns:
        double Error measure value. Minimum value is zero. Maximum value depends on the range of values in the target and registered source images.
      • getName

        public java.lang.String getName()
        Return the name of the particular registration measure.
        Specified by:
        getName in class RegistrationMeasure
        Returns:
        String Contains the name of the particular registration measure.
      • setImages

        public void setImages​(ModelSimpleImage kImageSrc,
                              ModelSimpleImage kImageTrg)
        Setup the measure to use information from the target image and the original source image. Each derived class override of this method must call this method.
        Overrides:
        setImages in class RegistrationMeasure
        Parameters:
        kImageSrc - ModelSimpleImage Contains information and data about the original source image. This array may be empty but not null.
        kImageTrg - ModelSimpleImage Contains information and data about yhe target image. This array may be empty but not null.
      • updateRegistration

        public void updateRegistration​(int iIndex,
                                       float fNewValue)
        Update the specified value in the registered source image. Causes a change in the computed error measure.
        Specified by:
        updateRegistration in class RegistrationMeasure
        Parameters:
        iIndex - int Linear array index for the value to be updated.
        fNewValue - float New registered source image value to store at the specified index.