Package gov.nih.mipav.model.structures
Class BSplineLattice2Df
- java.lang.Object
- 
- gov.nih.mipav.model.structures.BSplineLattice2Df
 
- 
 public class BSplineLattice2Df extends java.lang.ObjectThis class manages a 2D lattice of control points given a discretized B-Spline basis for each axis.
- 
- 
Field SummaryFields Modifier and Type Field Description protected WildMagic.LibFoundation.Mathematics.Vector2f[][]m_aakControlPointDOCUMENT ME!protected WildMagic.LibFoundation.Curves.BSplineBasisDiscretefm_kBasisXDOCUMENT ME!protected WildMagic.LibFoundation.Curves.BSplineBasisDiscretefm_kBasisYDOCUMENT ME!
 - 
Constructor SummaryConstructors Constructor Description BSplineLattice2Df(WildMagic.LibFoundation.Curves.BSplineBasisDiscretef kBasisX, WildMagic.LibFoundation.Curves.BSplineBasisDiscretef kBasisY)Create 2D lattice of control points given a discretized B-Spline basis for each axis.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description ModelSimpleImage[]createImageMap(int iSizeX, int iSizeY)Create an image of the specified dimensions and fill it to contain a mapping of the coordinates based on the 2D lattice of B-spline control points.voidfinalize()Cleanup memory.WildMagic.LibFoundation.Curves.BSplineBasisDiscretefgetBasisX()Return the discretized B-Spline basis for the X axis.WildMagic.LibFoundation.Curves.BSplineBasisDiscretefgetBasisY()Return the discretized B-Spline basis for the Y axis.voidgetControlPoint(int iControlX, int iControlY, WildMagic.LibFoundation.Mathematics.Vector2f kPoint)Retrieve the position of the specified control point.voidgetPosition(float fX, float fY, WildMagic.LibFoundation.Mathematics.Vector2f kPos)Return the B-Spline evaluation for the given input values.voidgetPosition(int iSampleX, int iSampleY, WildMagic.LibFoundation.Mathematics.Vector2f kPos)Return the B-Spline evaluation for the given input values.voidsetControlPoint(int iControlX, int iControlY, WildMagic.LibFoundation.Mathematics.Vector2f kPoint)Set the position of the specified control point.
 
- 
- 
- 
Field Detail- 
m_aakControlPointprotected WildMagic.LibFoundation.Mathematics.Vector2f[][] m_aakControlPoint DOCUMENT ME!
 - 
m_kBasisXprotected WildMagic.LibFoundation.Curves.BSplineBasisDiscretef m_kBasisX DOCUMENT ME!
 - 
m_kBasisYprotected WildMagic.LibFoundation.Curves.BSplineBasisDiscretef m_kBasisY DOCUMENT ME!
 
- 
 - 
Constructor Detail- 
BSplineLattice2Dfpublic BSplineLattice2Df(WildMagic.LibFoundation.Curves.BSplineBasisDiscretef kBasisX, WildMagic.LibFoundation.Curves.BSplineBasisDiscretef kBasisY)Create 2D lattice of control points given a discretized B-Spline basis for each axis. Initially, all of the control points are equally spaced.- Parameters:
- kBasisX- BSplineBasisDiscretef B-Spline basis for the X axis.
- kBasisY- BSplineBasisDiscretef B-Spline basis for the Y axis.
 
 
- 
 - 
Method Detail- 
createImageMappublic ModelSimpleImage[] createImageMap(int iSizeX, int iSizeY) Create an image of the specified dimensions and fill it to contain a mapping of the coordinates based on the 2D lattice of B-spline control points.- Parameters:
- iSizeX- int Number of samples along x axis of image.
- iSizeY- int Number of samples along y axis of image.
- Returns:
- ModelSimpleImage[] Array of two ModelSimpleImage instances. The first one contains the x coordinate and the second contains the y coordinate for the map. Each image has default resolutions of 1 for each axis.
 
 - 
finalizepublic void finalize() throws java.lang.ThrowableCleanup memory.- Overrides:
- finalizein class- java.lang.Object
- Throws:
- java.lang.Throwable- DOCUMENT ME!
 
 - 
getBasisXpublic WildMagic.LibFoundation.Curves.BSplineBasisDiscretef getBasisX() Return the discretized B-Spline basis for the X axis.- Returns:
- BSplineBasisDiscretef B-Spline basis.
 
 - 
getBasisYpublic WildMagic.LibFoundation.Curves.BSplineBasisDiscretef getBasisY() Return the discretized B-Spline basis for the Y axis.- Returns:
- BSplineBasisDiscretef B-Spline basis.
 
 - 
getControlPointpublic void getControlPoint(int iControlX, int iControlY, WildMagic.LibFoundation.Mathematics.Vector2f kPoint)Retrieve the position of the specified control point.- Parameters:
- iControlX- int Identifies control point in 2D lattice.
- iControlY- int Identifies control point in 2D lattice.
- kPoint- Point2f Where the current coordinates of the control point will be stored upon return.
 
 - 
getPositionpublic void getPosition(int iSampleX, int iSampleY, WildMagic.LibFoundation.Mathematics.Vector2f kPos)Return the B-Spline evaluation for the given input values. The evaluation is based on the 2D evaluation of the B-Spline basis (one for each axis) and the 2D lattice of control points.- Parameters:
- iSampleX- int Sample index along X axis which determines an input value in the [0,1] for that axis' B-Spline basis evaluation.
- iSampleY- int Sample index along Y axis which determines an input value in the [0,1] for that axis' B-Spline basis evaluation.
- kPos- Point2f 2D coordinates resulting from evaluation.
 
 - 
getPositionpublic void getPosition(float fX, float fY, WildMagic.LibFoundation.Mathematics.Vector2f kPos)Return the B-Spline evaluation for the given input values. The evaluation is based on the 2D evaluation of the B-Spline basis (one for each axis) and the 2D lattice of control points. This method is used for interpolating between the discrete samples.- Parameters:
- fX- float Sample in [0,1] range for the X axis evaluation of the B-Spline basis.
- fY- float Sample in [0,1] range for the Y axis evaluation of the B-Spline basis.
- kPos- Point2f 2D coordinates resulting from evaluation.
 
 - 
setControlPointpublic void setControlPoint(int iControlX, int iControlY, WildMagic.LibFoundation.Mathematics.Vector2f kPoint)Set the position of the specified control point. No checks are made on the input coordinates of the control point.- Parameters:
- iControlX- int Identifies control point in 2D lattice.
- iControlY- int Identifies control point in 2D lattice.
- kPoint- Point2f New coordinates of the control point.
 
 
- 
 
-