@ALDAOperator(genericExecutionMode=ALL, level=APPLICATION) public class MPMFFilter2D extends MTBOperator implements loci.common.StatusReporter
This operator applies matched filters on multiple scales. The results are then combined by pairwise multiplication followed by hysteresis thresholding of each resulting product. Finally, all binary images are combined into a single result map applying logical OR operations.
As matched filters a second order Gaussian derivative filter, i.e., a
Mexican hat filter function is applied. Here we use MiToBo's implementation
of such a filter which is to be found in class GaussPDxxFilter2D
.
Related publication:
Q. Li, J. You, and D. Zhang, "Vessel Segmentation and Width Estimation in
Retinal Images using Multiscale Production of Matched Filter Responses",
Expert Systems with Applications, 39 (2012), pp. 7600-7610.
Here we assume vessels to exhibit a Gaussian profile (while in the paper a box profile is assumed). The width of the vessels is defined as two-times the standard deviation of the Gaussian kernel mask. To normalize the filter responses of different scales we follow the scheme proposed in
Sofka and Stewart, "Retinal Vessel Centerline Extraction Using Multiscale Matched Filters, Confidence and Edge Measures", IEEE TMI, vol. 25, no. 12, pp. 1531-1546, December 2006,
i.e. apply $(\sigma \cdot \sigma)^{\frac{3}{4}}$ as normalization factor at scale $\sigma$.
Modifier and Type | Class and Description |
---|---|
private class |
MPMFFilter2D.ResponseDifference
Function to find roots during middle scale calculation.
|
static class |
MPMFFilter2D.VesselMode
Detection scenario mode.
|
Modifier and Type | Field and Description |
---|---|
protected int |
angleSampling
Sampling step size for orientations considered.
|
private static double |
higherThresholdRatio
Factor to choose higher threshold in hysteresis thresholding automatically.
|
protected MTBImage |
inputImg
Input image to be processed.
|
protected double |
maxWidth
Expected width of thick vessels.
|
protected double |
minWidth
Expected width of thin vessels.
|
protected MPMFFilter2D.VesselMode |
mode
Scenario for detecting vessels, i.e. relation of foreground to background.
|
private MTBImageDouble |
responseStack
Result stack with intermediate results.
|
protected MTBImageByte |
resultVesselMap
Resulting binary vessel map.
|
private static double |
scaleNormalizationFactor
Factor to normalize filter responses of different scales appropriately.
|
protected Vector<loci.common.StatusListener> |
statusListeners
Vector of installed StatusListeners.
|
protected double |
threshold
Higher threshold for binarization.
|
Constructor and Description |
---|
MPMFFilter2D()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addStatusListener(loci.common.StatusListener statuslistener) |
protected double |
findMiddleScale(double minScale,
double maxScale)
Numerically finds the middle scale between to given scales.
|
MTBImageByte |
getBinaryResultMap()
Returns the final binary map.
|
MTBImageDouble |
getResponseStack()
Returns stack with intermediate (non-binary) results.
|
protected static double |
normalizedFilterResponse(double vScale,
double fScale)
Computes the (ideal) filter response to the Gaussian derivative kernel.
|
void |
notifyListeners(loci.common.StatusEvent e) |
protected void |
operate() |
protected Object |
readResolve()
Init function for deserialized objects.
|
void |
removeStatusListener(loci.common.StatusListener statuslistener) |
void |
validateCustom() |
addOperatorExecutionProgressEventListener, addParameter, addParameter, addParameterUnconditioned, fieldContained, fireOperatorExecutionProgressEvent, getALDPortHashAccessKey, getConstructionMode, getDocumentation, getHidingMode, getInactiveParameterNames, getInInoutNames, getInInoutNames, getInNames, getInOutNames, getMissingRequiredInputs, getName, getNumParameters, getOutInoutNames, getOutNames, getParameter, getParameterDescriptor, getParameterDescriptorUnconditioned, getParameterNames, getParameterUnconditioned, getSupplementalNames, getVerbose, getVersion, handleOperatorExecutionProgressEvent, hasInOutParameters, hasParameter, isAnnotatedParameter, isConfigured, print, print, print, printInterface, printInterface, readHistory, reinitializeParameterDescriptors, removeOperatorExecutionProgressEventListener, removeParameter, runOp, runOp, runOp, setConstructionMode, setConstructionMode, setConstructionMode, setHidingMode, setName, setParameter, setParameterUnconditioned, setVerbose, toStringVerbose, unconfiguredItems, validate, validateGeneric, writeHistory, writeHistory, writeHistory
private static final double scaleNormalizationFactor
See Sofka and Stewart, 2006, for details.
private static final double higherThresholdRatio
The threshold is determined by multiplying this factor with the intensity maximum to be found in the image to threshold. Its value has been chosen according to some empirical experiments.
protected transient Vector<loci.common.StatusListener> statusListeners
@Parameter(label="Input Image", required=true, dataIOOrder=-10, direction=IN, mode=STANDARD, description="Input image.") protected transient MTBImage inputImg
@Parameter(label="Scenario", required=true, dataIOOrder=1, direction=IN, mode=STANDARD, description="Relation of vessels to background.") protected MPMFFilter2D.VesselMode mode
@Parameter(label="Thin Vessel Width", required=true, dataIOOrder=2, direction=IN, mode=STANDARD, description="Expected width of thin vessels.") protected double minWidth
@Parameter(label="Thick Vessel Width", required=true, dataIOOrder=3, direction=IN, mode=STANDARD, description="Expected width of thick vessels.") protected double maxWidth
@Parameter(label="Angular Sampling Steps", required=true, direction=IN, mode=ADVANCED, description="Angular sampling step size (in degrees).", dataIOOrder=5) protected int angleSampling
@Parameter(label="(Upper) Threshold", required=false, dataIOOrder=0, direction=IN, mode=ADVANCED, description="Binarization threshold, if set to -1 a threshold is determined automatically.") protected double threshold
@Parameter(label="Result Map", dataIOOrder=0, direction=OUT, description="Resulting vessel map.") protected transient MTBImageByte resultVesselMap
@Parameter(label="Filter Response Stack", dataIOOrder=1, direction=OUT, description="Filter response stack.") private transient MTBImageDouble responseStack
Only generated in verbose mode.
public MPMFFilter2D() throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
public MTBImageByte getBinaryResultMap()
public MTBImageDouble getResponseStack()
Note that the stack is only created if the verbose mode is activated.
protected Object readResolve()
MTBOperator
This function is called on an instance of this class being deserialized from file, prior to handing the instance over to the user. It takes care of a proper initialization of transient member variables as they are not initialized to the default values during deserialization.
readResolve
in class MTBOperator
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
protected void operate() throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException, de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
operate
in class de.unihalle.informatik.Alida.operator.ALDOperator
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
protected double findMiddleScale(double minScale, double maxScale)
minScale
- Scale of thin vessels (given as standard deviation).maxScale
- Scale of thick vessels (given as standard deviation).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
protected static double normalizedFilterResponse(double vScale, double fScale)
The function returns the result of convolving a Gaussian function centered at $x=0$ and having a standard deviation of $\sigma=\text{vScale}$ (defining the model of a vessel) with a second derivative Gaussian matched filter with standard deviation $\sigma=\text{fScale}$.The result is normalized as proposed in Sofka et al.
vScale
- Standard deviation of the Gaussian vessel function.fScale
- Standard deviation of the matched filter kernel.Copyright © 2010–2020 Martin Luther University Halle-Wittenberg, Institute of Computer Science, Pattern Recognition and Bioinformatics. All rights reserved.