Package gov.nih.mipav.model.algorithms
Class AlgorithmMSER
- java.lang.Object
-
- java.lang.Thread
-
- gov.nih.mipav.model.algorithms.AlgorithmBase
-
- gov.nih.mipav.model.algorithms.AlgorithmMSER
-
- All Implemented Interfaces:
java.awt.event.ActionListener
,java.awt.event.WindowListener
,java.lang.Runnable
,java.util.EventListener
public class AlgorithmMSER extends AlgorithmBase
- Author:
- Andrea Vedaldi
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private class
AlgorithmMSER.VlMserExtrReg
Extremal regions (ER) are extracted from the region forest.private class
AlgorithmMSER.VlMserFilt
private class
AlgorithmMSER.VlMserReg
Extremal regions and maximally stable extremal regions are instances of image regions.private class
AlgorithmMSER.VlMserStats
-
Field Summary
Fields Modifier and Type Field Description private boolean
bright_on_dark
private boolean
dark_on_bright
private short[]
data
private double
delta
private int[]
dims
private static int
ELLIPSES_ONLY
private double
max_area
private double
max_variation
private double
min_area
private double
min_diversity
private int
ndims
private int
outputVOIType
private static int
POINTS_AND_ELLIPSES
private static int
POINTS_ONLY
private int
sliceSize
private static int
VL_MSER_PIX_MAXVAL
private static int
VL_MSER_VOID_NODE
-
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 AlgorithmMSER(ModelImage srcImage, double delta, double max_area, double min_area, double max_variation, double min_diversity, boolean bright_on_dark, boolean dark_on_bright, int outputVOIType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
adv(int ndims, int[] dims, int[] subs)
Advance N-dimensional subscriptprivate int
climb(AlgorithmMSER.VlMserReg[] r, int idx)
Climb the region forest to reach a root The function climbs the regions' forest r[] starting from the node idx to the corresponding root.void
runAlgorithm()
Start algorithm.private void
vl_mser_delete(AlgorithmMSER.VlMserFilt f)
Delete MSER filter This function releases the MSER filter and all its resourcesprivate void
vl_mser_ell_fit(AlgorithmMSER.VlMserFilt f)
private AlgorithmMSER.VlMserFilt
vl_mser_new(int ndims, int[] dims)
private void
vl_mser_process(AlgorithmMSER.VlMserFilt f, short[] im)
-
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, 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
-
VL_MSER_PIX_MAXVAL
private static final int VL_MSER_PIX_MAXVAL
- See Also:
- Constant Field Values
-
VL_MSER_VOID_NODE
private static final int VL_MSER_VOID_NODE
- See Also:
- Constant Field Values
-
POINTS_ONLY
private static final int POINTS_ONLY
- See Also:
- Constant Field Values
-
ELLIPSES_ONLY
private static final int ELLIPSES_ONLY
- See Also:
- Constant Field Values
-
POINTS_AND_ELLIPSES
private static final int POINTS_AND_ELLIPSES
- See Also:
- Constant Field Values
-
delta
private double delta
-
max_area
private double max_area
-
min_area
private double min_area
-
max_variation
private double max_variation
-
min_diversity
private double min_diversity
-
bright_on_dark
private boolean bright_on_dark
-
dark_on_bright
private boolean dark_on_bright
-
outputVOIType
private int outputVOIType
-
ndims
private int ndims
-
dims
private int[] dims
-
data
private short[] data
-
sliceSize
private int sliceSize
-
-
Constructor Detail
-
AlgorithmMSER
public AlgorithmMSER(ModelImage srcImage, double delta, double max_area, double min_area, double max_variation, double min_diversity, boolean bright_on_dark, boolean dark_on_bright, int outputVOIType)
-
-
Method Detail
-
runAlgorithm
public void runAlgorithm()
Start algorithm.- Specified by:
runAlgorithm
in classAlgorithmBase
-
vl_mser_ell_fit
private void vl_mser_ell_fit(AlgorithmMSER.VlMserFilt f)
-
vl_mser_delete
private void vl_mser_delete(AlgorithmMSER.VlMserFilt f)
Delete MSER filter This function releases the MSER filter and all its resources- Parameters:
f
- MSER filter to be deleted
-
adv
private void adv(int ndims, int[] dims, int[] subs)
Advance N-dimensional subscript- Parameters:
ndims
-dims
-subs
- subscript to advance
-
vl_mser_process
private void vl_mser_process(AlgorithmMSER.VlMserFilt f, short[] im)
-
climb
private int climb(AlgorithmMSER.VlMserReg[] r, int idx)
Climb the region forest to reach a root The function climbs the regions' forest r[] starting from the node idx to the corresponding root. To speed-up the operation, the function uses the VlMserReg::shortcut field to quickly jump to the root. After the root is reached, all the used shortcuts are updated.- Parameters:
r
- regions' forestidx
- starting node- Returns:
- index of the reached root.
-
vl_mser_new
private AlgorithmMSER.VlMserFilt vl_mser_new(int ndims, int[] dims)
-
-