Package gov.nih.mipav.model.algorithms
Class AlgorithmCumulativeHistogram
java.lang.Object
java.lang.Thread
gov.nih.mipav.model.algorithms.AlgorithmBase
gov.nih.mipav.model.algorithms.AlgorithmCumulativeHistogram
- All Implemented Interfaces:
ActionListener,WindowListener,Runnable,EventListener
- Author:
- pandyan This algorithm calculates the cumulative histogram for an image Color images need to supply what channel they want the cumulative histogram for
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.Builder, Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int[]int array of histogram valuesprivate ModelHistogramReference to the histogram storage object.private ModelImageReference to the image.private intIndicates which channel of the RGB image the histogram should be calculated. 1=Red 2=Green 3=BlueFields 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
ConstructorsConstructorDescriptionAlgorithmCumulativeHistogram(ModelHistogram histogram, int RGBOffset, ModelImage image) Constructor for RGB image.AlgorithmCumulativeHistogram(ModelHistogram histogram, ModelImage image) Constructor for grey scale image -
Method Summary
Modifier and TypeMethodDescriptionint[]This method returns the histogram array valuesvoidActually runs the algorithm.Methods inherited from class gov.nih.mipav.model.algorithms.AlgorithmBase
actionPerformed, addListener, addProgressChangeListener, calculateImageSize, calculatePrincipleAxis, computeElapsedTime, computeElapsedTime, convertIntoFloat, delinkProgressToAlgorithm, delinkProgressToAlgorithmMulti, displayError, errorCleanUp, finalize, 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
-
image
Reference to the image. -
histogram
Reference to the histogram storage object. -
histoBuffer
private int[] histoBufferint array of histogram values -
RGBOffset
private int RGBOffsetIndicates which channel of the RGB image the histogram should be calculated. 1=Red 2=Green 3=Blue
-
-
Constructor Details
-
AlgorithmCumulativeHistogram
Constructor for grey scale image- Parameters:
histogram- model of a histogram for a RGB componentimage- model of the source imag
-
AlgorithmCumulativeHistogram
Constructor for RGB image.- Parameters:
histogram- model of a histogram for a RGB componentRGBOffset- correct offset for RED = 1 , GREEN = 2, or BLUE = 3 component to be exportedimage- model of the source image
-
-
Method Details
-
runAlgorithm
public void runAlgorithm()Description copied from class:AlgorithmBaseActually runs the algorithm. Implemented by inheriting algorithms.- Specified by:
runAlgorithmin classAlgorithmBase
-
getHistoBuffer
public int[] getHistoBuffer()This method returns the histogram array values- Returns:
- int[]
-