@ALDAOperator(genericExecutionMode=NONE) public class NucleusSeparator2DPeakSearch_RegionSeparator extends MTBOperator
The data will be transformed into a distance map in which the peaks are analyzed and compared to identify overlapping nuclei.
The result will be center-coordinates of all nuclei in the data. Furthermore the regions may be divided or initial regions for further analysis may be delivered.
This operator has been written as part of Jochen's project in WS 2011/12.
Modifier and Type | Field and Description |
---|---|
private boolean[][] |
blacklist |
private MTBRegion2DSet |
candidates |
private MTBImage |
distImg
Calculated distance map.
|
private DistanceTransform.DistanceMetric |
distmet
Metric for distance map calculation.
|
private MTBImage |
inImg
Binary input image to be analyzed.
|
private MTBRegion2DSet |
inputRegions
Optional set of pre-segmented input regions.
|
private double |
mad
Maximal allowed discrepancy.
|
private double |
max_d2c
Maximum peak distance factor.
|
boolean |
report |
private int |
res_x |
private int |
res_y |
private MTBRegion2DSet[] |
resultAreas |
private MTBRegion2DSet |
resultCenters
Set of detected nuclei centers.
|
private MTBRegion2DSet[] |
resultRegCenters
Nuclei centers sorted according to former regions.
|
private double |
schwelle
Threshold to suppress peak analysis close to scraggy contours.
|
private boolean[][] |
seen |
private MTBPolygon2DSet |
snakePrimerEllipse
Set of elliptical snake polygons.
|
private MTBPolygon2DSet |
snakePrimerVoronoi
Set of snake polygons based on Voronoi tesselation.
|
Constructor and Description |
---|
NucleusSeparator2DPeakSearch_RegionSeparator()
Default constructor.
|
NucleusSeparator2DPeakSearch_RegionSeparator(MTBImageByte image)
Constructor with input image.
|
NucleusSeparator2DPeakSearch_RegionSeparator(MTBRegion2DSet oset)
Constructor with region set.
|
Modifier and Type | Method and Description |
---|---|
private void |
ellipsoidSnakePrimer()
Function to extract elliptical snake primers.
|
MTBRegion2DSet |
getCandidates()
Returns set of detected candidate peaks.
|
MTBImage |
getDistImg()
Returns calculated distance map.
|
MTBPolygon2DSet |
getEllipsoidSnakePrimer()
Returns set of initial snake ellipses.
|
MTBRegion2DSet |
getInputRegs()
Get set of input regions.
|
MTBRegion2DSet[] |
getRegCenters()
Returns the centers of the nuclei sorted to their original regions.
|
MTBRegion2DSet[] |
getResultAreas()
Returns separated regions sorted according to original regions.
|
MTBRegion2DSet |
getResultCenters()
Returns centers of result regions.
|
MTBPolygon2DSet |
getVoronoidSnakePrimer()
Returns set of snake polygons resulting from Voronoi tesselation.
|
private boolean |
gratwanderung(int x,
int y,
MTBRegion2D tempreg)
Function to travers ridges.
|
private void |
makeline(int xstart,
int ystart,
int xend,
int yend,
Vector<Point2D.Double> line)
Draws a line between two points.
|
protected void |
operate() |
private void |
regionVoronoize()
Function to perform Voronoi tesselation.
|
void |
setDistmet(DistanceTransform.DistanceMetric _distmet)
Specify the metric for the distance transformation.
|
void |
setInImg(MTBImageByte _inImg)
Specify binary input image.
|
void |
setInputRegs(MTBRegion2DSet _inputRegions)
Specify set of input regions.
|
void |
setMad(double _mad)
Sets maximal allowed discrepancy of direct connection to actual
profile between two peaks.
|
void |
setMax_d2c(double _max_d2c)
Sets factor to adjust maximal allowed distance from lower to upper peak.
|
void |
setSuppressor(int sup)
Sets threshold to suppress peak analysis close to scraggy contours.
|
private void |
voronoidSnakePrimer()
Function to extract Voronoi primers.
|
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
@Parameter(label="Input Image", required=true, direction=IN, dataIOOrder=1, mode=STANDARD, description="Binary input image.") private transient MTBImage inImg
@Parameter(label="Input Regions", required=false, direction=INOUT, dataIOOrder=1, mode=ADVANCED, description="Input nuclei regions.") private transient MTBRegion2DSet inputRegions
@Parameter(label="Significance Threshold for Peaks", required=false, direction=IN, mode=ADVANCED, description="Threshold to suppress peak analysis close to scraggy contours (should be >4).") private double schwelle
@Parameter(label="Maximum Peak Distance Factor", required=false, direction=IN, mode=ADVANCED, description="Factor to adjust maximal allowed distance from lower to upper peak.") private double max_d2c
@Parameter(label="Maximal Allowed Discrepancy", required=false, direction=IN, mode=ADVANCED, description="Max. allowed discrepancy of direct connection to actual profile.") private double mad
@Parameter(label="Distance Metric", required=false, direction=IN, mode=ADVANCED, description="Distance metric.") private DistanceTransform.DistanceMetric distmet
@Parameter(label="Distance Map", required=false, direction=OUT, description="Distance Map.") private transient MTBImage distImg
@Parameter(label="Nuclei Centers", required=false, direction=OUT, description="Centers of all detected nuclei.") private transient MTBRegion2DSet resultCenters
@Parameter(label="Nuclei Centers of former regions", required=false, direction=OUT, description="Centers of detected nuclei seperated in their former regions") private transient MTBRegion2DSet[] resultRegCenters
@Parameter(label="Elliptic Snake Initialisations", required=false, direction=OUT, description="Set of elliptical snake polygons.") private transient MTBPolygon2DSet snakePrimerEllipse
@Parameter(label="Snake Initialisation by Voronoi", required=false, direction=OUT, description="Snake polygons from Voronoi-tesselated regions.") private transient MTBPolygon2DSet snakePrimerVoronoi
private transient int res_x
private transient int res_y
private transient boolean[][] blacklist
private transient boolean[][] seen
public transient boolean report
private transient MTBRegion2DSet[] resultAreas
private transient MTBRegion2DSet candidates
public NucleusSeparator2DPeakSearch_RegionSeparator() throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
public NucleusSeparator2DPeakSearch_RegionSeparator(MTBImageByte image) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
image
- Binary input image.de.unihalle.informatik.Alida.exceptions.ALDOperatorException
public NucleusSeparator2DPeakSearch_RegionSeparator(MTBRegion2DSet oset) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
Note: the set needs correct referenced dimensions!
oset
- Set of input regions.de.unihalle.informatik.Alida.exceptions.ALDOperatorException
public void setInImg(MTBImageByte _inImg)
inImg
- Binary input image.public MTBRegion2DSet getInputRegs()
public void setInputRegs(MTBRegion2DSet _inputRegions)
inputRegions
- Set of input regions.public MTBImage getDistImg()
public MTBRegion2DSet getResultCenters()
public MTBRegion2DSet getCandidates()
public void setMax_d2c(double _max_d2c)
max_d2c
- Adjustment factor, default is 1.5.public void setMad(double _mad)
mad
- Max. discrepancy, default is 0.11.public void setDistmet(DistanceTransform.DistanceMetric _distmet)
distmet
- Distance metric, default is Chessboard-Distance.public void setSuppressor(int sup)
sup
- Threshold, should be >4.public MTBRegion2DSet[] getRegCenters()
public MTBRegion2DSet[] getResultAreas()
public MTBPolygon2DSet getVoronoidSnakePrimer() 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 MTBPolygon2DSet getEllipsoidSnakePrimer()
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 voronoidSnakePrimer() 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
private void regionVoronoize()
private void ellipsoidSnakePrimer()
private boolean gratwanderung(int x, int y, MTBRegion2D tempreg)
x
- x-coordinate to check.y
- y-coordinate to check.tempreg
- Region to check.private void makeline(int xstart, int ystart, int xend, int yend, Vector<Point2D.Double> line)
xstart
- Start point x-coordinate.ystart
- Start point x-coordinate.xend
- End point x-coordinate.yend
- End point y-coordinate.line
- Points in between.Copyright © 2010–2020 Martin Luther University Halle-Wittenberg, Institute of Computer Science, Pattern Recognition and Bioinformatics. All rights reserved.