@ALDAOperator(genericExecutionMode=ALL, level=APPLICATION, allowBatchMode=false) public class CellBoundaryExtractor2D extends MTBOperator
This operator basically applies a vesselness filter to extract boundaries of cells in microtubuli experiments. As tubular and vessel-like structures not only appear along the cell boundaries the results require (manual) post-processing including gap closing, removing false detections, skeleton extraction and spine removal.
Modifier and Type | Class and Description |
---|---|
static class |
CellBoundaryExtractor2D.BorderBackgroundContrast
Border color.
|
static class |
CellBoundaryExtractor2D.OperationMode
Operation mode of the operator.
|
Modifier and Type | Field and Description |
---|---|
private MTBImageByte |
binFilteredImg
Intermediate result: binarized vesselness image after filtering.
|
private MTBImageByte |
binVesselImg
Intermediate result: binarized vesselness image.
|
CellBoundaryExtractor2D.BorderBackgroundContrast |
borderContrast
Border to background relation.
|
private int |
boundaryChannel
Channel of input image containing stained cell boundaries.
|
private MTBRegion2DSet |
cellContours
Set of extracted regions.
|
private MTBImage |
cellLabelImg
Label image of extracted cell regions.
|
private int |
height
Height of the input image.
|
private de.unihalle.informatik.Alida.datatypes.ALDDirectoryString |
inDir
Input directory where to find the images to process in batch mode.
|
private MTBImage |
inImg
Input grayscale image/stack to process.
|
private MTBImageByte |
initialSkelImg
Intermediate result: initial contour skeleton.
|
private int |
maximalCellSize
Threshold for the maximal admissible cell size.
|
private int |
minimalCellSize
Threshold for the minimal admissible cell size.
|
private static String |
operatorID
Identifier string for this operator class.
|
CellBoundaryExtractor2D.OperationMode |
operatorMode
Mode of operation of the operator.
|
private MTBImageByte |
resultBinFilteredImg
Filtered binary vesselness image.
|
private MTBImageByte |
resultBinVesselImg
Binarized vesselness image.
|
private MTBRegion2DSet |
resultCellContours
ROI set of detected cell regions.
|
private MTBImage |
resultCellLabelImg
Label image of detected cell regions.
|
private MTBImageByte |
resultInitialSkeletonImg
Initial skeleton image.
|
private MTBImageByte |
resultSkelImg
Skeleton image (of cell boundaries).
|
private MTBImageByte |
resultVesselImg
Result of applying the vesselness filter to the input image.
|
private boolean |
showAdditionalResultImages
Flag to enable/disable showing additional and intermediate result
images.
|
private MTBImageByte |
skelImg
Intermediate result: final contour skeleton.
|
private MTBImageByte |
vesselImg
Intermediate result: vesselness image.
|
private int |
width
Width of the input image.
|
Constructor and Description |
---|
CellBoundaryExtractor2D()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
private MTBImageByte |
applyVesselnessFilter(MTBImage img)
Gaussian smoothing and vesselness enhancement filtering.
|
private MTBImageByte |
closeGapsNativeLinks(MTBImageByte inSkelImg)
Close gaps by native linkage.
|
private MTBImageByte |
enhanceBoundaries(MTBImage img)
Enhance cell boundaries by applying a vesselness enhancement filter.
|
static Vector<Point2D.Double> |
findEndpoints(MTBImageByte img)
Detect end-points in binary image.
|
protected void |
operate() |
private void |
postProcessImage(MTBImage img)
Post-process the vesselness filter result.
|
private void |
processImage(MTBImage im)
Main image analysis routine.
|
private void |
switchOpModeParameters()
Callback routine to change operator mode parameters.
|
readResolve
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, validateCustom, validateGeneric, writeHistory, writeHistory, writeHistory
private static final String operatorID
@Parameter(label="Operation Mode", required=true, direction=IN, dataIOOrder=-5, description="Operation mode of the operator.", callback="switchOpModeParameters", paramModificationMode=MODIFIES_INTERFACE) public CellBoundaryExtractor2D.OperationMode operatorMode
@Parameter(label="Input Directory", required=true, direction=IN, description="Input directory.", dataIOOrder=-3) private de.unihalle.informatik.Alida.datatypes.ALDDirectoryString inDir
@Parameter(label="Input Image", required=true, direction=IN, description="Input image.", dataIOOrder=-3) private transient MTBImage inImg
@Parameter(label="Cell Boundary Channel", required=true, direction=IN, dataIOOrder=-2, description="Boundary Channel, e.g., 1, 2 and so on.") private int boundaryChannel
@Parameter(label="Border Contrast", required=true, direction=IN, dataIOOrder=3, description="Contrast of cell boundaries wrt to background.") public CellBoundaryExtractor2D.BorderBackgroundContrast borderContrast
@Parameter(label="Minimal Size of Cells", required=true, direction=IN, dataIOOrder=4, description="Cells smaller than this threshold are discarded.") private int minimalCellSize
Cell regions falling below this threshold are ignored.
@Parameter(label="Maximal Size of Cells", required=true, direction=IN, dataIOOrder=5, description="Cells larger than this threshold are discarded.") private int maximalCellSize
Cell regions lying above this threshold are ignored.
@Parameter(label="Show/save additional results?", required=false, supplemental=true, direction=IN, dataIOOrder=-1, mode=STANDARD, description="Enable/disable showing/saving additional results.") private boolean showAdditionalResultImages
@Parameter(label="Label Image of Detected Cell Regions", dataIOOrder=0, direction=OUT, description="Label image of detected cell regions.") private transient MTBImage resultCellLabelImg
@Parameter(label="Detected Cell Region Contours", dataIOOrder=1, direction=OUT, description="Cell region contours in ImageJ ROI format.") private transient MTBRegion2DSet resultCellContours
@Parameter(label="Vessels", dataIOOrder=2, direction=OUT, description="Result image of vesselness enhancement filter.") private transient MTBImageByte resultVesselImg
@Parameter(label="Binarized Vesselness Image", dataIOOrder=4, direction=OUT, description="Binarized vesselness image.") private transient MTBImageByte resultBinVesselImg
@Parameter(label="Filtered Binary Vesselness Image", dataIOOrder=5, direction=OUT, description="Filtered binary vesselness image.") private transient MTBImageByte resultBinFilteredImg
@Parameter(label="Initial skeleton image before post-processing.", dataIOOrder=6, direction=OUT, description="Initial skeleton image.") private transient MTBImageByte resultInitialSkeletonImg
@Parameter(label="Skeleton Image", dataIOOrder=7, direction=OUT, description="Skeleton image.") private transient MTBImageByte resultSkelImg
private transient int width
private transient int height
private transient MTBImage cellLabelImg
private transient MTBRegion2DSet cellContours
private transient MTBImageByte vesselImg
private transient MTBImageByte binVesselImg
private transient MTBImageByte binFilteredImg
private transient MTBImageByte initialSkelImg
private transient MTBImageByte skelImg
public CellBoundaryExtractor2D() throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
- Thrown if construction fails.private void switchOpModeParameters()
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 processImage(MTBImage im) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException, de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
im
- Image (stack) to process.de.unihalle.informatik.Alida.exceptions.ALDOperatorException
- Thrown in case of failure.de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
- Thrown in case of failure.private MTBImageByte enhanceBoundaries(MTBImage img) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException, de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
img
- Input grayscale image to process.de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
- Thrown in case of failure.de.unihalle.informatik.Alida.exceptions.ALDOperatorException
- Thrown in case of failure.private MTBImageByte applyVesselnessFilter(MTBImage img) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException, de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
img
- Image to process.de.unihalle.informatik.Alida.exceptions.ALDOperatorException
- Thrown in case of processing failure.de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
- Thrown in case of problems with processing history.private void postProcessImage(MTBImage img) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException, de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
img
- Image to process.de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
- Thrown in case of failure.de.unihalle.informatik.Alida.exceptions.ALDOperatorException
- Thrown in case of failure.private MTBImageByte closeGapsNativeLinks(MTBImageByte inSkelImg)
inSkelImg
- Skeleton image.public static Vector<Point2D.Double> findEndpoints(MTBImageByte img)
img
- Input image.Copyright © 2010–2020 Martin Luther University Halle-Wittenberg, Institute of Computer Science, Pattern Recognition and Bioinformatics. All rights reserved.