@ALDAOperator(genericExecutionMode=ALL, level=STANDARD, shortDescription="Operator for separating merged nuclei regions in images.") @ALDDerivedClass public class NucleusSeparator2DPeakSearch extends NucleusSeparator2DAlgos
This operator analyzes nuclei images and detects nuclei regions. The main
focus is thereby on seperating nuclei regions which are merged by common
segmentation techniques. Consequently, binary pre-segmentations of nuclei
regions can be provided as input to the operator.
Anyway, if no binary image is coming along, the gray-scale input image will
first be binarized by applying Otsu thresholding and some morphological
post-processing steps. Indeed this a standard procedure which probably
won't suit your needs - better use your own nucleus detector instead.
After binarization the resulting regions are further analyzed, i.e. the centers of present nuclei regions are determined (for details refer to Jochen's project thesis).
Given estimates for the nuclei regions snakes are initialized and run to detect the complete nuclei regions. As result extracted nuclei contours are provided as a set of polygons and overlayed to the greyscale image.
This operator has been written as part of Jochen's project in WS 2011/12.
Modifier and Type | Field and Description |
---|---|
private MTBImageByte |
BWImg |
private double |
gamma
Step-size in iterative snake optimization.
|
private Double |
mad |
private NucleusSeparator2DPeakSearch_RegionSeparator |
nrs |
private Float |
peakdistance |
private MTBImageRGB |
resultRGBimage
RGB image overlay with result nuclei contours.
|
private de.unihalle.informatik.Alida.datatypes.ALDDirectoryString |
saveSnakeLoc
Path where to save intermediate results.
|
private boolean |
saveSnakes
Flag to enable/disable saving of intermediate snake results.
|
private double |
segmentlength
Snake segment length.
|
private boolean |
showSnakes
Flag to enable/disable display of snake results.
|
private int |
snakeIterations
Maximal number of snake iterations in iterative optimization.
|
private MTBPolygon2DSet |
snakes
Set of resulting contours.
|
private Integer |
suppressor |
inputImg, labelImg, resultImg
Constructor and Description |
---|
NucleusSeparator2DPeakSearch()
Default constructor.
|
NucleusSeparator2DPeakSearch(MTBImageShort grey)
Constructor with input image.
|
NucleusSeparator2DPeakSearch(MTBImageShort grey,
MTBImage label)
Constructor with gray-scale and binary image.
|
Modifier and Type | Method and Description |
---|---|
void |
configureSnakes(double g,
int its,
double avglength)
Configures basic snake parameters.
|
String |
getDocumentation() |
MTBImageShort |
getLabelImage()
Returns gray-scale label image with nuclei regions.
|
MTBRegion2DSet |
getNRSCandidates()
Returns possible peak locations from NucleusRegionSeperator.
|
MTBImage |
getNRSDistImg()
Returns distance image calculated intermediately.
|
MTBPolygon2DSet |
getNRSEllipsoidSnakePrimer()
Creates and returns a set of polygons as starting regions for
snake analysis based on hypothesized ellipses from nucleus information
|
MTBRegion2DSet[] |
getNRSResultAreas()
Returns set of result regions from region separator.
|
MTBRegion2DSet |
getNRSResultCenters()
Returns set of detected region centers from region separator.
|
MTBPolygon2DSet |
getNRSVoronoidSnakePrimer()
Creates and returns a set of polygons as starting regions for the snakes.
|
MTBRegion2DSet |
getOtsuRegs()
Returns set of regions resulting from Otsu thresholding.
|
MTBImageRGB |
getResultImage()
Returns RGB color image overlayed with nuclei contours.
|
MTBPolygon2DSet |
getSnakes()
Returns the result snakes.
|
protected void |
operate() |
void |
setInImg(MTBImage inImg)
Specify gray-scale input image.
|
void |
setLabelImg(MTBImage label)
Specify label input image.
|
void |
setMad(double _mad)
Sets maximal allowed discrepancy of direct connection to actual profile
between two peaks.
|
void |
setMax_d2c(float max_d2c)
Sets factor to adjust maximal allowed distance from lower to upper peak.
|
void |
setSavePath(String path)
Sets the path to where intermediate snake results are to be written.
|
void |
setSaveSnakes(boolean save)
(De)activates saving of iteration step results.
|
void |
setShowSnakes(boolean show)
(De)activates displaying of intermediate results during snake-iterations.
|
void |
setSnakeIterations(int its)
Sets number of iterations for snake optimization.
|
void |
setSuppressor(int sup)
Sets threshold to suppress peak analysis close to scraggy contours.
|
getResultImg, setInputGrayScaleImage, setInputLabelImage, setResultImg
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="Max. Snake Iterations", required=false, direction=IN, dataIOOrder=3, mode=STANDARD, description="Maximal number of snake iterations.") private int snakeIterations
@Parameter(label="Snake Step Size", required=false, direction=IN, dataIOOrder=4, mode=STANDARD, description="Step size gamma for snake gradient-descent.") private double gamma
@Parameter(label="Snake Segment Length", required=false, direction=IN, dataIOOrder=5, mode=ADVANCED, description="Desired length of snake segments.") private double segmentlength
@Parameter(label="Show Snakes", required=false, direction=IN, dataIOOrder=-10, mode=STANDARD, supplemental=true, description="Flag to enable/disable snake display.") private boolean showSnakes
@Parameter(label="Save Snakes", required=false, direction=IN, dataIOOrder=-9, mode=ADVANCED, supplemental=true, description="Flag to enable/disable saving of intermediate results.") private boolean saveSnakes
@Parameter(label="Save Results to...", required=false, direction=IN, dataIOOrder=-8, mode=ADVANCED, supplemental=true, description="Path to where intermediate results will be stored.") private de.unihalle.informatik.Alida.datatypes.ALDDirectoryString saveSnakeLoc
@Parameter(label="Result Nuclei Contours", required=false, direction=OUT, description="Set of resulting snakes.") private MTBPolygon2DSet snakes
@Parameter(label="Result Snake Image", required=false, direction=OUT, description="RGB image with nuclei contour overlay.") private transient MTBImageRGB resultRGBimage
private transient Double mad
private transient Float peakdistance
private transient Integer suppressor
private transient MTBImageByte BWImg
private transient NucleusSeparator2DPeakSearch_RegionSeparator nrs
public NucleusSeparator2DPeakSearch() throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
public NucleusSeparator2DPeakSearch(MTBImageShort grey) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
grey
- Original greyscale nucleus image.de.unihalle.informatik.Alida.exceptions.ALDOperatorException
public NucleusSeparator2DPeakSearch(MTBImageShort grey, MTBImage label) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
grey
- Original greyscale nucleus image.label
- Label image of pre-segmented nuclei regions.de.unihalle.informatik.Alida.exceptions.ALDOperatorException
public void setInImg(MTBImage inImg)
inImg
- Gray-scale input image to be processed.public void setLabelImg(MTBImage label)
bw
- Label input image.public void setShowSnakes(boolean show)
If
- true, displaying results is enabled.public MTBPolygon2DSet getSnakes()
public MTBImageRGB getResultImage()
public MTBImageShort getLabelImage()
public void setSaveSnakes(boolean save)
If
- true, saving of results is enabled.public void setSavePath(String path)
Path
- in filesystem, folder must exist.public void setSnakeIterations(int its)
its
- Number of iterations.public void configureSnakes(double g, int its, double avglength)
g
- Array of snake step-sizes.its
- Number of iterations.avglength
- Desired length of snake segments.public MTBRegion2DSet getOtsuRegs()
public MTBImage getNRSDistImg()
public MTBPolygon2DSet getNRSVoronoidSnakePrimer() throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException, de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
The method is based on voronoi tesselation of Otsu-regions.
de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
public MTBPolygon2DSet getNRSEllipsoidSnakePrimer()
public MTBRegion2DSet[] getNRSResultAreas()
public MTBRegion2DSet getNRSResultCenters()
public MTBRegion2DSet getNRSCandidates()
public void setMax_d2c(float max_d2c)
max_d2c
- Maximal distance, default 1.5.public void setMad(double _mad)
mad
- Maximal discrepancy, default 0.11.public void setSuppressor(int sup)
sup
- Threshold, should be > 4.protected void operate() throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException, de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
operate
in class NucleusSeparator2DAlgos
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.