Class AlgorithmTamuraTexture
- java.lang.Object
-
- java.lang.Thread
-
- gov.nih.mipav.model.algorithms.AlgorithmBase
-
- gov.nih.mipav.model.algorithms.filters.AlgorithmTamuraTexture
-
- All Implemented Interfaces:
java.awt.event.ActionListener
,java.awt.event.WindowListener
,java.lang.Runnable
,java.util.EventListener
public class AlgorithmTamuraTexture extends AlgorithmBase
DOCUMENT ME!- Version:
- 0.1 July 6, 2012
- Author:
- William Gandler In the coarseness measurement a 32 wide pixel rim around the edge is excluded from the calculation. The contrast measurement uses all the pixels. The directionality measurement excludes a 1 wide pixel rim around the edge. All measurements are calculated for whole slice values and individual pixel values. Directionality uses the gradient filter for the whole slice result and the Sobel filter for the pixel result. References: 1.) "Textural Features Corresponding to Visual Perception" by Hideyuki Tamura, Shunji Mori, and Takashi Yamawaki, IEEE Transactions on Systems, Man, and Cybernetics, Vol. SMC-8, No. 6, June, 1978, pp. 460 - 473. 2.) "A Relevance Feedback Retrieval Method Based on Tamura Texture" by Ya-Li Qi, 2009 Second International Symposium on Knowledge Acquisition and Modeling, 2009, pp. 174-177.
-
-
Field Summary
Fields Modifier and Type Field Description private double
coarsenessThreshold
coarsenessThreshold must beprivate int
cSize
private ModelImage[]
destImage
private boolean
doCoarseness
private boolean
doContrast
private boolean
doDirectionality
private int
histogramBins
private double
histogramThreshold
private static int
RED_OFFSET
Red channel.private int
RGBOffset
-
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 AlgorithmTamuraTexture(ModelImage[] destImage, ModelImage srcImg, boolean doCoarseness, double coarsenessThreshold, boolean doContrast, int cSize, boolean doDirectionality, int histogramBins, double histogramThreshold)
Creates a new AlgorithmTamuraTexture object for black and white image.AlgorithmTamuraTexture(ModelImage[] destImage, ModelImage srcImg, int RGBOffset, boolean doCoarseness, double coarsenessThreshold, boolean doContrast, int cSize, boolean doDirectionality, int histogramBins, double histogramThreshold)
Creates a new AlgorithmTamuraTexture object for color image.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
calculateSliceTamuraTexture()
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
-
destImage
private ModelImage[] destImage
-
RED_OFFSET
private static final int RED_OFFSET
Red channel.- See Also:
- Constant Field Values
-
coarsenessThreshold
private double coarsenessThreshold
coarsenessThreshold must be = coarsenessThreshold * Emax. If coarsenessThreshold = 1.0, select the largest k which gives Emax.
-
doCoarseness
private boolean doCoarseness
-
doContrast
private boolean doContrast
-
cSize
private int cSize
-
doDirectionality
private boolean doDirectionality
-
histogramBins
private int histogramBins
-
histogramThreshold
private double histogramThreshold
-
RGBOffset
private int RGBOffset
-
-
Constructor Detail
-
AlgorithmTamuraTexture
public AlgorithmTamuraTexture(ModelImage[] destImage, ModelImage srcImg, boolean doCoarseness, double coarsenessThreshold, boolean doContrast, int cSize, boolean doDirectionality, int histogramBins, double histogramThreshold)
Creates a new AlgorithmTamuraTexture object for black and white image.- Parameters:
destImage
- arraysrcImg
- source image modeldoCoarseness
-coarsenessThreshold
-doContrast
-cSize
-doDirectionality
-histogramBins
-histogramThreshold
-
-
AlgorithmTamuraTexture
public AlgorithmTamuraTexture(ModelImage[] destImage, ModelImage srcImg, int RGBOffset, boolean doCoarseness, double coarsenessThreshold, boolean doContrast, int cSize, boolean doDirectionality, int histogramBins, double histogramThreshold)
Creates a new AlgorithmTamuraTexture object for color image.- Parameters:
destImage
- arraysrcImg
- source image modelRGBOffset
- selects red, green, or blue channeldoCoarseness
-coarsenessThreshold
-doContrast
-cSize
-doDirectionality
-histogramBins
-histogramThreshold
-
-
-
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
-
calculateSliceTamuraTexture
private void calculateSliceTamuraTexture()
-
-