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:
java.awt.event.ActionListener,java.awt.event.WindowListener,java.lang.Runnable,java.util.EventListener
public class LightboxGenerator extends AlgorithmBase
The class creates a RGB image of a 3d image in a Lightbox type format.- Version:
- 0.1 May 12, 2009
- Author:
- morseaj
-
-
Field Summary
Fields Modifier and Type Field Description private byteborderBprivate byteborderGprivate byteborderRprivate intcolumnsprivate booleandisplayprivate intendSliceprivate ModelImagefinalImageprivate intnewHeightHeight of new image in pixelsprivate intnewWidthWidth of new image in pixelsprivate ModelImageoriginalprivate introwsprivate intstartSliceprivate intthickness-
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 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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfinalize()Prepares this class for cleanup.ModelImagegetImage()returns the newly created imagevoidrunAlgorithm()Accessor that returns the number of image slices saved.-
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, 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
-
startSlice
private final int startSlice
-
endSlice
private final int endSlice
-
newHeight
private final int newHeight
Height of new image in pixels
-
newWidth
private final int newWidth
Width of new image in pixels
-
original
private ModelImage 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
private ModelImage finalImage
-
-
Constructor Detail
-
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 Detail
-
finalize
public void finalize()
Prepares this class for cleanup.- Overrides:
finalizein classAlgorithmBase
-
getImage
public ModelImage getImage()
returns the newly created image
-
runAlgorithm
public void runAlgorithm()
Accessor that returns the number of image slices saved.- Specified by:
runAlgorithmin classAlgorithmBase
-
-