Class AlgorithmRemoveTSlices
java.lang.Object
java.lang.Thread
gov.nih.mipav.model.algorithms.AlgorithmBase
gov.nih.mipav.model.algorithms.utilities.AlgorithmRemoveTSlices
- All Implemented Interfaces:
ActionListener,WindowListener,Runnable,EventListener
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.Builder, Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intOriginal T dimension of the image.private boolean[]List of slices to remove from source image.private intArea of a slice (Xdim * Ydim * Zdim).private intX dimension of the image.private intY dimension of the image.private intZ 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, threadStoppedFields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY -
Constructor Summary
ConstructorsConstructorDescriptionAlgorithmRemoveTSlices(ModelImage srcImage, ModelImage destImage, boolean[] removeSlices) import source and destination images into the class. -
Method Summary
Modifier and TypeMethodDescriptionvoidfinalize()Prepares this class for destruction.voidWhere 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, 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
-
oldTdim
private int oldTdimOriginal T dimension of the image. -
remove
private boolean[] removeList of slices to remove from source image. -
volume
private int volumeArea of a slice (Xdim * Ydim * Zdim). -
Xdim
private int XdimX dimension of the image. -
Ydim
private int YdimY dimension of the image. -
Zdim
private int ZdimZ dimension of the image.
-
-
Constructor Details
-
AlgorithmRemoveTSlices
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 Details
-
finalize
public void finalize()Prepares this class for destruction.- Overrides:
finalizein classAlgorithmBase
-
runAlgorithm
public void runAlgorithm()Where algorithm calculates the final output.- Specified by:
runAlgorithmin classAlgorithmBase
-