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[][]controlMatDOCUMENT ME!private float[][][]controlMat25DDOCUMENT ME!private int[]destExtentsDOCUMENT ME!private booleanhave25DDOCUMENT ME!private intm_iBSplineDegreeDOCUMENT ME!private intm_iBSplineNumControlPointsDOCUMENT ME!private BSplineLattice2Dfm_kBSpline2DDOCUMENT ME!private BSplineLattice3Dfm_kBSpline3DDOCUMENT ME!private WildMagic.LibFoundation.Curves.BSplineBasisDiscretefm_kBSplineBasisX2D and 3D B-Spline basis definitions.private WildMagic.LibFoundation.Curves.BSplineBasisDiscretefm_kBSplineBasisYDOCUMENT ME!private WildMagic.LibFoundation.Curves.BSplineBasisDiscretefm_kBSplineBasisZDOCUMENT ME!private ModelImagem_kImageResultDOCUMENT ME!private ModelImagem_kImageSourceDOCUMENT ME!private ModelSimpleImagem_kSimpleImageSourceDOCUMENT ME!private float[]outResolutionsDOCUMENT 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 voiddisposeLocal()Prepares this class for destruction.voidfinalize()DOCUMENT ME!ModelImagegetTransformedImage()DOCUMENT ME!voidrunAlgorithm()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:
finalizein classAlgorithmBase
-
getTransformedImage
public ModelImage getTransformedImage()
DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
runAlgorithm
public void runAlgorithm()
starts the program.- Specified by:
runAlgorithmin classAlgorithmBase
-
-