Class AlgorithmHurstIndex
- java.lang.Object
-
- java.lang.Thread
-
- gov.nih.mipav.model.algorithms.AlgorithmBase
-
- gov.nih.mipav.model.algorithms.filters.AlgorithmHurstIndex
-
- All Implemented Interfaces:
java.awt.event.ActionListener
,java.awt.event.WindowListener
,java.lang.Runnable
,java.util.EventListener
public class AlgorithmHurstIndex extends AlgorithmBase
DOCUMENT ME!- Version:
- 0.1 June 25, 2012
- Author:
- William Gandler In 2D for image points find the absolute value of the intensity differences to all points between a minimum distance of minDist and a maximum distance of maxDist. Do this either for all points in the image or only between points in a given contour or polyline curve. If done for all points in an image, the Hurst image will be produced as a double value in a result image having the same dimensions as the source image. If done only for VOIs, there will be no result image. If done only for VOIs, there will just be a Hurst value outputted on the data panel for each contour or polyline curve. Have the option to define the distance as the rounded Euclidean distance. For every distance between minDist and maxDist find the average value of the absolute value of the intensity difference. Find the best fit to the line log(average absolute value of the intensity difference) = log(c) + H*log(distance) where H is the Hurst index. For VOIs and slices the Hurst index varies from 0 to 1. If H is 0.5, each step can be up or down completely at random. If H is less than 0.5, each step upward is likely to be followed by a downward step and each downward step is likely to be followed by an upward step. Therefore, a lower Hurst index indicates a higher complexity of the distribution of pixel values. Dimensionality = 3 - Hurst coefficient. The fractal dimension has lower values on the boundary of different texture regions, and tends to be constant over uniform texture regions. References: 1.) "Sonographic Texture Characterization of Salivary Gland Tumors by Fractal Analysis", by Toru Chikui, Kenji Tokumori, Kazunori Yoshiura, Kazunari Oobu, Seiji Nakamura, and Katsumasa Nakamura, Ultrasound in Medicine and Biology, Vol. 31, No. 10, pp. 1297-1304, 2005. 2.) "Fractal Analysis of Medical Images in the Irregular Regions of Interest", by Edward Oczeretko, Marta Borowska, Agnieszka Kitlas, Andrzej Borusiewicz, and Malgorzata Sobolewska-Siemieniuk. 3.) "Fractal Feature Analysis and Classification in Medical Imaging", by Chi-Chang Chen, John S. Daponte, and Martin D. Fox, IEEE Transactions on Medical Imaging, Vol. 8, No. 2, June, 1989, pp. 133-142.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) class
AlgorithmHurstIndex.DistanceIntensity
(package private) class
AlgorithmHurstIndex.DistanceIntensityComparator
-
Field Summary
Fields Modifier and Type Field Description private int
grouping
private boolean
integerDistanceRound
private double
maxDist
private double
minDist
private static int
PIXEL_GROUPING
private static int
RED_OFFSET
Red channel.private int
RGBOffset
private static int
VOI_GROUPING
-
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 AlgorithmHurstIndex(ModelImage srcImg, double minDist, double maxDist, boolean integerDistanceRound, int grouping)
Creates a new AlgorithmHurstIndex object for black and white image.AlgorithmHurstIndex(ModelImage srcImg, int RGBOffset, double minDist, double maxDist, boolean integerDistanceRound, int grouping)
Creates a new AlgorithmHurstIndex object for color image.AlgorithmHurstIndex(ModelImage destImg, ModelImage srcImg, double minDist, double maxDist, boolean integerDistanceRound)
Creates a new AlgorithmHurstIndex object for black and white image.AlgorithmHurstIndex(ModelImage destImg, ModelImage srcImg, int RGBOffset, double minDist, double maxDist, boolean integerDistanceRound)
Creates a new AlgorithmHurstIndex object for color image.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
calculatePixelHurstIndex()
DOCUMENT ME!private void
calculateSliceHurstIndex()
private void
calculateVOIHurstIndex()
void
finalize()
Prepares this class for destruction.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
-
RED_OFFSET
private static final int RED_OFFSET
Red channel.- See Also:
- Constant Field Values
-
PIXEL_GROUPING
private static final int PIXEL_GROUPING
- See Also:
- Constant Field Values
-
VOI_GROUPING
private static final int VOI_GROUPING
- See Also:
- Constant Field Values
-
minDist
private double minDist
-
maxDist
private double maxDist
-
integerDistanceRound
private boolean integerDistanceRound
-
RGBOffset
private int RGBOffset
-
grouping
private int grouping
-
-
Constructor Detail
-
AlgorithmHurstIndex
public AlgorithmHurstIndex(ModelImage destImg, ModelImage srcImg, double minDist, double maxDist, boolean integerDistanceRound)
Creates a new AlgorithmHurstIndex object for black and white image.- Parameters:
destImg
- destination image modelsrcImg
- source image modelminDist
- minimum distance between pixelsmaxDist
- maximum distance between pixelsintegerDistanceRound
- If true, take the rounding of the Euclidean distance as the distance. if false, take the Euclidean distance as the distance.
-
AlgorithmHurstIndex
public AlgorithmHurstIndex(ModelImage destImg, ModelImage srcImg, int RGBOffset, double minDist, double maxDist, boolean integerDistanceRound)
Creates a new AlgorithmHurstIndex object for color image.- Parameters:
destImg
- destination image modelsrcImg
- source image modelRGBOffset
- selects red, green, or blue channelminDist
- minimum distance between pixelsmaxDist
- maximum distance between pixelsintegerDistancePart
- If true, take the integer part of the Euclidean distance as the distance. if false, take the Euclidean distance as the distance.
-
AlgorithmHurstIndex
public AlgorithmHurstIndex(ModelImage srcImg, double minDist, double maxDist, boolean integerDistanceRound, int grouping)
Creates a new AlgorithmHurstIndex object for black and white image.- Parameters:
srcImg
- source image modelminDist
- minimum distance between pixelsmaxDist
- maximum distance between pixelsintegerDistanceRound
- If true, take the rounding of the Euclidean distance as the distance. if false, take the Euclidean distance as the distance.grouping
- VOI_GROUPING or SLICE_GROUPING
-
AlgorithmHurstIndex
public AlgorithmHurstIndex(ModelImage srcImg, int RGBOffset, double minDist, double maxDist, boolean integerDistanceRound, int grouping)
Creates a new AlgorithmHurstIndex object for color image.- Parameters:
srcImg
- source image modelRGBOffset
- selects red, green, or blue channelminDist
- minimum distance between pixelsmaxDist
- maximum distance between pixelsintegerDistancePart
- If true, take the integer part of the Euclidean distance as the distance. if false, take the Euclidean distance as the distance.grouping
- VOI_GROUPING or SLICE_GROUPING
-
-
Method Detail
-
finalize
public void finalize()
Prepares this class for destruction.- Overrides:
finalize
in classAlgorithmBase
-
runAlgorithm
public void runAlgorithm()
Starts the program.- Specified by:
runAlgorithm
in classAlgorithmBase
-
calculatePixelHurstIndex
private void calculatePixelHurstIndex()
DOCUMENT ME!
-
calculateVOIHurstIndex
private void calculateVOIHurstIndex()
-
calculateSliceHurstIndex
private void calculateSliceHurstIndex()
-
-