|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.unihalle.informatik.Alida.operator.ALDOperator
de.unihalle.informatik.Alida.operator.ALDOperatorControllable
de.unihalle.informatik.MiToBo.core.operator.MTBOperatorControllable
de.unihalle.informatik.MiToBo.apps.particles2D.ParticleDetector
de.unihalle.informatik.MiToBo.apps.particles2D.ParticleDetectorUWT2D
@ALDAOperator(genericExecutionMode=ALL, level=STANDARD, allowBatchMode=false) @ALDDerivedClass public class ParticleDetectorUWT2D
Detector for spotlike structures (bright on dark background) in 2D based on the undecimated wavelet transform.
The undecimated wavelet transform produces wavelet coefficient images
that correspond to the results of filtering the original image with a
bank of filters. There is one lowpass-filtered image, one
highpass-filtered image and several bandpass filtered images,
depending on the parameter Jmax
. The different
bands/filtered images are referenced by the 'scale'.
The parameters Jmin
and Jmax
determine
the lower and upper scale limit and, thus, control the range of
wavelet images that are taken into account for particle detection.
Scale 1 corresponds to the highpass filtered image and increasing
scales correspond to decreasing frequency bands.
The scaleIntervalSize
parameter determines, how many
wavelet images of adjacent scales are used to compute a wavelet
correlation image, which is the multiplication of wavelet coefficients
over adjacent scales at each pixel.
A short example: Jmin=2, Jmax=4, scaleIntervalSize=2
This means that the bandpass filtered images of scale 2 and 3 are
multiplied for one correlation image, and the bandpass filtered images
of scale 3 and 4 for another.
Correlation images are then thresholded by corrThreshold
to yield hypotheses of particle detections. Because multiple
hypotheses can exist at the same location due to multiple correlation
images, a kind of hypothesis testing is used to determine the more
likely detection at a certain location.
The resulting set of particle detections can be extracted from the particle detector as a set of regions. In addition, in verbose mode the sets of computed original and binary correlation images are also available as image stacks.
The input image may be transformed if it contains Poisson noise to
simulate Gaussian noise using the parameter
poisson2gauss
.
For further details refer to:
Nested Class Summary | |
---|---|
protected class |
ParticleDetectorUWT2D.UWTRunner
Thread class to run UWT wavelet transformation threaded. |
Nested classes/interfaces inherited from class de.unihalle.informatik.Alida.operator.ALDOperatorControllable |
---|
de.unihalle.informatik.Alida.operator.ALDOperatorControllable.OperatorControlStatus, de.unihalle.informatik.Alida.operator.ALDOperatorControllable.OperatorExecutionStatus |
Nested classes/interfaces inherited from class de.unihalle.informatik.Alida.operator.ALDOperator |
---|
de.unihalle.informatik.Alida.operator.ALDOperator.HidingMode |
Field Summary | |
---|---|
protected Vector<loci.common.StatusListener> |
m_statusListeners
Vector of installed StatusListener objects. |
Fields inherited from class de.unihalle.informatik.Alida.operator.ALDOperatorControllable |
---|
configurationEventlistenerList, controlEventlistenerList, notifyListenersRecursively, operatorExecStatus, operatorStatus, stepSize, stepWiseExecution |
Fields inherited from class de.unihalle.informatik.Alida.operator.ALDOperator |
---|
completeDAG, name, operatorExecutionEventlistenerList, portHashAccess, verbose, versionProvider |
Constructor Summary | |
---|---|
ParticleDetectorUWT2D()
Constructor. |
|
ParticleDetectorUWT2D(MTBImage img,
int _Jmin,
int _Jmax,
double _corrThreshold,
int _scaleIntervalSize,
int _minRegionSize)
Constructor that sets the poisson2gauss flag to true |
|
ParticleDetectorUWT2D(MTBImage img,
int _Jmin,
int _Jmax,
double _corrThreshold,
int _scaleIntervalSize,
int _minRegionSize,
boolean _poisson2gauss)
Constructor with non-default parameters. |
Method Summary | |
---|---|
void |
addStatusListener(loci.common.StatusListener statuslistener)
|
protected MTBImage |
fillHoles(MTBImage img)
|
protected MTBImage |
gauss2poisson(MTBImage img)
Transforms image with gaussian noise to image with poisson noise J. |
protected MTBImage[] |
getCorrelationImages()
Compute the correlation images as specified by the parameters. |
Double |
getCorrelationThreshold()
Get threshold for thresholding wavelet correlation images |
MTBImage |
getInputImage()
Get input image |
Integer |
getJmax()
Get Jmax |
Integer |
getJmin()
Get Jmin |
protected Integer |
getLabelMostInRegion(MTBRegion2D reg,
MTBImage img)
|
protected Vector<Integer> |
getLabelsInRegion(MTBRegion2D reg,
MTBImage img)
|
protected MTBImage |
getMaskFromNuclei(MTBImage nucleiImg)
|
int |
getMinRegionSize()
Get the minimum size of detected regions. |
protected MTBImageHistogram |
getNormalizedCumulativeHistogram(MTBImage img,
int bins)
Create a normalized cumulative histogram from an image |
boolean |
getPoisson2Gauss()
Get flag if input image with poisson noise is to be transformed to image with gaussian noise following J. |
protected MTBTree |
getRegionsTree(MTBImage[] binaryImages)
Build a tree of regions from binarized images. |
MTBRegion2DSet |
getResults()
Get resulting regions (each detetection corresponds to a region) |
protected double |
getSample(double[] cdf)
Returns a sample in the range [0, 1] from a cumulative distribution given by the array cdf |
Integer |
getScaleIntervalSize()
Get the size of the scale interval for correlation images |
protected MTBImage |
inverseATrousDWT(MTBImage[] dwt)
|
protected MTBImage |
labelImage(MTBImage img,
MTBRegion2DSet regs)
|
protected double |
logPofRegion(MTBRegion2D reg,
MTBImage img,
MTBImageHistogram cumHist)
|
protected Vector<MTBTreeNode> |
meaningfulNodes(MTBTreeNode treeNode,
MTBImage[] corrImgs,
MTBImageHistogram[] hists,
int mode)
Get the most meaningful regions from a (sub)tree. |
protected double |
meanOfRegion(MTBRegion2D reg,
MTBImage img)
|
void |
notifyListeners(loci.common.StatusEvent e)
|
protected void |
operate()
|
protected MTBImage |
poisson2gauss(MTBImage img)
Transforms image with poisson noise to image with gaussian noise J. |
protected MTBImage |
processedRegionsToBinImage(MTBImage img,
MTBRegion2DSet regs,
int _minRegionSize)
Create a binary image from given regions. |
protected MTBImage |
regionsToBinImage(MTBImage img,
MTBImage mask,
Vector<MTBRegion2D> regs)
Create binary image from a set of regions. |
void |
removeStatusListener(loci.common.StatusListener statuslistener)
|
void |
setCorrelationThreshold(double corrThresh)
Set threshold for thresholding wavelet correlation images |
void |
setExcludeMask(MTBImageByte mask)
Specify exclude mask. |
void |
setInputImage(MTBImage img)
Set input image |
void |
setJmax(int _Jmax)
Set Jmax |
void |
setJmin(int _Jmin)
Set Jmin |
void |
setMinRegionSize(int _minRegionSize)
Set the minimum size of detected regions. |
void |
setPoisson2Gauss(boolean _poisson2gauss)
Set flag if input image with poisson noise is to be transformed to image with gaussian noise following J. |
protected void |
setResults(MTBRegion2DSet detectedRegions)
Set detected regions |
void |
setScaleIntervalSize(int _scaleIntervalSize)
Set the size of the scale interval for correlation images |
boolean |
supportsStepWiseExecution()
|
protected void |
threshDWTCoeffs(MTBImage img,
double sigma)
|
protected void |
threshDWTJeffreys(MTBImage[] dwt,
double scaleOneSigma,
double[] sigmaScales)
|
protected MTBImage |
threshImage(MTBImage img,
double thresh)
|
protected MTBImage |
threshImgNiblack(MTBImage img,
double k,
int winsize)
|
void |
validateCustom()
|
Methods inherited from class de.unihalle.informatik.Alida.operator.ALDOperatorControllable |
---|
addALDConfigurationEventListener, addALDControlEventListener, fireALDConfigurationEvent, fireALDControlEvent, getExecutionStatus, handleALDConfigurationEvent, handleALDControlEvent, removeALDConfigurationEventListener, removeALDControlEventListener, setNotifyRecursiveFlag |
Methods inherited from class de.unihalle.informatik.Alida.operator.ALDOperator |
---|
addOperatorExecutionProgressEventListener, fieldContained, fireOperatorExecutionProgressEvent, getALDPortHashAccessKey, getConstructionMode, getHidingMode, getInInoutNames, getInInoutNames, getInNames, getInOutNames, getMissingRequiredInputs, getName, getNumParameters, getOutInoutNames, getOutNames, getParameter, getParameterDescriptor, getParameterNames, getSupplementalNames, getVerbose, getVersion, handleOperatorExecutionProgressEvent, isConfigured, print, print, print, printInterface, printInterface, readHistory, readResolve, reinitializeParameterDescriptors, removeOperatorExecutionProgressEventListener, runOp, runOp, runOp, setConstructionMode, setHidingMode, setName, setParameter, setVerbose, toStringVerbose, unconfiguredItems, validate, validateGeneric, writeHistory, writeHistory, writeHistory |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Vector<loci.common.StatusListener> m_statusListeners
StatusListener
objects.
Constructor Detail |
---|
public ParticleDetectorUWT2D() throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
public ParticleDetectorUWT2D(MTBImage img, int _Jmin, int _Jmax, double _corrThreshold, int _scaleIntervalSize, int _minRegionSize, boolean _poisson2gauss) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
img
- input image with bright granules on dark background_Jmin
- lowest scale index to be used for correlation image computations (scale is reciprocal to frequency properties)_Jmax
- highest scale index to be used for correlation image computations (scale is reciprocal to frequency properties)_corrThreshold
- threshold for wavelet correlation images to obtain detected region hypotheses_scaleIntervalSize
- size of the interval of scales that are used to compute wavelet correlation images_minRegionSize
- minimum size of a region to be chosen as detection_poisson2gauss
- flag if image with poisson noise is transformed to simulate gaussian noise
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
public ParticleDetectorUWT2D(MTBImage img, int _Jmin, int _Jmax, double _corrThreshold, int _scaleIntervalSize, int _minRegionSize) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
true
img
- input image with bright granules on dark backgroundJmin
- lowest scale index to be used for correlation image computations (scale is reciprocal to frequency properties)Jmax
- highest scale index to be used for correlation image computations (scale is reciprocal to frequency properties)corrThreshold
- threshold for wavelet correlation images to obtain detected region hypothesesscaleIntervalSize
- size of the interval of scales that are used to compute wavelet correlation imagesminRegionSize
- minimum size of a region to be chosen as detection
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
Method Detail |
---|
public void validateCustom() throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
validateCustom
in class de.unihalle.informatik.Alida.operator.ALDOperator
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
public boolean supportsStepWiseExecution()
supportsStepWiseExecution
in class de.unihalle.informatik.Alida.operator.ALDOperatorControllable
protected void operate() throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException, de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
operate
in class ParticleDetector
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
protected Vector<MTBTreeNode> meaningfulNodes(MTBTreeNode treeNode, MTBImage[] corrImgs, MTBImageHistogram[] hists, int mode)
treeNode
- root of the (sub) treecorrImgs
- correlation imageshists
- cumulative histogramsmode
- 0: weighted mean, 1: unweighted mean, 2: min, 3 or else: max
protected MTBTree getRegionsTree(MTBImage[] binaryImages) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException, de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
binaryImages
-
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
protected MTBImage[] getCorrelationImages() throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException, de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
protected MTBImage poisson2gauss(MTBImage img) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
protected MTBImage gauss2poisson(MTBImage img) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
protected MTBImageHistogram getNormalizedCumulativeHistogram(MTBImage img, int bins)
img
- input imagebins
- number of histogram bins
protected MTBImage fillHoles(MTBImage img) throws IllegalArgumentException, de.unihalle.informatik.Alida.exceptions.ALDOperatorException, de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
IllegalArgumentException
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
protected MTBImage threshImgNiblack(MTBImage img, double k, int winsize) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException, de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
protected MTBImage getMaskFromNuclei(MTBImage nucleiImg) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException, de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
protected Integer getLabelMostInRegion(MTBRegion2D reg, MTBImage img)
protected Vector<Integer> getLabelsInRegion(MTBRegion2D reg, MTBImage img)
protected double meanOfRegion(MTBRegion2D reg, MTBImage img)
protected double logPofRegion(MTBRegion2D reg, MTBImage img, MTBImageHistogram cumHist)
protected MTBImage threshImage(MTBImage img, double thresh) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException, de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
protected MTBImage labelImage(MTBImage img, MTBRegion2DSet regs)
protected MTBImage regionsToBinImage(MTBImage img, MTBImage mask, Vector<MTBRegion2D> regs)
img
- only used to determine the result image sizemask
- regs
-
protected MTBImage processedRegionsToBinImage(MTBImage img, MTBRegion2DSet regs, int _minRegionSize)
Regions smaller than
_minRegionSize
are rejected.
img
- Input image.regs
- Region set._minRegionSize
- Minimal size of regions considered.
protected void threshDWTJeffreys(MTBImage[] dwt, double scaleOneSigma, double[] sigmaScales)
protected MTBImage inverseATrousDWT(MTBImage[] dwt) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
protected void threshDWTCoeffs(MTBImage img, double sigma)
protected double getSample(double[] cdf)
cdf
- cumulative distribution array
public void addStatusListener(loci.common.StatusListener statuslistener)
addStatusListener
in interface loci.common.StatusReporter
public void notifyListeners(loci.common.StatusEvent e)
notifyListeners
in interface loci.common.StatusReporter
public void removeStatusListener(loci.common.StatusListener statuslistener)
removeStatusListener
in interface loci.common.StatusReporter
public MTBImage getInputImage()
public void setInputImage(MTBImage img)
public Integer getJmin()
public void setJmin(int _Jmin)
public Integer getJmax()
public void setJmax(int _Jmax)
public Double getCorrelationThreshold()
public void setCorrelationThreshold(double corrThresh)
public Integer getScaleIntervalSize()
public void setScaleIntervalSize(int _scaleIntervalSize)
public int getMinRegionSize()
public void setMinRegionSize(int _minRegionSize)
public boolean getPoisson2Gauss()
public void setPoisson2Gauss(boolean _poisson2gauss)
public void setExcludeMask(MTBImageByte mask)
public MTBRegion2DSet getResults()
protected void setResults(MTBRegion2DSet detectedRegions)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |