Package gov.nih.mipav.model.algorithms
Class AlgorithmTransformBSpline
- java.lang.Object
-
- java.lang.Thread
-
- gov.nih.mipav.model.algorithms.AlgorithmBase
-
- gov.nih.mipav.model.algorithms.AlgorithmTransformBSpline
-
- All Implemented Interfaces:
java.awt.event.ActionListener
,java.awt.event.WindowListener
,java.lang.Runnable
,java.util.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 Summary
Fields Modifier and Type Field Description private float[][]
controlMat
DOCUMENT ME!private float[][][]
controlMat25D
DOCUMENT ME!private int[]
destExtents
DOCUMENT ME!private boolean
have25D
DOCUMENT ME!private int
m_iBSplineDegree
DOCUMENT ME!private int
m_iBSplineNumControlPoints
DOCUMENT ME!private BSplineLattice2Df
m_kBSpline2D
DOCUMENT ME!private BSplineLattice3Df
m_kBSpline3D
DOCUMENT ME!private WildMagic.LibFoundation.Curves.BSplineBasisDiscretef
m_kBSplineBasisX
2D and 3D B-Spline basis definitions.private WildMagic.LibFoundation.Curves.BSplineBasisDiscretef
m_kBSplineBasisY
DOCUMENT ME!private WildMagic.LibFoundation.Curves.BSplineBasisDiscretef
m_kBSplineBasisZ
DOCUMENT ME!private ModelImage
m_kImageResult
DOCUMENT ME!private ModelImage
m_kImageSource
DOCUMENT ME!private ModelSimpleImage
m_kSimpleImageSource
DOCUMENT ME!private float[]
outResolutions
DOCUMENT ME!-
Fields inherited from class gov.nih.mipav.model.algorithms.AlgorithmBase
destFlag, destImage, image25D, mask, maxProgressValue, minProgressValue, multiThreadingEnabled, nthreads, progress, progressModulus, progressStep, runningInSeparateThread, separable, srcImage, threadStopped
-
-
Constructor Summary
Constructors Constructor Description AlgorithmTransformBSpline(ModelImage kImageSource, float[] afResolutions, int[] destExtents, int iBSplineDegree, int iBSplineNumControlPoints, float[][] controlMat)
AlgorithmTransformBSpline - Constructor.AlgorithmTransformBSpline(ModelImage kImageSource, float[] afResolutions, int iBSplineDegree, int iBSplineNumControlPoints, float[][][] controlMat25D)
AlgorithmTransformBSpline - Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
disposeLocal()
Prepares this class for destruction.void
finalize()
DOCUMENT ME!ModelImage
getTransformedImage()
DOCUMENT ME!void
runAlgorithm()
starts the program.-
Methods inherited from class gov.nih.mipav.model.algorithms.AlgorithmBase
actionPerformed, addListener, addProgressChangeListener, calculateImageSize, calculatePrincipleAxis, computeElapsedTime, computeElapsedTime, convertIntoFloat, delinkProgressToAlgorithm, delinkProgressToAlgorithmMulti, displayError, errorCleanUp, fireProgressStateChanged, fireProgressStateChanged, fireProgressStateChanged, fireProgressStateChanged, fireProgressStateChanged, generateProgressValues, getDestImage, getElapsedTime, getMask, getMaxProgressValue, getMinProgressValue, getNumberOfThreads, getProgress, getProgressChangeListener, getProgressChangeListeners, getProgressModulus, getProgressStep, getProgressValues, getSrcImage, isCompleted, isImage25D, isMultiThreadingEnabled, isRunningInSeparateThread, isThreadStopped, linkProgressToAlgorithm, linkProgressToAlgorithm, makeProgress, notifyListeners, removeListener, removeProgressChangeListener, run, setCompleted, setImage25D, setMask, setMaxProgressValue, setMinProgressValue, setMultiThreadingEnabled, setNumberOfThreads, setProgress, setProgressModulus, setProgressStep, setProgressValues, setProgressValues, setRunningInSeparateThread, setSrcImage, setStartTime, setThreadStopped, startMethod, windowActivated, windowClosed, windowClosing, windowDeactivated, windowDeiconified, windowIconified, windowOpened
-
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
-
-
-
-
Field Detail
-
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 Detail
-
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 toafResolutions
- sample resolutions for output imageiBSplineDegree
- 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 toafResolutions
- sample resolutions for output imagedestExtents
- dimensions of the transformed imageiBSplineDegree
- 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 Detail
-
disposeLocal
public void disposeLocal()
Prepares this class for destruction.
-
finalize
public void finalize()
DOCUMENT ME!- Overrides:
finalize
in classAlgorithmBase
-
getTransformedImage
public ModelImage getTransformedImage()
DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
runAlgorithm
public void runAlgorithm()
starts the program.- Specified by:
runAlgorithm
in classAlgorithmBase
-
-