Class AlgorithmTransformBSpline

java.lang.Object
java.lang.Thread
gov.nih.mipav.model.algorithms.AlgorithmBase
gov.nih.mipav.model.algorithms.AlgorithmTransformBSpline
All Implemented Interfaces:
ActionListener, WindowListener, Runnable, EventListener

public class AlgorithmTransformBSpline extends AlgorithmBase
TransformBSpline algorithm This algorithm takes a source image and uses information read in from a .nlt file to perform a nonlinear B-Spline transformation on the image. The dimensions of the transformed image, the degree of the B-Spline(ranging from 1 to 4), the number of control points, and the values of the control points are obtained from the .nlt file. For the .nlt file to be usable, the dimensions of the source image used in the .nlt file must be the same as the dimensions of the source image used in the algorithm.
  • Field Details

    • controlMat

      private float[][] controlMat
      DOCUMENT ME!
    • controlMat25D

      private float[][][] controlMat25D
      DOCUMENT ME!
    • destExtents

      private int[] destExtents
      DOCUMENT ME!
    • have25D

      private boolean have25D
      DOCUMENT ME!
    • m_iBSplineDegree

      private int m_iBSplineDegree
      DOCUMENT ME!
    • m_iBSplineNumControlPoints

      private int m_iBSplineNumControlPoints
      DOCUMENT ME!
    • m_kBSpline2D

      private BSplineLattice2Df m_kBSpline2D
      DOCUMENT ME!
    • m_kBSpline3D

      private BSplineLattice3Df m_kBSpline3D
      DOCUMENT ME!
    • m_kBSplineBasisX

      private WildMagic.LibFoundation.Curves.BSplineBasisDiscretef m_kBSplineBasisX
      2D and 3D B-Spline basis definitions.
    • m_kBSplineBasisY

      private WildMagic.LibFoundation.Curves.BSplineBasisDiscretef m_kBSplineBasisY
      DOCUMENT ME!
    • m_kBSplineBasisZ

      private WildMagic.LibFoundation.Curves.BSplineBasisDiscretef m_kBSplineBasisZ
      DOCUMENT ME!
    • m_kImageResult

      private ModelImage m_kImageResult
      DOCUMENT ME!
    • m_kImageSource

      private ModelImage m_kImageSource
      DOCUMENT ME!
    • m_kSimpleImageSource

      private ModelSimpleImage m_kSimpleImageSource
      DOCUMENT ME!
    • outResolutions

      private float[] outResolutions
      DOCUMENT ME!
  • Constructor Details

    • AlgorithmTransformBSpline

      public AlgorithmTransformBSpline(ModelImage kImageSource, float[] afResolutions, int iBSplineDegree, int iBSplineNumControlPoints, float[][][] controlMat25D)
      AlgorithmTransformBSpline - Constructor.
      Parameters:
      kImageSource - image that the B-Spline transformation is applied to
      afResolutions - sample resolutions for output image
      iBSplineDegree - degree of the B-Spline (same in all dimensions)
      iBSplineNumControlPoints - number of control points (same in all dimensions)
      controlMat25D - matrix containing the control point values The first index is the slice number The second index is used to select the point with controlY varying the fastest and controlX varying the slowest The second index is used to select the x or y value
    • AlgorithmTransformBSpline

      public AlgorithmTransformBSpline(ModelImage kImageSource, float[] afResolutions, int[] destExtents, int iBSplineDegree, int iBSplineNumControlPoints, float[][] controlMat)
      AlgorithmTransformBSpline - Constructor.
      Parameters:
      kImageSource - image that the B-Spline transformation is applied to
      afResolutions - sample resolutions for output image
      destExtents - dimensions of the transformed image
      iBSplineDegree - degree of the B-Spline (same in all dimensions)
      iBSplineNumControlPoints - number of control points (same in all dimensions)
      controlMat - matrix containing the control point values The first index is used to select the point with controlZ varying the fastest and controlX varying the slowest The second index is used to select the x, y, or z value
  • Method Details

    • disposeLocal

      public void disposeLocal()
      Prepares this class for destruction.
    • finalize

      public void finalize()
      DOCUMENT ME!
      Overrides:
      finalize in class AlgorithmBase
    • getTransformedImage

      public ModelImage getTransformedImage()
      DOCUMENT ME!
      Returns:
      DOCUMENT ME!
    • runAlgorithm

      public void runAlgorithm()
      starts the program.
      Specified by:
      runAlgorithm in class AlgorithmBase