Class AlgorithmExtractSlices
- java.lang.Object
-
- java.lang.Thread
-
- gov.nih.mipav.model.algorithms.AlgorithmBase
-
- gov.nih.mipav.model.algorithms.utilities.AlgorithmExtractSlices
-
- All Implemented Interfaces:
java.awt.event.ActionListener
,java.awt.event.WindowListener
,java.lang.Runnable
,java.util.EventListener
public class AlgorithmExtractSlices extends AlgorithmBase
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:
AlgorithmRemoveSlices
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
convert4Dto3D
If true convert the selected images to 3D datasets.private java.util.Vector<java.lang.String>
extractList
List of slices to extract from source image.private int
oldZdim
Original Z dimension of the image.private int
sliceArea
Area of a slice (Xdim * Ydim).private int
Xdim
X dimension of the image.private int
Ydim
Y 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 AlgorithmExtractSlices(ModelImage srcImage, ModelImage destImage, java.lang.String[] extractSlices)
Import source and destination images into the class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
calcStoreInDest()
DOCUMENT ME!java.util.Vector<java.lang.String>
getExtractList()
Method to return the extract list since local copies may change while the algorithm runs.void
runAlgorithm()
Calculates the final output.void
setConvert4Dto3D(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, 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
-
convert4Dto3D
private boolean convert4Dto3D
If true convert the selected images to 3D datasets.
-
extractList
private java.util.Vector<java.lang.String> extractList
List of slices to extract from source image.
-
oldZdim
private int oldZdim
Original Z 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.
-
-
Constructor Detail
-
AlgorithmExtractSlices
public AlgorithmExtractSlices(ModelImage srcImage, ModelImage destImage, java.lang.String[] extractSlices)
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 Detail
-
getExtractList
public java.util.Vector<java.lang.String> 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:
runAlgorithm
in classAlgorithmBase
-
setConvert4Dto3D
public void setConvert4Dto3D(boolean doConvert)
DOCUMENT ME!- Parameters:
doConvert
- DOCUMENT ME!
-
calcStoreInDest
private void calcStoreInDest()
DOCUMENT ME!
-
-