Class RegistrationMeasureLeastSquares
java.lang.Object
gov.nih.mipav.model.algorithms.registration.RegistrationMeasure
gov.nih.mipav.model.algorithms.registration.RegistrationMeasureLeastSquares
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
FieldsModifier and TypeFieldDescriptionprotected float[]Current error at each sample (registered-target).protected doubleCurrent 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 -
Method Summary
Modifier and TypeMethodDescriptionCreate a new instance of this measure.doublegetError()Return the current error measure between the target image and the registered source image.getName()Return the name of the particular registration measure.static StringReturn the name of the particular registration measure without having an instance.voidsetImages(ModelSimpleImage kImageSrc, ModelSimpleImage kImageTrg) Setup the measure to use information from the target image and the original source image.voidupdateRegistration(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
-
Field Details
-
m_afImageErr
protected float[] m_afImageErrCurrent error at each sample (registered-target). Has the same number of samples as the target and registered images. -
m_dSumSquaredError
protected double m_dSumSquaredErrorCurrent sum of squared error measure.
-
-
Constructor Details
-
RegistrationMeasureLeastSquares
public RegistrationMeasureLeastSquares()Constructor.
-
-
Method Details
-
getStaticName
Return the name of the particular registration measure without having an instance.- Returns:
- String Contains the name of the particular registration measure.
-
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:
createNewin 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:
getErrorin 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
Return the name of the particular registration measure.- Specified by:
getNamein classRegistrationMeasure- Returns:
- String Contains the name of the particular registration measure.
-
setImages
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:
setImagesin 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:
updateRegistrationin 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.
-