Package gov.nih.mipav.model.algorithms
Class LightboxGenerator
java.lang.Object
java.lang.Thread
gov.nih.mipav.model.algorithms.AlgorithmBase
gov.nih.mipav.model.algorithms.LightboxGenerator
- All Implemented Interfaces:
ActionListener,WindowListener,Runnable,EventListener
The class creates a RGB image of a 3d image in a Lightbox type format.
- Version:
- 0.1 May 12, 2009
- Author:
- morseaj
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.Builder, Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final byteprivate final byteprivate final byteprivate final intprivate final booleanprivate final intprivate ModelImageprivate final intHeight of new image in pixelsprivate final intWidth of new image in pixelsprivate ModelImageprivate final intprivate final intprivate final intFields 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
ConstructorsConstructorDescriptionLightboxGenerator(ModelImage image, int startSlice, int endSlice, double percentSize, int rows, int columns, int borderR, int borderG, int borderB, boolean display, int borderThickness) Constructor for Lightbox Image Files that will be used to create a lightBox image. -
Method Summary
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
-
startSlice
private final int startSlice -
endSlice
private final int endSlice -
newHeight
private final int newHeightHeight of new image in pixels -
newWidth
private final int newWidthWidth of new image in pixels -
original
-
rows
private final int rows -
columns
private final int columns -
borderR
private final byte borderR -
borderG
private final byte borderG -
borderB
private final byte borderB -
display
private final boolean display -
thickness
private final int thickness -
finalImage
-
-
Constructor Details
-
LightboxGenerator
public LightboxGenerator(ModelImage image, int startSlice, int endSlice, double percentSize, int rows, int columns, int borderR, int borderG, int borderB, boolean display, int borderThickness) Constructor for Lightbox Image Files that will be used to create a lightBox image.- Parameters:
image- 3D image to be created in lightbox formatstartSlice- first slice to be usedendSlice- last slice to be usedpercentSize- shrink images by percentrows- number of rows in lightboxcolumns- number of columns in lightboxborderR- R value for borderborderG- G value for borderborderB- B value for borderdisplay- should lightbox image be shown in frame once created?borderThickness- border thickness in pixels
-
-
Method Details
-
finalize
public void finalize()Prepares this class for cleanup.- Overrides:
finalizein classAlgorithmBase
-
getImage
returns the newly created image -
runAlgorithm
public void runAlgorithm()Accessor that returns the number of image slices saved.- Specified by:
runAlgorithmin classAlgorithmBase
-