Class AlgorithmExtractSlices
java.lang.Object
java.lang.Thread
gov.nih.mipav.model.algorithms.AlgorithmBase
gov.nih.mipav.model.algorithms.utilities.AlgorithmExtractSlices
- All Implemented Interfaces:
ActionListener,WindowListener,Runnable,EventListener
Algorithm that extracts the slices indicated in the list from the srcImage and puts them into the destImage.
Note that an image is a set of slices; each slice is XxY, with Z slices.
- Version:
- v0.11 1 Nov 1999 (processes most images)
- Author:
- Lynne Pusanik based on AlgorithmRemoveSlices, David Parsons (parsonsd@cbel.cit.nih.gov) (with vast help from M.McAuliffe)
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.Builder, Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanIf true convert the selected images to 3D datasets.List of slices to extract from source image.private intOriginal Z dimension of the image.private intArea of a slice (Xdim * Ydim).private intX dimension of the image.private intY 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
ConstructorsConstructorDescriptionAlgorithmExtractSlices(ModelImage srcImage, ModelImage destImage, String[] extractSlices) Import source and destination images into the class. -
Method Summary
Modifier and TypeMethodDescriptionprivate voidDOCUMENT ME!Method to return the extract list since local copies may change while the algorithm runs.voidCalculates the final output.voidsetConvert4Dto3D(boolean doConvert) DOCUMENT ME!Methods inherited from class gov.nih.mipav.model.algorithms.AlgorithmBase
actionPerformed, addListener, addProgressChangeListener, calculateImageSize, calculatePrincipleAxis, computeElapsedTime, computeElapsedTime, convertIntoFloat, delinkProgressToAlgorithm, delinkProgressToAlgorithmMulti, displayError, errorCleanUp, finalize, 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
-
convert4Dto3D
private boolean convert4Dto3DIf true convert the selected images to 3D datasets. -
extractList
List of slices to extract from source image. -
oldZdim
private int oldZdimOriginal Z dimension of the image. -
sliceArea
private int sliceAreaArea of a slice (Xdim * Ydim). -
Xdim
private int XdimX dimension of the image. -
Ydim
private int YdimY dimension of the image.
-
-
Constructor Details
-
AlgorithmExtractSlices
Import source and destination images into the class.- Parameters:
srcImage- source image (image to clip from)destImage- destination image (image to paste to)extractSlices- list of slice numbers indicating which slices in source should be extracted to destination.
-
-
Method Details
-
getExtractList
Method to return the extract list since local copies may change while the algorithm runs.- Returns:
- DOCUMENT ME!
-
runAlgorithm
public void runAlgorithm()Calculates the final output.- Specified by:
runAlgorithmin classAlgorithmBase
-
setConvert4Dto3D
public void setConvert4Dto3D(boolean doConvert) DOCUMENT ME!- Parameters:
doConvert- DOCUMENT ME!
-
calcStoreInDest
private void calcStoreInDest()DOCUMENT ME!
-