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:
ActionListener,WindowListener,Runnable,EventListener
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.Builder, Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate float[][]DOCUMENT ME!private float[][][]DOCUMENT ME!private int[]DOCUMENT ME!private booleanDOCUMENT ME!private intDOCUMENT ME!private intDOCUMENT ME!private BSplineLattice2DfDOCUMENT ME!private BSplineLattice3DfDOCUMENT ME!private WildMagic.LibFoundation.Curves.BSplineBasisDiscretef2D and 3D B-Spline basis definitions.private WildMagic.LibFoundation.Curves.BSplineBasisDiscretefDOCUMENT ME!private WildMagic.LibFoundation.Curves.BSplineBasisDiscretefDOCUMENT ME!private ModelImageDOCUMENT ME!private ModelImageDOCUMENT ME!private ModelSimpleImageDOCUMENT ME!private float[]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, threadStoppedFields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY -
Constructor Summary
ConstructorsConstructorDescriptionAlgorithmTransformBSpline(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
Modifier and TypeMethodDescriptionvoidPrepares this class for destruction.voidfinalize()DOCUMENT ME!DOCUMENT ME!voidstarts 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, windowOpenedMethods 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, isVirtual, join, join, join, join, ofPlatform, ofVirtual, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, sleep, start, startVirtualThread, stop, suspend, threadId, toString, yield
-
Field Details
-
controlMat
private float[][] controlMatDOCUMENT ME! -
controlMat25D
private float[][][] controlMat25DDOCUMENT ME! -
destExtents
private int[] destExtentsDOCUMENT ME! -
have25D
private boolean have25DDOCUMENT ME! -
m_iBSplineDegree
private int m_iBSplineDegreeDOCUMENT ME! -
m_iBSplineNumControlPoints
private int m_iBSplineNumControlPointsDOCUMENT ME! -
m_kBSpline2D
DOCUMENT ME! -
m_kBSpline3D
DOCUMENT ME! -
m_kBSplineBasisX
private WildMagic.LibFoundation.Curves.BSplineBasisDiscretef m_kBSplineBasisX2D and 3D B-Spline basis definitions. -
m_kBSplineBasisY
private WildMagic.LibFoundation.Curves.BSplineBasisDiscretef m_kBSplineBasisYDOCUMENT ME! -
m_kBSplineBasisZ
private WildMagic.LibFoundation.Curves.BSplineBasisDiscretef m_kBSplineBasisZDOCUMENT ME! -
m_kImageResult
DOCUMENT ME! -
m_kImageSource
DOCUMENT ME! -
m_kSimpleImageSource
DOCUMENT ME! -
outResolutions
private float[] outResolutionsDOCUMENT 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 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 Details
-
disposeLocal
public void disposeLocal()Prepares this class for destruction. -
finalize
public void finalize()DOCUMENT ME!- Overrides:
finalizein classAlgorithmBase
-
getTransformedImage
DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
runAlgorithm
public void runAlgorithm()starts the program.- Specified by:
runAlgorithmin classAlgorithmBase
-