Class AlgorithmExtractSlicesVolumes
java.lang.Object
java.lang.Thread
gov.nih.mipav.model.algorithms.AlgorithmBase
gov.nih.mipav.model.algorithms.utilities.AlgorithmExtractSlicesVolumes
- All Implemented Interfaces:
ActionListener,WindowListener,Runnable,EventListener
Title: AlgorithmExtractIndividualSlices
Description: Extracts individual slices from 3D or 4D images and opens each slice in its own Frame
- Version:
- 1.0
- Author:
- Justin Senseney
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.Builder, Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean[]List of slices to remove from source image.private Vector<ModelImage> DOCUMENT ME!(package private) FileInfoDicom[]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
ConstructorsConstructorDescriptionAlgorithmExtractSlicesVolumes(ModelImage srcImage, boolean[] removeSlices) Import source and destination images into the class. -
Method Summary
Modifier and TypeMethodDescriptionprivate voidCalculates the final output and stores it in the source image.voidfinalize()Prepares this class for destruction.protected intCalculates and returns the color factor based on the srcImage.Return the images extracted from the source image.private intgetOffset(ModelImage img, int colorFactor, int t) Calculate and return the offset for the given image and time slice.voidCalculates the final output.voidupdateFileInfo(ModelImage image, ModelImage resultImage, int slice) Copy important file information to resultant image structure.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
-
extract
private boolean[] extractList of slices to remove from source image. -
extractedImages
DOCUMENT ME! -
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. -
fileInfoDicom
FileInfoDicom[] fileInfoDicom
-
-
Constructor Details
-
AlgorithmExtractSlicesVolumes
Import source and destination images into the class.- Parameters:
srcImage- source image (image to extract from)removeSlices- list of booleans for slices that should be extracted
-
-
Method Details
-
finalize
public void finalize()Prepares this class for destruction.- Overrides:
finalizein classAlgorithmBase
-
getExtractedImages
Return the images extracted from the source image.- Returns:
- The extracted images.
-
runAlgorithm
public void runAlgorithm()Calculates the final output.- Specified by:
runAlgorithmin classAlgorithmBase
-
updateFileInfo
Copy important file information to resultant image structure.- Parameters:
image- Source image.resultImage- Resultant image.slice- DOCUMENT ME!
-
getColorFactor
protected int getColorFactor()Calculates and returns the color factor based on the srcImage.- Returns:
- DOCUMENT ME!
-
extractSlices
private void extractSlices()Calculates the final output and stores it in the source image. -
getOffset
Calculate and return the offset for the given image and time slice.- Parameters:
img- -- ModelImage whose offset is being computedcolorFactor- -- the image's colorFactort- -- current time slice- Returns:
- -- the computed offset into the data buffer
-