Class AlgorithmRemoveTSlices
- java.lang.Object
-
- java.lang.Thread
-
- gov.nih.mipav.model.algorithms.AlgorithmBase
-
- gov.nih.mipav.model.algorithms.utilities.AlgorithmRemoveTSlices
-
- All Implemented Interfaces:
java.awt.event.ActionListener
,java.awt.event.WindowListener
,java.lang.Runnable
,java.util.EventListener
public class AlgorithmRemoveTSlices extends AlgorithmBase
Algorithm to run the remove T slices. Algorithm verifies the t-th slice should be in included in the destination image, as defined in the list, remove. It copies the slice from the src img to a buffer, and then from the buffer into the destination img. Copies the src file info to a buffer and makes it conform to the new img, then copies it into the dest file.
-
-
Field Summary
Fields Modifier and Type Field Description private int
oldTdim
Original T dimension of the image.private boolean[]
remove
List of slices to remove from source image.private int
volume
Area of a slice (Xdim * Ydim * Zdim).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 AlgorithmRemoveTSlices(ModelImage srcImage, ModelImage destImage, boolean[] removeSlices)
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()
Where algorithm calculates the final output.-
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
-
oldTdim
private int oldTdim
Original T dimension of the image.
-
remove
private boolean[] remove
List of slices to remove from source image.
-
volume
private int volume
Area of a slice (Xdim * Ydim * Zdim).
-
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.
-
-
Constructor Detail
-
AlgorithmRemoveTSlices
public AlgorithmRemoveTSlices(ModelImage srcImage, ModelImage destImage, boolean[] removeSlices)
import source and destination images into the class.- Parameters:
srcImage
- source image (image to clip from)destImage
- destination image (image to paste to)removeSlices
- list of boolean indicating which slices in source should *not* be in the destination
-
-
Method Detail
-
finalize
public void finalize()
Prepares this class for destruction.- Overrides:
finalize
in classAlgorithmBase
-
runAlgorithm
public void runAlgorithm()
Where algorithm calculates the final output.- Specified by:
runAlgorithm
in classAlgorithmBase
-
-