Class RegistrationMeasureLeastSquares
- java.lang.Object
-
- gov.nih.mipav.model.algorithms.registration.RegistrationMeasure
-
- gov.nih.mipav.model.algorithms.registration.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 Summary
Fields Modifier and Type Field Description protected float[]
m_afImageErr
Current error at each sample (registered-target).protected double
m_dSumSquaredError
Current sum of squared error measure.-
Fields inherited from class gov.nih.mipav.model.algorithms.registration.RegistrationMeasure
m_iNumSamples, m_kImageReg, m_kImageTrg
-
-
Constructor Summary
Constructors Constructor Description RegistrationMeasureLeastSquares()
Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description RegistrationMeasure
createNew()
Create a new instance of this measure.double
getError()
Return the current error measure between the target image and the registered source image.java.lang.String
getName()
Return the name of the particular registration measure.static java.lang.String
getStaticName()
Return the name of the particular registration measure without having an instance.void
setImages(ModelSimpleImage kImageSrc, ModelSimpleImage kImageTrg)
Setup the measure to use information from the target image and the original source image.void
updateRegistration(int iIndex, float fNewValue)
Update the specified value in the registered source image.-
Methods inherited from class gov.nih.mipav.model.algorithms.registration.RegistrationMeasure
createEmptyImage, getImageRegistered
-
-
-
-
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 classRegistrationMeasure
- 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 classRegistrationMeasure
- 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 classRegistrationMeasure
- 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 classRegistrationMeasure
- 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 classRegistrationMeasure
- 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.
-
-