de.unihalle.informatik.MiToBo.filters.linear.anisotropic
Class ChaudhuriMatchedFilter2D

java.lang.Object
  extended by de.unihalle.informatik.Alida.operator.ALDOperator
      extended by de.unihalle.informatik.MiToBo.core.operator.MTBOperator
          extended by de.unihalle.informatik.MiToBo.filters.linear.anisotropic.OrientedFilter2D
              extended by de.unihalle.informatik.MiToBo.filters.linear.anisotropic.ChaudhuriMatchedFilter2D
All Implemented Interfaces:
de.unihalle.informatik.Alida.datatypes.ALDConfigurationValidator, de.unihalle.informatik.Alida.operator.events.ALDOperatorExecutionProgressEventListener, EventListener, loci.common.StatusReporter

@ALDDerivedClass
@ALDAOperator(genericExecutionMode=ALL,
              level=APPLICATION)
public class ChaudhuriMatchedFilter2D
extends OrientedFilter2D

2D Matched filter.

This filter is mainly used for segmenting vessel-like structures, e.g., refer to

Chaudhuri, S., Chatterjee, S., Katz, N., Nelson, M., and Goldbaum, M.,
"Detection of Blood Vessels in Retinal Images Using 2D Matched Filters",
IEEE Trans. on Medical Imaging, vol. 8, no. 3, September 1989

Target structures are assumed to exhibit a Gaussian-shaped cross-section. This is modeled by a Gaussian kernel with standard deviation $\sigma$.

Contrary to the paper this operator always uses square kernels, i.e. the maximum of the kernel height and $2 \cdot 3 \cdot \sigma$ is used as kernel size.
In addition, the calculations are done in double precision while the original paper uses integer precision only.

Author:
Birgit Moeller

Nested Class Summary
 
Nested classes/interfaces inherited from class de.unihalle.informatik.Alida.operator.ALDOperator
de.unihalle.informatik.Alida.operator.ALDOperator.HidingMode
 
Field Summary
protected  Double gaussStdDev
          Standard deviation of the Gaussian.
protected  Integer height
          Height of the filter mask.
protected  boolean invertMask
          Flag to invert filter mask.
protected  boolean normalizeMask
          Flag to normalize sum of kernel elements to zero.
 
Fields inherited from class de.unihalle.informatik.MiToBo.filters.linear.anisotropic.OrientedFilter2D
angle, inputImg, resultImg, statusListeners
 
Fields inherited from class de.unihalle.informatik.Alida.operator.ALDOperator
completeDAG, name, operatorExecutionEventlistenerList, portHashAccess, verbose, versionProvider
 
Constructor Summary
ChaudhuriMatchedFilter2D()
          Default constructor.
 
Method Summary
 void disableNormalization()
          Disable kernel normalization.
 void enableNormalization()
          Enable kernel normalization.
 MTBImageDouble getKernel(double _angle)
          Calculates kernel for given angle and pre-defined sigma and length.
protected  Object readResolve()
          Init function for deserialized objects.
 void setHeight(int h)
          Specify height of filter mask.
 void setInvertMask(boolean b)
          Enable/disable inversion of mask.
 void setStandardDeviation(double s)
          Specify standard deviation of Gaussian.
 void validateCustom()
           
 
Methods inherited from class de.unihalle.informatik.MiToBo.filters.linear.anisotropic.OrientedFilter2D
addStatusListener, getResultImage, notifyListeners, operate, removeStatusListener, setAngle, setInputImage
 
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, 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

gaussStdDev

@Parameter(label="\u03c3 of Gaussian",
           required=false,
           dataIOOrder=2,
           direction=IN,
           mode=STANDARD,
           description="Std. deviation of Gaussian.")
protected Double gaussStdDev
Standard deviation of the Gaussian.

The mask width is derived from the standard deviation of the Gaussian,
i.e. the width is given by $w = 2 \cdot 3 \cdot (int)(\sigma+0.5)+1$. Note that the minimum width is 3.


height

@Parameter(label="Mask Height",
           required=false,
           dataIOOrder=3,
           direction=IN,
           mode=STANDARD,
           description="Height of the filter mask.")
protected Integer height
Height of the filter mask.

Note that the height of the mask must not be smaller than 3.


invertMask

@Parameter(label="Invert Mask",
           required=false,
           dataIOOrder=5,
           direction=IN,
           mode=STANDARD,
           description="If true, filter mask is inverted.")
protected boolean invertMask
Flag to invert filter mask.

As defined in the original paper the filter targets at filtering dark structures on bright background.
To detect bright structures on dark background the mask needs to be inverted.


normalizeMask

@Parameter(label="Normalize Mask",
           required=false,
           dataIOOrder=4,
           direction=IN,
           mode=STANDARD,
           description="If true, mask is normalized to a sum of zero.")
protected boolean normalizeMask
Flag to normalize sum of kernel elements to zero.

Constructor Detail

ChaudhuriMatchedFilter2D

public ChaudhuriMatchedFilter2D()
                         throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
Default constructor.

Throws:
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
Method Detail

readResolve

protected Object readResolve()
Description copied from class: MTBOperator
Init function for deserialized objects.

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.

Overrides:
readResolve in class OrientedFilter2D
Returns:
Updated deserialized object.

validateCustom

public void validateCustom()
                    throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
Overrides:
validateCustom in class de.unihalle.informatik.Alida.operator.ALDOperator
Throws:
de.unihalle.informatik.Alida.exceptions.ALDOperatorException

getKernel

public MTBImageDouble getKernel(double _angle)
Calculates kernel for given angle and pre-defined sigma and length.

Specified by:
getKernel in class OrientedFilter2D
Parameters:
_angle - Rotation angle in degrees.
Returns:
Kernel image.

setStandardDeviation

public void setStandardDeviation(double s)
Specify standard deviation of Gaussian.

Parameters:
s - Standard deviation $\sigma$.

setHeight

public void setHeight(int h)
Specify height of filter mask.

Parameters:
h - Height of mask.

setInvertMask

public void setInvertMask(boolean b)
Enable/disable inversion of mask.

Parameters:
b - Flag for inversion.

enableNormalization

public void enableNormalization()
Enable kernel normalization.


disableNormalization

public void disableNormalization()
Disable kernel normalization.



Copyright © 2010–2015 Martin Luther University Halle-Wittenberg. All rights reserved.