Class BSplineRegistrationBasef
- java.lang.Object
-
- gov.nih.mipav.model.algorithms.registration.BSplineRegistrationBasef
-
- Direct Known Subclasses:
BSplineRegistration2Df
,BSplineRegistration3Df
public class BSplineRegistrationBasef extends java.lang.Object
This is a common base class for all BSpline-based registrations.
-
-
Field Summary
Fields Modifier and Type Field Description protected int
m_iNumSamplesTrg
Total number of samples in target, registered source, and error images.protected ModelSimpleImage
m_kImageSrc
DOCUMENT ME!protected ModelSimpleImage
m_kImageTrg
DOCUMENT ME!protected RegistrationMeasure
m_kRegMeasure
Defines the cost measure for comparing the target image with the registered image.protected int
nthreads
The number of threads.
-
Constructor Summary
Constructors Modifier Constructor Description protected
BSplineRegistrationBasef(ModelSimpleImage kImageSrc, ModelSimpleImage kImageTrg, RegistrationMeasure kRegMeasure)
Create instance to be used for registration.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected float[]
createIdentityMapControlPoints(WildMagic.LibFoundation.Curves.BSplineBasisDiscretef kBasis)
Create optimal placement of control points for each dimension which yields the identity mapping of the source image, i.e., identity in that the output value to the Bspline function is the same as the input value.void
finalize()
Cleanup memory.double
getError()
Return the current error measure computeas the root mean squared error.ModelSimpleImage
getImageSource()
Return access to input source image data values which is the same as was passed to the constructor.ModelSimpleImage
getImageTarget()
Return access to input target image data values which is the same as was passed to the constructor.
-
-
-
Field Detail
-
m_iNumSamplesTrg
protected int m_iNumSamplesTrg
Total number of samples in target, registered source, and error images.
-
m_kImageSrc
protected ModelSimpleImage m_kImageSrc
DOCUMENT ME!
-
m_kImageTrg
protected ModelSimpleImage m_kImageTrg
DOCUMENT ME!
-
m_kRegMeasure
protected RegistrationMeasure m_kRegMeasure
Defines the cost measure for comparing the target image with the registered image.
-
nthreads
protected int nthreads
The number of threads.
-
-
Constructor Detail
-
BSplineRegistrationBasef
protected BSplineRegistrationBasef(ModelSimpleImage kImageSrc, ModelSimpleImage kImageTrg, RegistrationMeasure kRegMeasure)
Create instance to be used for registration. Creates the memory for the registered source image and the error image given the total number of samples in the image.- Parameters:
kImageSrc
- ModelSimpleImage Input source image which contains properties and data values. Must have either 2 or 3 dimensions where the number of dimensions matches that of the target image.kImageTrg
- ModelSimpleImage Input target image which contains properties and data values. Must have either 2 or 3 dimensions where the number of dimensions matches that of the source image.kRegMeasure
- RegistrationMeasure Defines the cost measure for comparing the target image with the registered source image.
-
-
Method Detail
-
finalize
public void finalize() throws java.lang.Throwable
Cleanup memory.- Overrides:
finalize
in classjava.lang.Object
- Throws:
java.lang.Throwable
- DOCUMENT ME!
-
getError
public double getError()
Return the current error measure computeas the root mean squared error.- Returns:
- double Current cummulative error measure between target and registered source.
-
getImageSource
public ModelSimpleImage getImageSource()
Return access to input source image data values which is the same as was passed to the constructor.- Returns:
- ModelSimpleImage Image which contains properties and data values.
-
getImageTarget
public ModelSimpleImage getImageTarget()
Return access to input target image data values which is the same as was passed to the constructor.- Returns:
- ModelSimpleImage Image which contains properties and data values.
-
createIdentityMapControlPoints
protected float[] createIdentityMapControlPoints(WildMagic.LibFoundation.Curves.BSplineBasisDiscretef kBasis)
Create optimal placement of control points for each dimension which yields the identity mapping of the source image, i.e., identity in that the output value to the Bspline function is the same as the input value.- Parameters:
kBasis
- BSplineBasisDiscretef Input BSpline-basis for a single dimension.- Returns:
- float[] Array of control point positions for this single dimension input B-spline basis These positions are in the [0,1] range and are monotonically increasing. The size of this array is determined by the number of control points specified for the input BSpline basis.
-
-