@ALDAOperator(genericExecutionMode=ALL, level=APPLICATION, allowBatchMode=false) public class StegerRidgeDetection2DWrapper extends MTBOperator implements loci.common.StatusReporter
Related publication:
For details on parameters and functionality take a look at ...
Modifier and Type | Field and Description |
---|---|
protected boolean |
correctPosition
Correct the line position if it has different contrast on each side of it.
|
protected boolean |
darkLine
If true, dark lines on bright background are extracted.
|
protected boolean |
estimateWidth
If true the widths of the lines are estimated.
|
protected boolean |
extendLine
If true lines are extended.
|
protected double |
highContrast
Highest grayscale value of the line.
|
protected MTBImageByte |
inImg
Input image to be processed.
|
protected double |
lineWidth
Line width.
|
protected double |
lowContrast
Lowest grayscale value of the line.
|
protected double |
lowerThresh
Lower threshold for filter responses.
|
protected double |
maxLineLength
Maximal line length.
|
protected double |
minLineLength
Minimal line length.
|
private static String |
opIdentifier
Identifier for outputs in verbose mode.
|
protected de.biomedical_imaging.ij.steger.OverlapOption |
overlapOpt
Mode for how to resolve overlaps of lines.
|
private MTBImageRGB |
resultImage
Output image.
|
private de.biomedical_imaging.ij.steger.Junctions |
resultJunctions
Detected junction points.
|
private de.biomedical_imaging.ij.steger.Lines |
resultLines
Detected lines.
|
protected double |
sigma
Sigma value of derivatives depending on line width.
|
protected Vector<loci.common.StatusListener> |
statusListeners
Vector of installed StatusListeners.
|
protected double |
upperThresh
Pixels with a response above this threshold are immidiately accepted.
|
Constructor and Description |
---|
StegerRidgeDetection2DWrapper()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addStatusListener(loci.common.StatusListener statuslistener) |
private void |
callBackUpdateSigmaThresholds()
Calculates values for mandatory parameters
sigma ,
upperThresh and lowerThresh from optional parameters
lineWidth , highContrast and lowContrast
in case that one of the values changed. |
static void |
drawResultsToImage(MTBImageRGB image,
de.biomedical_imaging.ij.steger.Lines lines,
de.biomedical_imaging.ij.steger.Junctions junctions,
boolean drawWidth,
boolean showIDs)
Draw results to given image.
|
de.biomedical_imaging.ij.steger.Junctions |
getResultJunctions()
Get detected junctions.
|
de.biomedical_imaging.ij.steger.Lines |
getResultLines()
Get detected lines.
|
void |
notifyListeners(loci.common.StatusEvent e) |
protected void |
operate() |
void |
removeStatusListener(loci.common.StatusListener statuslistener) |
void |
setCorrectPosition(boolean cp)
Specify if to correct line positions.
|
void |
setDarkLine(boolean dark)
Specify if to detect dark lines on bright background.
|
void |
setEstimateWidth(boolean ew)
Specify if to estimate width.
|
void |
setExtendLine(boolean el)
Specify if to extend lines.
|
void |
setHighContrast(double highC)
Specify high contrast.
|
void |
setInputImage(MTBImageByte inputImage)
Specify input image.
|
void |
setLineWidth(double w)
Specify line width.
|
void |
setLowContrast(double lowC)
Specify low contrast.
|
void |
setLowerThresh(double lowerT)
Specify lower threshold.
|
void |
setMaxLineLength(double maxLength)
Specify maximal line length.
|
void |
setMinLineLength(double minLength)
Specify minimal line length.
|
void |
setOverlapOpt(de.biomedical_imaging.ij.steger.OverlapOption overlapOption)
Specify overlap handling mode.
|
void |
setSigma(double s)
Specify sigma value.
|
void |
setUpperThresh(double upperT)
Specify upper threshold.
|
void |
validateCustom() |
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, validateGeneric, writeHistory, writeHistory, writeHistory
private static final String opIdentifier
@Parameter(label="Input Image", required=true, dataIOOrder=0, direction=IN, mode=STANDARD, description="Input image.") protected transient MTBImageByte inImg
@Parameter(label="Sigma", required=true, dataIOOrder=1, direction=IN, mode=STANDARD, description="Sigma of derivatives.") protected double sigma
@Parameter(label="Lower Threshold", required=true, dataIOOrder=2, direction=IN, mode=STANDARD, description="Lower threshold for filter responses.") protected double lowerThresh
@Parameter(label="Upper Threshold", required=true, dataIOOrder=3, direction=IN, mode=STANDARD, description="Upper threshold for filter responses.") protected double upperThresh
@Parameter(label="Minimum Line Length", required=true, dataIOOrder=4, direction=IN, mode=STANDARD, description="Minimum line length.") protected double minLineLength
@Parameter(label="Maximum Line Length", required=true, dataIOOrder=5, direction=IN, mode=STANDARD, description="Maximum line length.") protected double maxLineLength
@Parameter(label="Line Width", required=false, dataIOOrder=1, direction=IN, mode=STANDARD, description="Line width.", callback="callBackUpdateSigmaThresholds", paramModificationMode=MODIFIES_VALUES_ONLY) protected double lineWidth
@Parameter(label="Low Contrast", required=false, dataIOOrder=2, direction=IN, mode=STANDARD, description="Low contrast.", callback="callBackUpdateSigmaThresholds", paramModificationMode=MODIFIES_VALUES_ONLY) protected double lowContrast
@Parameter(label="High Contrast", required=false, dataIOOrder=3, direction=IN, mode=STANDARD, description="High contrast.", callback="callBackUpdateSigmaThresholds", paramModificationMode=MODIFIES_VALUES_ONLY) protected double highContrast
@Parameter(label="Dark Lines on Bright Background?", required=false, dataIOOrder=4, direction=IN, mode=STANDARD, description="Dark lines on bright background.") protected boolean darkLine
@Parameter(label="Correct Position?", required=false, dataIOOrder=5, direction=IN, mode=STANDARD, description="Line positions are corrected.") protected boolean correctPosition
@Parameter(label="Estimate Width?", required=false, dataIOOrder=6, direction=IN, mode=STANDARD, description="If true widths of lines are estimated.") protected boolean estimateWidth
@Parameter(label="Extend Lines?", required=false, dataIOOrder=7, direction=IN, mode=STANDARD, description="If true lines are extended.") protected boolean extendLine
@Parameter(label="Overlap Resolution Mode", required=false, dataIOOrder=8, direction=IN, mode=STANDARD, description="Mode for resolving overlaps of lines.") protected de.biomedical_imaging.ij.steger.OverlapOption overlapOpt
@Parameter(label="Result image", dataIOOrder=3, direction=OUT, description="Result image.") private transient MTBImageRGB resultImage
private transient de.biomedical_imaging.ij.steger.Lines resultLines
private transient de.biomedical_imaging.ij.steger.Junctions resultJunctions
protected transient Vector<loci.common.StatusListener> statusListeners
public StegerRidgeDetection2DWrapper() throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
- Thrown in case of failure.public void validateCustom() throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
validateCustom
in class de.unihalle.informatik.Alida.operator.ALDOperator
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
protected void operate()
operate
in class de.unihalle.informatik.Alida.operator.ALDOperator
public void setInputImage(MTBImageByte inputImage)
inputImage
- Input image to process.public void setSigma(double s)
s
- Sigma value.public void setLowerThresh(double lowerT)
lowerT
- Lower threshold to apply.public void setUpperThresh(double upperT)
upperT
- Upper threshold to apply.public void setMinLineLength(double minLength)
minLength
- The mininmal line length to apply.public void setMaxLineLength(double maxLength)
maxLength
- The maximal line length to apply.public void setLineWidth(double w)
w
- Line width to apply.public void setHighContrast(double highC)
highC
- High contrast value to apply.public void setLowContrast(double lowC)
lowC
- Low contrast value to apply.public void setDarkLine(boolean dark)
dark
- If true dark lines on bright background are assumed.public void setCorrectPosition(boolean cp)
cp
- If true positions will be corrected.public void setEstimateWidth(boolean ew)
ew
- If true line width will be estimated.public void setExtendLine(boolean el)
el
- If true lines will be extended.public void setOverlapOpt(de.biomedical_imaging.ij.steger.OverlapOption overlapOption)
overlapOption
- The option to use for resolving overlaps.public de.biomedical_imaging.ij.steger.Lines getResultLines()
public de.biomedical_imaging.ij.steger.Junctions getResultJunctions()
private void callBackUpdateSigmaThresholds() throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
sigma
,
upperThresh
and lowerThresh
from optional parameters
lineWidth
, highContrast
and lowContrast
in case that one of the values changed.de.unihalle.informatik.Alida.exceptions.ALDOperatorException
- Thrown in case of failure.public static void drawResultsToImage(MTBImageRGB image, de.biomedical_imaging.ij.steger.Lines lines, de.biomedical_imaging.ij.steger.Junctions junctions, boolean drawWidth, boolean showIDs)
This code is adapted from the method
Lines_.displayContours()
.
image
- Image to which to draw the lines.lines
- Lines to draw.junctions
- If not null, junction points to drawdrawWidth
- If true, width of lines is also drawn.showIDs
- If true, IDs are drawn to image.public void addStatusListener(loci.common.StatusListener statuslistener)
addStatusListener
in interface loci.common.StatusReporter
public void notifyListeners(loci.common.StatusEvent e)
notifyListeners
in interface loci.common.StatusReporter
public void removeStatusListener(loci.common.StatusListener statuslistener)
removeStatusListener
in interface loci.common.StatusReporter
Copyright © 2010–2020 Martin Luther University Halle-Wittenberg, Institute of Computer Science, Pattern Recognition and Bioinformatics. All rights reserved.