Class AlgorithmInsertVolume
- java.lang.Object
-
- java.lang.Thread
-
- gov.nih.mipav.model.algorithms.AlgorithmBase
-
- gov.nih.mipav.model.algorithms.utilities.AlgorithmInsertVolume
-
- All Implemented Interfaces:
java.awt.event.ActionListener
,java.awt.event.WindowListener
,java.lang.Runnable
,java.util.EventListener
public class AlgorithmInsertVolume extends AlgorithmBase
-
-
Field Summary
Fields Modifier and Type Field Description static int
ADJACENT_BACK
Copy adjacent slice.static int
ADJACENT_NEXT
Copy adjacent slice.static int
AVERAGE
Average slice type - the inserted slice is set equal to the mean of the 2 surrounding slices.static int
BLANK
Blank slice type - the inserted slice is blank.private float[]
imageBuffer2
static int
INSERTED_IMAGE
Original slice type - a 2D image is inserted.private ModelImage
insertedImage
Image inserted for slice type == ORIGINAL.private int
insertSlice
Number of slice before which another slice is inserted.private int
insertVolumePos
private int
sliceArea
Area of a slice (Xdim * Ydim).private int
Tdim
Original T dimension of the image.private int
volumeType
static int
WEIGHTED_AVERAGE
Weighted average slice type.private float
weightPrevious
For weighted averaging.private int
Xdim
X dimension of the image.private int
Ydim
Y dimension of the image.private int
Zdim
Z dimension of the image.-
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 AlgorithmInsertVolume(ModelImage srcImage, ModelImage destImage, int volumeType, int insertVolumePos, ModelImage insertedImage)
Import source and destination images into the class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
finalize()
Prepares this class for destruction.void
runAlgorithm()
Runs 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
-
WEIGHTED_AVERAGE
public static final int WEIGHTED_AVERAGE
Weighted average slice type.- See Also:
- Constant Field Values
-
AVERAGE
public static final int AVERAGE
Average slice type - the inserted slice is set equal to the mean of the 2 surrounding slices.- See Also:
- Constant Field Values
-
BLANK
public static final int BLANK
Blank slice type - the inserted slice is blank.- See Also:
- Constant Field Values
-
INSERTED_IMAGE
public static final int INSERTED_IMAGE
Original slice type - a 2D image is inserted.- See Also:
- Constant Field Values
-
ADJACENT_BACK
public static final int ADJACENT_BACK
Copy adjacent slice.- See Also:
- Constant Field Values
-
ADJACENT_NEXT
public static final int ADJACENT_NEXT
Copy adjacent slice.- See Also:
- Constant Field Values
-
insertedImage
private ModelImage insertedImage
Image inserted for slice type == ORIGINAL.
-
insertSlice
private int insertSlice
Number of slice before which another slice is inserted.
-
Tdim
private int Tdim
Original T dimension of the image.
-
sliceArea
private int sliceArea
Area of a slice (Xdim * Ydim).
-
Xdim
private int Xdim
X dimension of the image.
-
Ydim
private int Ydim
Y dimension of the image.
-
Zdim
private int Zdim
Z dimension of the image.
-
volumeType
private int volumeType
-
insertVolumePos
private int insertVolumePos
-
weightPrevious
private float weightPrevious
For weighted averaging.
-
imageBuffer2
private float[] imageBuffer2
-
-
Constructor Detail
-
AlgorithmInsertVolume
public AlgorithmInsertVolume(ModelImage srcImage, ModelImage destImage, int volumeType, int insertVolumePos, ModelImage insertedImage)
Import source and destination images into the class.- Parameters:
srcImage
- source image (image to clip from)destImage
- destination image (image to paste to)volumeType
- WEIGHTED_AVERAGE or AVERAGE or BLANK or ADJACENT_BACK or ADJACENT_NEXTinsertVolumePos
- position of volume to be insertedinsertedImage
- (image designated by user to be inserted)
-
-
Method Detail
-
finalize
public void finalize()
Prepares this class for destruction.- Overrides:
finalize
in classAlgorithmBase
-
runAlgorithm
public void runAlgorithm()
Runs algorithm.- Specified by:
runAlgorithm
in classAlgorithmBase
-
-