Class AlgorithmRGBConcat
- java.lang.Object
-
- java.lang.Thread
-
- gov.nih.mipav.model.algorithms.AlgorithmBase
-
- gov.nih.mipav.model.algorithms.utilities.AlgorithmRGBConcat
-
- All Implemented Interfaces:
java.awt.event.ActionListener
,java.awt.event.WindowListener
,java.lang.Runnable
,java.util.EventListener
public class AlgorithmRGBConcat extends AlgorithmBase
Simple algorithm that generates an RGB image from three gray images.- Version:
- 1.0 Dec 30, 1999
- Author:
- Matthew J. McAuliffe, Ph.D.
-
-
Field Summary
Fields Modifier and Type Field Description boolean
commonMapping
If true, map all colors based on image min and max.private ModelStorageBase.DataType
dataType
ARGB, ARGB_USHORT, ARGB_UINTEGER, or ARGB_FLOATprivate ModelImage
destImage
Destination image where results are to be stored.private boolean
performBoundsChecking
flag for performing bounds checking...normally should be set to true unless negative numbers are desiredprivate boolean
reMap
Flag indicating whether of not to remap the data.private float
remapHighestValue
private ModelImage
srcImageB
Source gray scale image to be stored in the BLUE channel.private ModelImage
srcImageG
Source gray scale image to be stored in the GREEN channel.private ModelImage
srcImageR
Source gray scale image to be stored in the RED channel.-
Fields inherited from class gov.nih.mipav.model.algorithms.AlgorithmBase
destFlag, image25D, mask, maxProgressValue, minProgressValue, multiThreadingEnabled, nthreads, progress, progressModulus, progressStep, runningInSeparateThread, separable, srcImage, threadStopped
-
-
Constructor Summary
Constructors Constructor Description AlgorithmRGBConcat(ModelImage srcImgR, ModelImage srcImgG, ModelImage srcImgB, int dataType, boolean remap, boolean commonMapping, float remapHighestValue, boolean performBoundsChecking)
Creates a new AlgorithmRGBConcat object.AlgorithmRGBConcat(ModelImage srcImgR, ModelImage srcImgG, ModelImage srcImgB, int dataType, boolean remap, boolean commonMapping, float remapHighestValue, boolean performBoundsChecking, boolean copyAllInfo)
Creates a new AlgorithmRGBConcat object.AlgorithmRGBConcat(ModelImage srcImgR, ModelImage srcImgG, ModelImage srcImgB, ModelImage destImg, boolean remap, boolean commonMapping, float remapHighestValue, boolean performBoundsChecking)
Creates a new AlgorithmRGBConcat object.AlgorithmRGBConcat(ModelImage srcImgR, ModelImage srcImgG, ModelImage srcImgB, ModelImage destImg, boolean remap, boolean commonMapping, float remapHighestValue, boolean performBoundsChecking, boolean copyAllInfo)
Creates a new AlgorithmRGBConcat object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
calcStoreInDest()
Concatenate the image and store the results in the destination image.private void
calcStoreInPlace()
Concatenate the image Must run getImageR after running this routine.void
finalize()
Prepares this class for destruction.ModelImage
getImageR()
Accessor to get imageR.void
runAlgorithm()
Starts the program.-
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
-
destImage
private ModelImage destImage
Destination image where results are to be stored. Must be of type RGB.
-
reMap
private boolean reMap
Flag indicating whether of not to remap the data. If true and srcImage data max is < remapHighestValue data will be remapped [0-remapHighestValue] else if image max > remapHighestValue data will automatically be remapped [0-remapHighestValue].
-
commonMapping
public boolean commonMapping
If true, map all colors based on image min and max. If false, map each color separately based on its own min and max.
-
remapHighestValue
private float remapHighestValue
-
srcImageB
private ModelImage srcImageB
Source gray scale image to be stored in the BLUE channel.
-
srcImageG
private ModelImage srcImageG
Source gray scale image to be stored in the GREEN channel.
-
srcImageR
private ModelImage srcImageR
Source gray scale image to be stored in the RED channel.
-
performBoundsChecking
private boolean performBoundsChecking
flag for performing bounds checking...normally should be set to true unless negative numbers are desired
-
dataType
private ModelStorageBase.DataType dataType
ARGB, ARGB_USHORT, ARGB_UINTEGER, or ARGB_FLOAT
-
-
Constructor Detail
-
AlgorithmRGBConcat
public AlgorithmRGBConcat(ModelImage srcImgR, ModelImage srcImgG, ModelImage srcImgB, int dataType, boolean remap, boolean commonMapping, float remapHighestValue, boolean performBoundsChecking, boolean copyAllInfo)
Creates a new AlgorithmRGBConcat object.- Parameters:
srcImgR
- image model where result image of the Red channel is to be storedsrcImgG
- image model where result image of the Green channel is to be storedsrcImgB
- image model where result image of the Blue channel is to be storeddataType
- Tells if srcImage will become ARGB, ARGB_USHORT, ARGB_UINTEGER, or ARGB_FLOATremap
- if true and srcImage data max is < remapHighestValue data will be remapped [0-remapHighestValue] else if image max > remapHighestValue data will automatically be remapped [0-remapHighestValue].commonMapping
-remapHighestValue
- The highest value that will occur if remapping occursperformBoundsChecking
- flag for performing bounds checking...normally should be set to true unless negative numbers are desired
-
AlgorithmRGBConcat
public AlgorithmRGBConcat(ModelImage srcImgR, ModelImage srcImgG, ModelImage srcImgB, ModelImage destImg, boolean remap, boolean commonMapping, float remapHighestValue, boolean performBoundsChecking, boolean copyAllInfo)
Creates a new AlgorithmRGBConcat object.- Parameters:
srcImgR
- image model where result image of the Red channel is to be storedsrcImgG
- image model where result image of the Green channel is to be storedsrcImgB
- image model where result image of the Blue channel is to be storeddestImg
- destination image image modelremap
- if true and srcImage data max is < remapHighestValue data will be remapped [0-remapHighestValue] else if image max > remapHighestValue data will automatically be remapped [0-remapHighestValue].commonMapping
-remapHighestValue
- The highest value that will occur if remapping occurs * @param performBoundsChecking flag for performing bounds checking...normally should be set to true unless negative numbers are desiredcopyAllInfo
-
-
AlgorithmRGBConcat
public AlgorithmRGBConcat(ModelImage srcImgR, ModelImage srcImgG, ModelImage srcImgB, ModelImage destImg, boolean remap, boolean commonMapping, float remapHighestValue, boolean performBoundsChecking)
Creates a new AlgorithmRGBConcat object.- Parameters:
srcImgR
- image model where result image of the Red channel is to be storedsrcImgG
- image model where result image of the Green channel is to be storedsrcImgB
- image model where result image of the Blue channel is to be storeddestImg
- destination image image modelremap
- if true and srcImage data max is < remapHighestValue data will be remapped [0-remapHighestValue] else if image max > remapHighestValue data will automatically be remapped [0-remapHighestValue].commonMapping
-remapHighestValue
- The highest value that will occur if remapping occurs * @param performBoundsChecking flag for performing bounds checking...normally should be set to true unless negative numbers are desired
-
AlgorithmRGBConcat
public AlgorithmRGBConcat(ModelImage srcImgR, ModelImage srcImgG, ModelImage srcImgB, int dataType, boolean remap, boolean commonMapping, float remapHighestValue, boolean performBoundsChecking)
Creates a new AlgorithmRGBConcat object.- Parameters:
srcImgR
- image model where result image of the Red channel is to be storedsrcImgG
- image model where result image of the Green channel is to be storedsrcImgB
- image model where result image of the Blue channel is to be storeddataType
- Tells if srcImage will become ARGB, ARGB_USHORT, ARGB_UINTEGER, or ARGB_FLOATremap
- if true and srcImage data max is < remapHighestValue data will be remapped [0-remapHighestValue] else if image max > remapHighestValue data will automatically be remapped [0-remapHighestValue].commonMapping
-remapHighestValue
- The highest value that will occur if remapping occursperformBoundsChecking
- flag for performing bounds checking...normally should be set to true unless negative numbers are desired
-
-
Method Detail
-
finalize
public void finalize()
Prepares this class for destruction.- Overrides:
finalize
in classAlgorithmBase
-
getImageR
public ModelImage getImageR()
Accessor to get imageR.- Returns:
- DOCUMENT ME!
-
runAlgorithm
public void runAlgorithm()
Starts the program.- Specified by:
runAlgorithm
in classAlgorithmBase
-
calcStoreInDest
private void calcStoreInDest()
Concatenate the image and store the results in the destination image.
-
calcStoreInPlace
private void calcStoreInPlace()
Concatenate the image Must run getImageR after running this routine.
-
-