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
,java.awt.event.ActionListener
,java.awt.event.WindowListener
,java.lang.Runnable
,java.util.EventListener
public class AlgorithmVOIShapeInterpolation extends AlgorithmBase implements AlgorithmInterface
- 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.
-
-
Field Summary
Fields Modifier and Type Field Description private ModelImage[]
averageDistanceMaps
distance mapsprivate ModelImage
distanceMap1
distance map 1private ModelImage
distanceMap2
distance map 2private VOIContour[]
finalContours
final voi contour shapesprivate WildMagic.LibFoundation.Mathematics.Vector3f
geomCenter1
geom center voi1private WildMagic.LibFoundation.Mathematics.Vector3f
geomCenter2
geom center voi2private WildMagic.LibFoundation.Mathematics.Vector3f
imageCenter
image centerprivate ModelImage
imageSlice1
2d image containing voi1private ModelImage
imageSlice2
2d image containing voi2private ModelImage[]
inBetweenBooleanShapes
tween shape sprivate ModelImage
maskImage1
mask image 1private ModelImage
maskImage2
mask imag 2private int
numSlicesInBetween
num slice in between voi1 and voi2private int
sliceIndex1
slice index for voi1private int
sliceIndex2
slice index for voi2private ModelImage
srcImage
src imageprivate ModelImage
tempA
temp imageprivate ModelImage
tempB
temp imageprivate VOIContour
VOI1
voi1private VOIContour
VOI2
voi2private VOI
VOIHandle
handle to src image's VOI-
Fields inherited from class gov.nih.mipav.model.algorithms.AlgorithmBase
destFlag, destImage, image25D, mask, maxProgressValue, minProgressValue, multiThreadingEnabled, nthreads, progress, progressModulus, progressStep, runningInSeparateThread, separable, threadStopped
-
-
Constructor Summary
Constructors Constructor Description AlgorithmVOIShapeInterpolation()
constructorAlgorithmVOIShapeInterpolation(ModelImage srcImage, int sliceIndex1, VOIContour VOI1, int sliceIndex2, VOIContour VOI2, VOI VOIHandle)
constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
algorithmPerformed(AlgorithmBase algorithm)
alg performedvoid
finalize()
finalizefloat
linearInterpGetY(float x)
get y based on equation of linear interpolationvoid
runAlgorithm()
run algorithm-
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
-
srcImage
private ModelImage srcImage
src image
-
sliceIndex1
private int sliceIndex1
slice index for voi1
-
sliceIndex2
private int sliceIndex2
slice index for voi2
-
numSlicesInBetween
private int numSlicesInBetween
num slice in between voi1 and voi2
-
VOI1
private VOIContour VOI1
voi1
-
VOI2
private VOIContour VOI2
voi2
-
imageSlice1
private ModelImage imageSlice1
2d image containing voi1
-
imageSlice2
private ModelImage imageSlice2
2d image containing voi2
-
maskImage1
private ModelImage maskImage1
mask image 1
-
maskImage2
private ModelImage maskImage2
mask imag 2
-
distanceMap1
private ModelImage distanceMap1
distance map 1
-
distanceMap2
private ModelImage distanceMap2
distance map 2
-
tempA
private ModelImage tempA
temp image
-
tempB
private ModelImage tempB
temp image
-
averageDistanceMaps
private ModelImage[] averageDistanceMaps
distance maps
-
inBetweenBooleanShapes
private ModelImage[] inBetweenBooleanShapes
tween shape s
-
finalContours
private VOIContour[] finalContours
final voi contour shapes
-
geomCenter1
private WildMagic.LibFoundation.Mathematics.Vector3f geomCenter1
geom center voi1
-
geomCenter2
private WildMagic.LibFoundation.Mathematics.Vector3f geomCenter2
geom center voi2
-
imageCenter
private WildMagic.LibFoundation.Mathematics.Vector3f imageCenter
image center
-
VOIHandle
private VOI VOIHandle
handle to src image's VOI
-
-
Constructor Detail
-
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 Detail
-
runAlgorithm
public void runAlgorithm()
run algorithm- Specified by:
runAlgorithm
in classAlgorithmBase
-
algorithmPerformed
public void algorithmPerformed(AlgorithmBase algorithm)
alg performed- Specified by:
algorithmPerformed
in 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:
finalize
in classAlgorithmBase
-
-