Class AlgorithmFlip
java.lang.Object
java.lang.Thread
gov.nih.mipav.model.algorithms.AlgorithmBase
gov.nih.mipav.model.algorithms.utilities.AlgorithmFlip
- All Implemented Interfaces:
ActionListener,WindowListener,Runnable,EventListener
Flips 2D, 3D or 4D grays scale or color dataset about X, Y, or Z axis (when applicable) when AlgorithmFlip.IMAGE is
passed to the constructor. An option is given to flip all VOIs at this time. When AlgorithmFlip.VOI is passed, only
the selected VOI is flipped about the specified axis.
- Version:
- 1.0 July 14, 2000
- Author:
- Matthew J. McAuliffe, Ph.D.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class java.lang.Thread
Thread.Builder, Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanWhether orientation and origin should change with flipping.private intAxis to flip along.private intType of object to flip.static final intDenotes image should be flipped without VOI.static final intImage and all VOIs should be flipped.static final intDenotes selected VOI should be flipped.static final intFlip along X axis.static final intFlip along Y axis.static final intFlip along Z axis.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
ConstructorsConstructorDescriptionAlgorithmFlip(ModelImage srcImg, int flipMode, int flipObject, boolean changeOrientationOrigin) Flips 2D, 3D or 4D grays scale or color dataset about X or Y axis. -
Method Summary
Modifier and TypeMethodDescriptionprivate voidcalcInPlace(int nImages) Generates the flipped image and replaces the source image with the flippeded image.voidfinalize()Prepares this class for destruction.voidRuns the flip algorithm.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
-
Y_AXIS
public static final int Y_AXISFlip along Y axis.- See Also:
-
X_AXIS
public static final int X_AXISFlip along X axis.- See Also:
-
Z_AXIS
public static final int Z_AXISFlip along Z axis.- See Also:
-
IMAGE_AND_VOI
public static final int IMAGE_AND_VOIImage and all VOIs should be flipped.- See Also:
-
IMAGE
public static final int IMAGEDenotes image should be flipped without VOI.- See Also:
-
VOI_TYPE
public static final int VOI_TYPEDenotes selected VOI should be flipped.- See Also:
-
flipAxis
private int flipAxisAxis to flip along. -
flipObject
private int flipObjectType of object to flip. -
changeOrientationOrigin
private boolean changeOrientationOriginWhether orientation and origin should change with flipping.
-
-
Constructor Details
-
AlgorithmFlip
public AlgorithmFlip(ModelImage srcImg, int flipMode, int flipObject, boolean changeOrientationOrigin) Flips 2D, 3D or 4D grays scale or color dataset about X or Y axis.- Parameters:
srcImg- source image modelflipMode- flip about which axisflipObject- DOCUMENT ME!changeOrientationOrigin-
-
-
Method Details
-
finalize
public void finalize()Prepares this class for destruction.- Overrides:
finalizein classAlgorithmBase
-
runAlgorithm
public void runAlgorithm()Runs the flip algorithm.- Specified by:
runAlgorithmin classAlgorithmBase
-
calcInPlace
private void calcInPlace(int nImages) Generates the flipped image and replaces the source image with the flippeded image.- Parameters:
nImages- Number of images to be flipped. If 2D image then nImage = 1, if 3D or 4D image where each image is to processed independently then nImages equals the number of images in the volume.
-