Class AlgorithmRGBConcat
java.lang.Object
java.lang.Thread
gov.nih.mipav.model.algorithms.AlgorithmBase
gov.nih.mipav.model.algorithms.utilities.AlgorithmRGBConcat
- All Implemented Interfaces:
ActionListener,WindowListener,Runnable,EventListener
Simple algorithm that generates an RGB image from three gray images.
- Version:
- 1.0 Dec 30, 1999
- Author:
- Matthew J. McAuliffe, Ph.D.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.Builder, Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
FieldsModifier and TypeFieldDescriptionbooleanIf true, map all colors based on image min and max.private ModelStorageBase.DataTypeARGB, ARGB_USHORT, ARGB_UINTEGER, or ARGB_FLOATprivate ModelImageDestination image where results are to be stored.private booleanflag for performing bounds checking...normally should be set to true unless negative numbers are desiredprivate booleanFlag indicating whether of not to remap the data.private floatprivate ModelImageSource gray scale image to be stored in the BLUE channel.private ModelImageSource gray scale image to be stored in the GREEN channel.private ModelImageSource 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, threadStoppedFields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY -
Constructor Summary
ConstructorsConstructorDescriptionAlgorithmRGBConcat(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
Modifier and TypeMethodDescriptionprivate voidConcatenate the image and store the results in the destination image.private voidConcatenate the image Must run getImageR after running this routine.voidfinalize()Prepares this class for destruction.Accessor to get imageR.voidStarts 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, 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
-
destImage
Destination image where results are to be stored. Must be of type RGB. -
reMap
private boolean reMapFlag indicating whether of not to remap the data. If true and srcImage data max is invalid input: '<' remapHighestValue data will be remapped [0-remapHighestValue] else if image max > remapHighestValue data will automatically be remapped [0-remapHighestValue]. -
commonMapping
public boolean commonMappingIf 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
Source gray scale image to be stored in the BLUE channel. -
srcImageG
Source gray scale image to be stored in the GREEN channel. -
srcImageR
Source gray scale image to be stored in the RED channel. -
performBoundsChecking
private boolean performBoundsCheckingflag for performing bounds checking...normally should be set to true unless negative numbers are desired -
dataType
ARGB, ARGB_USHORT, ARGB_UINTEGER, or ARGB_FLOAT
-
-
Constructor Details
-
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 invalid input: '<' 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 invalid input: '<' 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 invalid input: '<' 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 invalid input: '<' 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 Details
-
finalize
public void finalize()Prepares this class for destruction.- Overrides:
finalizein classAlgorithmBase
-
getImageR
Accessor to get imageR.- Returns:
- DOCUMENT ME!
-
runAlgorithm
public void runAlgorithm()Starts the program.- Specified by:
runAlgorithmin 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.
-