@ALDAOperator(genericExecutionMode=ALL) public class DrawContour2DSet extends MTBOperator
If no input image is provided, a new image is generated with the background set to zero (black). The default drawing color is red.
Modifier and Type | Field and Description |
---|---|
private Color |
color
Color to be used.
|
private MTBContour2DSet |
inputConts
Set of contours of type
MTBContour2D to draw. |
private MTBImageRGB |
inputImage
Input image into which the contours are to be drawn.
|
private MTBImage |
resultImage
Result image.
|
Constructor and Description |
---|
DrawContour2DSet()
Default constructor.
|
DrawContour2DSet(MTBContour2DSet cs)
Simple constructor with contour set.
|
DrawContour2DSet(MTBContour2DSet cs,
MTBImageRGB img)
Constructor with contour set and image.
|
Modifier and Type | Method and Description |
---|---|
MTBImage |
getResultImage()
Get the resulting region image.
|
protected void |
operate() |
void |
setColor(Color c)
Specify color in which to draw the contours.
|
void |
setInputImage(MTBImageRGB img)
Set input image into which to draw the contours.
|
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="inputContours", required=true, direction=IN, dataIOOrder=1, mode=STANDARD, description="Input contours.") private MTBContour2DSet inputConts
MTBContour2D
to draw.@Parameter(label="inputImage", required=false, direction=IN, dataIOOrder=2, mode=STANDARD, description="Optional input image.") private MTBImageRGB inputImage
@Parameter(label="color", required=false, direction=IN, dataIOOrder=3, mode=STANDARD, description="Optional color.") private Color color
@Parameter(label="resultImage", required=true, direction=OUT, dataIOOrder=1, mode=STANDARD, description="Result image") private MTBImage resultImage
public DrawContour2DSet() throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
- Thrown in case of failure.public DrawContour2DSet(MTBContour2DSet cs) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
cs
- Set of contours to draw.de.unihalle.informatik.Alida.exceptions.ALDOperatorException
- Thrown in case of failure.public DrawContour2DSet(MTBContour2DSet cs, MTBImageRGB img) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
cs
- Set of contours to draw.img
- Target image to which the contours are to be drawn.de.unihalle.informatik.Alida.exceptions.ALDOperatorException
- Thrown in case of failure.public void setInputImage(MTBImageRGB img)
img
- Input image.public void setColor(Color c)
If null, random colors are used.
c
- Color to use.public MTBImage getResultImage()
protected void operate()
operate
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.