@ALDAOperator(genericExecutionMode=ALL, shortDescription="Operator for segmenting cell nuclei in 2D images.") public class NucleusDetector2D extends MTBOperator
Modifier and Type | Class and Description |
---|---|
static class |
NucleusDetector2D.NuclDetectMode
Available modes for nuclei segmentation in 2D images.
|
Modifier and Type | Field and Description |
---|---|
private LocallyAdaptiveContrastEnhancement |
contrastEnhancer |
private boolean |
doFillHoles
Flag to enable hole filling.
|
private boolean |
doMorphOps
Flag to enable/disable morphological pre-/postprocessing.
|
private boolean |
doNucleiSeparation
Flag to enable separation of merged nuclei regions.
|
private MTBImageShort |
inImg
Reference to original image, for internal use only
|
private MTBImage |
inImgOrig
Input image to process.
|
private SegResultEnums.MeasureUnit |
measureUnits
Units to be used for measurements.
|
private int |
minNucleusSize
Minimal size of valid nuclei regions.
|
private int |
morphMaskSize
Mask size to be used in morphological pre-/postprocessing.
|
private ImgThreshNiblack |
niblackOperator
Niblack operator, required if mode is 'NIBLACK'.
|
private NucleusSeparator2D |
nucleusSepOp
Operator to be applied for nuclei separation.
|
private NucleusDetector2D.NuclDetectMode |
opMode
Detection mode.
|
private SegResult_Nuclei |
resultData
Result data object containing quantitative data and label images.
|
Constructor and Description |
---|
NucleusDetector2D()
Default constructor.
|
NucleusDetector2D(MTBImage img,
NucleusDetector2D.NuclDetectMode opmode,
ImgThreshNiblack niblackOp,
boolean doMorph,
int msize,
int minSize,
boolean fillHoles)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected MTBImageByte |
detectWithLocalContrastEnhancement()
Detect nuclei by first improving image contrast.
|
protected MTBImageByte |
detectWithNiblack()
Detects nuclei based on Niblack thresholding.
|
protected MTBImageByte |
detectWithOtsu_erodedilate()
Detects nuclei based on Otsu thresholding and a combination of erosion/
dilation.
|
protected MTBImageByte |
detectWithOtsu_openclose()
Detects nuclei based on Otsu thresholding and a combination of opening
and closing.
|
String |
getDocumentation() |
SegResult_Nuclei |
getResultData()
Get the result data, i.e. mask and related quantitative data.
|
MTBImage |
getResultImage()
Get the result label image.
|
protected void |
operate() |
void |
setInputImage(MTBImage img)
Specify input image.
|
void |
setMeasureUnits(SegResultEnums.MeasureUnit mu)
Specify units in which to measure areas.
|
readResolve
addOperatorExecutionProgressEventListener, addParameter, addParameter, addParameterUnconditioned, fieldContained, fireOperatorExecutionProgressEvent, getALDPortHashAccessKey, getConstructionMode, 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, validateCustom, validateGeneric, writeHistory, writeHistory, writeHistory
@Parameter(label="Input image", required=true, direction=IN, description="Input image.", dataIOOrder=-10) private transient MTBImage inImgOrig
@Parameter(label="Operator mode", required=true, dataIOOrder=-9, direction=IN, description="Operator detection mode.") private NucleusDetector2D.NuclDetectMode opMode
@Parameter(label="Niblack operator", required=false, dataIOOrder=-1, direction=IN, description="Niblack thresholder.") private ImgThreshNiblack niblackOperator
@Parameter(label="Apply morphological operations", required=false, direction=IN, description="Apply morphological operations.", dataIOOrder=-9) private boolean doMorphOps
Flag is only active if mode is not 'NIBLACK'.
@Parameter(label="Masksize", required=false, dataIOOrder=-8, direction=IN, description="Structuring element size.") private int morphMaskSize
@Parameter(label="Min. nuclei size", required=false, dataIOOrder=-11, direction=IN, description="Minimum size of valid nuclei.") private int minNucleusSize
@Parameter(label="Fill holes", required=false, dataIOOrder=-6, direction=IN, description="Fill holes in regions.") private boolean doFillHoles
@Parameter(label="Operator for local contrast improvement", required=false, dataIOOrder=1, direction=IN, description="Applied in mode CONTRAST_ANALYSIS.") private LocallyAdaptiveContrastEnhancement contrastEnhancer
@Parameter(label="Try Nuclei Separation", required=false, dataIOOrder=2, direction=IN, description="Apply nuclei separator to split merged regions.") private boolean doNucleiSeparation
@Parameter(label="Nuclei Separator", required=false, dataIOOrder=4, direction=IN, description="Operator for nuclei region splitting.") private NucleusSeparator2D nucleusSepOp
@Parameter(label="Units", required=false, mode=ADVANCED, direction=IN, dataIOOrder=100, description="Units for area measurements.") private SegResultEnums.MeasureUnit measureUnits
@Parameter(label="Result statistics", direction=OUT, description="Quantitative result data.") private transient SegResult_Nuclei resultData
private transient MTBImageShort inImg
public NucleusDetector2D() throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
public NucleusDetector2D(MTBImage img, NucleusDetector2D.NuclDetectMode opmode, ImgThreshNiblack niblackOp, boolean doMorph, int msize, int minSize, boolean fillHoles) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
img
- Image to be processed.opmode
- Detection mode.niblackOp
- Optional Niblack operator for mode 'NIBLACK'.doMorph
- Flag to enable/disable morphological processing.msize
- Size of structuring element in pre-/postprocessing.minSize
- Minimum size of valid nuclei.fillHoles
- Flag to enable/disable hole filling.de.unihalle.informatik.Alida.exceptions.ALDOperatorException
public void setInputImage(MTBImage img)
public void setMeasureUnits(SegResultEnums.MeasureUnit mu)
public MTBImage getResultImage()
public SegResult_Nuclei getResultData()
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 MTBImageByte detectWithOtsu_openclose() 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 MTBImageByte detectWithOtsu_erodedilate() throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException, de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
This routine has been developed by Jochen Luechtrath for nuclei/cytoplasm segmentation.
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
protected MTBImageByte detectWithNiblack() 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 MTBImageByte detectWithLocalContrastEnhancement() 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 String getDocumentation()
getDocumentation
in class de.unihalle.informatik.Alida.operator.ALDOperator
Copyright © 2010–2020 Martin Luther University Halle-Wittenberg, Institute of Computer Science, Pattern Recognition and Bioinformatics. All rights reserved.