|
||||||||
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.MiToBo.core.operator.MTBOperator
de.unihalle.informatik.MiToBo.apps.particles2D.ParticleDetector
de.unihalle.informatik.MiToBo.apps.particles2D.ParticleDetectorUWT2D
@ALDAOperator(genericExecutionMode=ALL, level=STANDARD) @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
. That 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 particle detections can be extracted from the particle detector as a set of regions.
The input image may be transformed if it contains Poisson noise to simulate Gaussian noise
For further details refer to:
O. Gress, B. Möller, N. Stöhr, S. Hüttelmaier, S. Posch,
"Scale-adaptive wavelet-based particle detection in microscopy images".
In Proc. Bildverarbeitung für die Medizin (BVM 2010), pages 266-270, March 2010, Springer
Nested Class Summary |
---|
Nested classes/interfaces inherited from class de.unihalle.informatik.Alida.operator.ALDOperator |
---|
de.unihalle.informatik.Alida.operator.ALDOperator.HidingMode |
Field Summary | |
---|---|
private java.lang.Double |
corrThreshold
|
private MTBImageByte |
excludeMask
Optional mask to exclude particles in certain regions. |
private MTBImage |
inputImage
|
private java.lang.Integer |
Jmax
|
private java.lang.Integer |
Jmin
|
protected java.util.Vector<loci.common.StatusListener> |
m_statusListeners
vector of installed StatusListeners |
private int |
minRegionSize
|
private boolean |
poisson2gauss
|
private MTBRegion2DSet |
resultingRegions
|
private java.lang.Integer |
scaleIntervalSize
|
Fields inherited from class de.unihalle.informatik.Alida.operator.ALDOperator |
---|
completeDAG, name, 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 |
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. |
MTBImage[] |
getCorrelationImages()
Compute the correlation images as specified by the parameter object |
java.lang.Double |
getCorrelationThreshold()
Get threshold for thresholding wavelet correlation images |
MTBImage |
getInputImage()
Get input image |
java.lang.Integer |
getJmax()
Get Jmax |
java.lang.Integer |
getJmin()
Get Jmin |
protected java.lang.Integer |
getLabelMostInRegion(MTBRegion2D reg,
MTBImage img)
|
protected java.util.Vector<java.lang.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 |
java.lang.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 java.util.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, which are processed before: regions smaller than minRegionSize are rejected. |
protected MTBImage |
regionsToBinImage(MTBImage img,
MTBImage mask,
java.util.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 |
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.MiToBo.core.operator.MTBOperator |
---|
readResolve |
Methods inherited from class de.unihalle.informatik.Alida.operator.ALDOperator |
---|
deserializeFromXmlFile, fieldContained, getALDPortHashAccessKey, getConstructionMode, getInInoutNames, getInInoutNames, getInNames, getInOutNames, getMissingRequiredInputs, getName, getNumParameters, getOutInoutNames, getOutNames, getParameter, getParameterDescriptor, getParameterNames, getSupplementalNames, getVerbose, getVersion, isConfigured, parametersToXmlObject, print, print, print, printInterface, printInterface, readHistory, reinitializeParameterDescriptors, runOp, runOp, runOp, serializeToXmlFile, setConstructionMode, setName, setParameter, setParametersFromXml, setParametersFromXml, setVerbose, toStringVerbose, unconfiguredItems, validate, validateGeneric, writeHistory, writeHistory, writeHistory, writeParametersToXml |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
@Parameter(label="Correlation threshold", required=true, direction=IN, mode=STANDARD, dataIOOrder=5, description="Threshold for wavelet correlation images") private java.lang.Double corrThreshold
@Parameter(label="Exclude mask", direction=IN, mode=ADVANCED, dataIOOrder=8, required=false, description="Exclude mask.") private transient MTBImageByte excludeMask
Particles in masked regions are ignored if mask is non-null.
@Parameter(label="Input image", required=true, direction=IN, mode=STANDARD, dataIOOrder=1, description="Input image") private transient MTBImage inputImage
@Parameter(label="Jmax", required=true, direction=IN, mode=STANDARD, dataIOOrder=3, description="Maximum scale index") private java.lang.Integer Jmax
@Parameter(label="Jmin", required=true, direction=IN, mode=STANDARD, dataIOOrder=2, description="Minimum scale index") private java.lang.Integer Jmin
protected java.util.Vector<loci.common.StatusListener> m_statusListeners
@Parameter(label="Minimum region size", required=true, direction=IN, mode=STANDARD, dataIOOrder=6, description="Minimum area of detected regions") private int minRegionSize
@Parameter(label="Poisson- to Gaussian noise transform", required=true, direction=IN, mode=ADVANCED, dataIOOrder=7, description="Transform input image with poisson noise to image with Gaussian noise (J.-L. Starck et al)") private boolean poisson2gauss
@Parameter(label="Resulting regions", required=true, direction=OUT, mode=STANDARD, dataIOOrder=1, description="Resulting (detected) regions") private transient MTBRegion2DSet resultingRegions
@Parameter(label="Scale-interval size", required=true, direction=IN, mode=STANDARD, dataIOOrder=4, description="Size of scale interval for wavelet correlation images") private java.lang.Integer scaleIntervalSize
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) 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
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 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 detectionpoisson2gauss
- flag if image with poisson noise is transformed to simulate gaussian noise
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
Method Detail |
---|
public void addStatusListener(loci.common.StatusListener statuslistener)
addStatusListener
in interface loci.common.StatusReporter
protected MTBImage fillHoles(MTBImage img) throws java.lang.IllegalArgumentException, de.unihalle.informatik.Alida.exceptions.ALDOperatorException, de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
java.lang.IllegalArgumentException
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
protected MTBImage gauss2poisson(MTBImage img) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
public MTBImage[] getCorrelationImages() throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException, de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
p
- parameter object
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
public java.lang.Double getCorrelationThreshold()
public MTBImage getInputImage()
public java.lang.Integer getJmax()
public java.lang.Integer getJmin()
protected java.lang.Integer getLabelMostInRegion(MTBRegion2D reg, MTBImage img)
protected java.util.Vector<java.lang.Integer> getLabelsInRegion(MTBRegion2D reg, MTBImage img)
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
public int getMinRegionSize()
protected MTBImageHistogram getNormalizedCumulativeHistogram(MTBImage img, int bins)
img
- input imagebins
- number of histogram bins
public boolean getPoisson2Gauss()
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
public MTBRegion2DSet getResults()
protected double getSample(double[] cdf)
cdf
- cumulative distribution array
public java.lang.Integer getScaleIntervalSize()
protected MTBImage inverseATrousDWT(MTBImage[] dwt) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
protected MTBImage labelImage(MTBImage img, MTBRegion2DSet regs)
protected double logPofRegion(MTBRegion2D reg, MTBImage img, MTBImageHistogram cumHist)
protected java.util.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 double meanOfRegion(MTBRegion2D reg, MTBImage img)
public void notifyListeners(loci.common.StatusEvent e)
notifyListeners
in interface loci.common.StatusReporter
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 MTBImage poisson2gauss(MTBImage img) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
protected MTBImage processedRegionsToBinImage(MTBImage img, MTBRegion2DSet regs, int minRegionSize)
img
- regs
- minRegionSize
-
protected MTBImage regionsToBinImage(MTBImage img, MTBImage mask, java.util.Vector<MTBRegion2D> regs)
img
- only used to determine the result image sizemask
- regs
-
public void removeStatusListener(loci.common.StatusListener statuslistener)
removeStatusListener
in interface loci.common.StatusReporter
public void setCorrelationThreshold(double corrThresh)
public void setExcludeMask(MTBImageByte mask)
public void setInputImage(MTBImage img)
public void setJmax(int Jmax)
public void setJmin(int Jmin)
public void setMinRegionSize(int minRegionSize)
public void setPoisson2Gauss(boolean poisson2gauss)
protected void setResults(MTBRegion2DSet detectedRegions)
public void setScaleIntervalSize(int scaleIntervalSize)
protected void threshDWTCoeffs(MTBImage img, double sigma)
protected void threshDWTJeffreys(MTBImage[] dwt, double scaleOneSigma, double[] sigmaScales)
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 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
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
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |