@ALDAOperator(genericExecutionMode=ALL, level=APPLICATION, shortDescription="Segment cell contours from a given single-layer image.") public class CytoplasmAnalyzer2D extends MTBOperatorControllable
This operator allows to iteratively segment cell membrane and cytoplasm, respectively. It basically relies on snakes applying them either in an iterative fashion or without iterative levels. In the first case between the different snake runs the segmented cell regions are expanded by voronoi dilation and their internal areas are masked to enforce further region growth by decreasing the regions' average intensity values.
Further details about the iterative method can be found in the paper: B. Möller, N. Stöhr, S. Hüttelmaier and S. Posch, "Cascaded Segmentation of Grained Cell Tissue with Active Contour Models". In Proc. of Int. Conf. on Pattern Recognition (ICPR '10), August 2010.
Details about the non-iterative approach can be found in: B. Möller and S. Posch, "MiCA - Easy Cell Image Analysis with Normalized Snakes". In Proc. of Workshop on Microscopic Image Analysis with Applications in Biology (MIAAB '11), Heidelberg, Germany, Sep. 2011.
Modifier and Type | Class and Description |
---|---|
static class |
CytoplasmAnalyzer2D.DetectMode
Operator mode.
|
de.unihalle.informatik.Alida.operator.ALDOperatorControllable.OperatorControlStatus, de.unihalle.informatik.Alida.operator.ALDOperatorControllable.OperatorControlStatusHandle, de.unihalle.informatik.Alida.operator.ALDOperatorControllable.OperatorExecutionStatus
Modifier and Type | Field and Description |
---|---|
protected boolean[] |
activeSnakes
Array with active snakes.
|
protected int[] |
colorArray
Array with colors for visualization.
|
protected MTBPolygon2DSet |
currentSnakes
Current set of snakes.
|
protected CytoplasmAnalyzer2D.DetectMode |
detectionMode
Operator mode to run.
|
private int |
height |
protected MTBImage |
inImg
Single-layer input image to be processed.
|
protected MTBPolygon2DSet |
initialSnakes
Initial snakes for cells, e.g. nuclei contours.
|
private MTBImageByte |
labelImg |
protected int |
maxExpansion
Maximum expansion by Voronoi dilation.
|
protected int |
maxLevels
Maximum number of levels to perform.
|
protected double |
minAreaGrowth
Lower threshold for region growth.
|
protected double |
minIntensityVariance
Minimum admissible variance in new snake interior fractions..
|
private static int |
MinSnakePointNum
Minimum number of points acceptable for snakes.
|
protected SegResult_Cytoplasm |
resultData
Result data object.
|
protected MTBImageRGB |
resultImage
Result segmentation image.
|
protected MTBPolygon2DSet |
resultSnakes |
protected boolean |
saveIntermediateResults
Flag for saving intermediate results.
|
protected String |
saveIntermediateResultsPath
Path where to save intermediate results.
|
protected boolean |
showIntermediateResults
Flag for displaying intermediate results.
|
private int[] |
snakeArea |
private int |
snakeNum
Number of snakes.
|
protected SnakeOptimizerCoupled |
snakeOpter
Snake optimizer.
|
private int |
width |
Constructor and Description |
---|
CytoplasmAnalyzer2D()
Default constructor.
|
CytoplasmAnalyzer2D(MTBImage img,
MTBPolygon2DSet initS,
SnakeOptimizerCoupled snakeObj,
CytoplasmAnalyzer2D.DetectMode m,
int _maxLevels)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
disableSaveIntermediateResults()
Do not save intermediate results.
|
void |
disableShowIntermediateResults()
Disable display of intermediate results.
|
void |
enableSaveIntermediateResults()
Save intermediate results.
|
void |
enableShowIntermediateResults()
Enable display of intermediate results.
|
String |
getDocumentation() |
int |
getMaxLevels()
Returns maximum number of levels in iterative mode.
|
SegResult_Cytoplasm |
getResultData()
Returns result data object.
|
protected void |
operate() |
private void |
runIterativeMode()
Cell tissue segmentation in an iterative fashion.
|
private void |
runMeanVarMode()
Deprecated.
|
void |
setDetectionMode(CytoplasmAnalyzer2D.DetectMode m)
Specify detection mode.
|
void |
setInitialSnakes(MTBPolygon2DSet snakes)
Specify initial snakes.
|
void |
setInputImage(MTBImage img)
Specify input image.
|
void |
setIntermediateResultDirectory(String dir)
Set intermediate result directory.
|
void |
setMaxLevels(int maxL)
Specify maximum number of levels for iterative mode.
|
boolean |
supportsStepWiseExecution() |
addALDConfigurationEventListener, addALDControlEventListener, fireALDConfigurationEvent, fireALDControlEvent, getControlStatus, getControlStatusHandle, getExecutionStatus, handleALDConfigurationEvent, handleALDControlEvent, removeALDConfigurationEventListener, removeALDControlEventListener, setControlStatus, setNotifyRecursiveFlag
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, readResolve, 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=-20, mode=STANDARD) protected transient MTBImage inImg
@Parameter(label="Initial snake(s)", required=true, direction=IN, description="Initial snakes.", dataIOOrder=-19, mode=STANDARD) protected MTBPolygon2DSet initialSnakes
@Parameter(label="Snake optimizer", required=true, direction=IN, description="Snake optimizer object.", dataIOOrder=-18, mode=STANDARD) protected SnakeOptimizerCoupled snakeOpter
@Parameter(label="Operation mode", required=false, direction=IN, description="Mode of operation.", dataIOOrder=-15, mode=ADVANCED) protected CytoplasmAnalyzer2D.DetectMode detectionMode
@Parameter(label="Max. level count", required=false, direction=IN, description="Maximum levels in iterative mode.", dataIOOrder=-14, mode=ADVANCED) protected int maxLevels
@Parameter(label="Max. distance in voronoi expansion", required=false, direction=IN, description="Maximum expansion during Voronoi dilation.", dataIOOrder=-13, mode=ADVANCED) protected int maxExpansion
@Parameter(label="Min. area growth", required=false, direction=IN, description="Minimum admissible area growth between iterations.", dataIOOrder=-12, mode=ADVANCED) protected double minAreaGrowth
@Parameter(label="Min. intensity variance", required=false, direction=IN, description="Minimum admissible area growth between iterations.", dataIOOrder=-11, mode=ADVANCED) protected double minIntensityVariance
@Parameter(label="Result image", required=true, direction=OUT, description="Result image showing snakes in overlay.") protected transient MTBImageRGB resultImage
@Parameter(label="Result Statistics", required=true, direction=OUT, description="Result data object.") protected transient SegResult_Cytoplasm resultData
@Parameter(label="Show intermediate results", supplemental=true, direction=IN, dataIOOrder=-3, description="Show intermediate results to user.") protected boolean showIntermediateResults
@Parameter(label="Save intermediate results", supplemental=true, direction=IN, dataIOOrder=-2, description="Save intermediate results to disc.") protected boolean saveIntermediateResults
@Parameter(label="Save intermediate results path", supplemental=true, direction=IN, dataIOOrder=-1, description="Path for saving (intermediate) results.") protected String saveIntermediateResultsPath
@Parameter(label="Result snakes", direction=OUT, description="Final snakes.", required=false) protected transient MTBPolygon2DSet resultSnakes
private static final int MinSnakePointNum
private transient int snakeNum
protected transient boolean[] activeSnakes
protected transient int[] colorArray
protected transient MTBPolygon2DSet currentSnakes
private transient MTBImageByte labelImg
private transient int width
private transient int height
private transient int[] snakeArea
public CytoplasmAnalyzer2D() throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
public CytoplasmAnalyzer2D(MTBImage img, MTBPolygon2DSet initS, SnakeOptimizerCoupled snakeObj, CytoplasmAnalyzer2D.DetectMode m, int _maxLevels) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
inImg
- Image to work on.initS
- Set of initial contours.snakeObj
- Snake parameter configuration object.m
- Detection mode.maxLevels
- Maximum number of levels.de.unihalle.informatik.Alida.exceptions.ALDOperatorException
public boolean supportsStepWiseExecution()
supportsStepWiseExecution
in class de.unihalle.informatik.Alida.operator.ALDOperatorControllable
public void setInputImage(MTBImage img)
public void setInitialSnakes(MTBPolygon2DSet snakes)
public int getMaxLevels()
public void setMaxLevels(int maxL)
public void setDetectionMode(CytoplasmAnalyzer2D.DetectMode m)
public void enableShowIntermediateResults()
public void disableShowIntermediateResults()
public void enableSaveIntermediateResults()
public void disableSaveIntermediateResults()
public void setIntermediateResultDirectory(String dir)
public SegResult_Cytoplasm 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
private void runIterativeMode() throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException, de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
Initial contours are first expanded by dilation and then iteratively optimized using snakes. After each iteration region growth is assessed, and if it gets too small, segmentation terminates. If not, contours are again expanded and segmentation continues.
For details see:
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
@Deprecated private void runMeanVarMode() 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.