@ALDAOperator(genericExecutionMode=ALL, shortDescription="Routines for separating conglomerates of cell nuclei in 2D.") @ALDDerivedClass public class NucleusSeparator2DBeamCut extends NucleusSeparator2DAlgos
This operator is not supposed to be directly executed in a generic fashion.
Use the operator NucleusSeparator2D
instead.
Modifier and Type | Class and Description |
---|---|
static class |
NucleusSeparator2DBeamCut.NuclSeparateMode
Available modes for nuclei separation in 2D images.
|
Modifier and Type | Field and Description |
---|---|
private int |
debug |
private boolean |
doErosion |
private int |
erodeSize |
private int |
minSize |
private double |
minSizeFraction |
private NucleusSeparator2DBeamCut.NuclSeparateMode |
opMode
Operation mode of this separator.
|
private int |
sizeDilation |
private int |
sizeOpening |
private int |
sizeTH |
private double |
thresTH |
(package private) MTBImage |
tmpImg
temp. binary image
|
inputImg, labelImg, resultImg
Constructor and Description |
---|
NucleusSeparator2DBeamCut()
Default constructor
|
NucleusSeparator2DBeamCut(MTBImage labelImg)
Constructor.
|
NucleusSeparator2DBeamCut(MTBImage labelImg,
NucleusSeparator2DBeamCut.NuclSeparateMode opMode)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
private double[] |
dilate1D(double[] x,
int size) |
private double[] |
erode1D(double[] x,
int size) |
private void |
erodeComponent(int label,
int size)
erode one component with given label
|
private int[] |
estimateMean(int label)
Suche nach bestem Mittelpunkt des Embryos: ueberpruefe kreisfoermige Raster (8 Punkte +Mittelpunkt des Bildes) um Bildmittelpunkt aus
Kriterium: max. min.
|
private double |
euklidDist(double x1,
double y1,
double x2,
double y2)
Hilfsmethode zur Bestimmung der euklidischen Distanz zw. 2 Punkten
|
private double[] |
getCentroid(MTBImage img,
int label)
auxiliary method to determine the centroid (x,y) and width/heigth of compoment with label
in a double array of length 4
(should go in class/record)
|
int |
getDebug()
Get value of debug.
|
String |
getDocumentation() |
boolean |
getDoErosion()
Get value of doErosion.
|
int |
getErodeSize()
Get value of erodeSize.
|
MTBImage |
getLabelImg()
Get value of labelImg.
|
int |
getMinSize()
Get value of minSize.
|
double |
getMinSizeFraction()
Get value of minSizeFraction.
|
NucleusSeparator2DBeamCut.NuclSeparateMode |
getOpMode()
Get value of opMode.
|
private int |
getSize(int label) |
int |
getSizeDilation()
Get value of sizeDilation.
|
int |
getSizeOpening()
Get value of sizeOpening.
|
int |
getSizeTH()
Get value of sizeTH.
|
double |
getThresTH()
Get value of thresTH.
|
private void |
keepLargestCC(MTBImage img,
int label)
remove all but the largest connected component with label
|
private double[] |
open1D(double[] x,
int size) |
protected void |
operate() |
private int |
resetLabel(int fromLabel,
int toLabel) |
private int |
separate(int label,
int nextLabel)
try to separate component with label
2.
|
void |
setDebug(int value)
Set value of debug.
|
void |
setDoErosion(boolean value)
Set value of doErosion.
|
void |
setErodeSize(int value)
Set value of erodeSize.
|
void |
setLabelImg(MTBImage value)
Set value of labelImg.
|
void |
setMinSize(int value)
Set value of minSize.
|
void |
setMinSizeFraction(double value)
Set value of minSizeFraction.
|
void |
setOpMode(NucleusSeparator2DBeamCut.NuclSeparateMode value)
Set value of opMode.
|
void |
setSizeDilation(int value)
Set value of sizeDilation.
|
void |
setSizeOpening(int value)
Set value of sizeOpening.
|
void |
setSizeTH(int value)
Set value of sizeTH.
|
void |
setThresTH(double value)
Set value of thresTH.
|
private double[] |
topHat1D(double[] x,
int size) |
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="Operator mode", required=true, direction=IN, description="Operator separation mode.") private NucleusSeparator2DBeamCut.NuclSeparateMode opMode
@Parameter(label="Tophat size", required=false, direction=IN, description="Size of structuring element for top hat on distances.") private int sizeTH
@Parameter(label="Tophat threshold", required=false, direction=IN, description="Threshold for result from top hat.") private double thresTH
@Parameter(label="Opening mask size", required=false, direction=IN, description="Size of structuring element for opening on cutpoint hypotheses.") private int sizeOpening
@Parameter(label="Dilation mask size", required=false, direction=IN, description="Size of structuring element for dilation on cutpoint hypotheses.") private int sizeDilation
@Parameter(label="Minimum nuclei size", required=false, direction=IN, description="Minimum size of each nucleus after separation, otherwise undo separation") private int minSize
@Parameter(label="Minimum fraction size", required=false, direction=IN, description="Minimum size fraction of each nucleus after separation, otherwise undo separation.") private double minSizeFraction
@Parameter(label="Do erosion", required=false, direction=IN, description="Erode each nucleus resulting from a separation.") private boolean doErosion
@Parameter(label="Erode mask size", required=false, direction=IN, description="Size of structuring element for eroding a nucleus from a separation.") private int erodeSize
@Parameter(label="Debug mode.", required=false, direction=IN, supplemental=true, description="Flag for debugging output.") private int debug
transient MTBImage tmpImg
public NucleusSeparator2DBeamCut() throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
public NucleusSeparator2DBeamCut(MTBImage labelImg) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
public NucleusSeparator2DBeamCut(MTBImage labelImg, NucleusSeparator2DBeamCut.NuclSeparateMode opMode) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
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
private int separate(int label, int nextLabel) 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 int[] estimateMean(int label)
private double euklidDist(double x1, double y1, double x2, double y2)
x1
- doubley1
- doublex2
- doubley2
- doubleprivate double[] getCentroid(MTBImage img, int label)
img
- label
- private double[] erode1D(double[] x, int size)
private double[] dilate1D(double[] x, int size)
private double[] open1D(double[] x, int size)
private double[] topHat1D(double[] x, int size)
private int getSize(int label)
private int resetLabel(int fromLabel, int toLabel)
private void keepLargestCC(MTBImage img, int label) 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 double getThresTH()
public void setThresTH(double value)
value
- New value of thresTHpublic double getMinSizeFraction()
public void setMinSizeFraction(double value)
value
- New value of minSizeFractionpublic int getSizeOpening()
public void setSizeOpening(int value)
value
- New value of sizeOpeningpublic int getSizeTH()
public void setSizeTH(int value)
value
- New value of sizeTHpublic int getMinSize()
public void setMinSize(int value)
value
- New value of minSizepublic int getSizeDilation()
public void setSizeDilation(int value)
value
- New value of sizeDilationpublic NucleusSeparator2DBeamCut.NuclSeparateMode getOpMode()
public void setOpMode(NucleusSeparator2DBeamCut.NuclSeparateMode value)
value
- New value of opModepublic MTBImage getLabelImg()
public void setLabelImg(MTBImage value)
value
- New value of labelImgpublic int getDebug()
public void setDebug(int value)
value
- New value of debugpublic int getErodeSize()
public void setErodeSize(int value)
value
- New value of erodeSizepublic boolean getDoErosion()
public void setDoErosion(boolean value)
value
- New value of doErosionprivate void erodeComponent(int label, int size) 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.