Package gov.nih.mipav.model.algorithms
Class AlgorithmVOIShapeInterpolation
java.lang.Object
java.lang.Thread
gov.nih.mipav.model.algorithms.AlgorithmBase
gov.nih.mipav.model.algorithms.AlgorithmVOIShapeInterpolation
- All Implemented Interfaces:
AlgorithmInterface,ActionListener,WindowListener,Runnable,EventListener
- Author:
- pandyan This algorithm calculates the VOI Shape Based Interpolation algorithm works the following way: Once 2 closed voi contour shapes are selected in non-contiguous slices, both slices are extracted out of the 3d dataset. Each one has its voi moved to the center of the image to obtain maximum overlap. Then distance maps are created and then interpolated depending on num slices in between...then they the shapes are moved to their proper position.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.Builder, Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ModelImage[]distance mapsprivate ModelImagedistance map 1private ModelImagedistance map 2private VOIContour[]final voi contour shapesprivate WildMagic.LibFoundation.Mathematics.Vector3fgeom center voi1private WildMagic.LibFoundation.Mathematics.Vector3fgeom center voi2private WildMagic.LibFoundation.Mathematics.Vector3fimage centerprivate ModelImage2d image containing voi1private ModelImage2d image containing voi2private ModelImage[]tween shape sprivate ModelImagemask image 1private ModelImagemask imag 2private intnum slice in between voi1 and voi2private intslice index for voi1private intslice index for voi2private ModelImagesrc imageprivate ModelImagetemp imageprivate ModelImagetemp imageprivate VOIContourvoi1private VOIContourvoi2private VOIhandle to src image's VOIFields inherited from class gov.nih.mipav.model.algorithms.AlgorithmBase
destFlag, destImage, image25D, mask, maxProgressValue, minProgressValue, multiThreadingEnabled, nthreads, progress, progressModulus, progressStep, runningInSeparateThread, separable, threadStoppedFields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY -
Constructor Summary
ConstructorsConstructorDescriptionconstructorAlgorithmVOIShapeInterpolation(ModelImage srcImage, int sliceIndex1, VOIContour VOI1, int sliceIndex2, VOIContour VOI2, VOI VOIHandle) constructor -
Method Summary
Modifier and TypeMethodDescriptionvoidalgorithmPerformed(AlgorithmBase algorithm) alg performedvoidfinalize()finalizefloatlinearInterpGetY(float x) get y based on equation of linear interpolationvoidrun algorithmMethods 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
-
srcImage
src image -
sliceIndex1
private int sliceIndex1slice index for voi1 -
sliceIndex2
private int sliceIndex2slice index for voi2 -
numSlicesInBetween
private int numSlicesInBetweennum slice in between voi1 and voi2 -
VOI1
voi1 -
VOI2
voi2 -
imageSlice1
2d image containing voi1 -
imageSlice2
2d image containing voi2 -
maskImage1
mask image 1 -
maskImage2
mask imag 2 -
distanceMap1
distance map 1 -
distanceMap2
distance map 2 -
tempA
temp image -
tempB
temp image -
averageDistanceMaps
distance maps -
inBetweenBooleanShapes
tween shape s -
finalContours
final voi contour shapes -
geomCenter1
private WildMagic.LibFoundation.Mathematics.Vector3f geomCenter1geom center voi1 -
geomCenter2
private WildMagic.LibFoundation.Mathematics.Vector3f geomCenter2geom center voi2 -
imageCenter
private WildMagic.LibFoundation.Mathematics.Vector3f imageCenterimage center -
VOIHandle
handle to src image's VOI
-
-
Constructor Details
-
AlgorithmVOIShapeInterpolation
public AlgorithmVOIShapeInterpolation()constructor -
AlgorithmVOIShapeInterpolation
public AlgorithmVOIShapeInterpolation(ModelImage srcImage, int sliceIndex1, VOIContour VOI1, int sliceIndex2, VOIContour VOI2, VOI VOIHandle) constructor- Parameters:
srcImage-sliceIndex1-VOI1-sliceIndex2-VOI2-
-
-
Method Details
-
runAlgorithm
public void runAlgorithm()run algorithm- Specified by:
runAlgorithmin classAlgorithmBase
-
algorithmPerformed
alg performed- Specified by:
algorithmPerformedin interfaceAlgorithmInterface- Parameters:
algorithm- the algorithm which has just completed
-
linearInterpGetY
public float linearInterpGetY(float x) get y based on equation of linear interpolation -
finalize
public void finalize()finalize- Overrides:
finalizein classAlgorithmBase
-