@ALDAOperator(genericExecutionMode=ALL, level=STANDARD) public class DrawStringToImage extends MTBOperator
Modifier and Type | Field and Description |
---|---|
private Color |
color
Color to use.
|
private MTBImage |
inImg
Input image to which the string is to be drawn.
|
private Point2D.Double |
position
Position where to draw the string.
|
private MTBImage |
resultImg
Result image.
|
private String |
text
String to draw into the image.
|
Constructor and Description |
---|
DrawStringToImage()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
MTBImage |
getResultImage()
Get result image.
|
void |
operate() |
void |
setColor(Color c)
Specify color.
|
void |
setInImage(MTBImage img)
Specify input image.
|
void |
setString(String t)
Specify string.
|
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
@Parameter(label="Input Image", required=true, direction=IN, description="Input image.", dataIOOrder=0) private transient MTBImage inImg
@Parameter(label="String", required=true, direction=IN, description="String to draw.", dataIOOrder=1) private String text
@Parameter(label="Position", required=true, direction=IN, description="Position where to draw the string.", dataIOOrder=2) private Point2D.Double position
@Parameter(label="Color", required=false, direction=IN, description="Optional color for text.", dataIOOrder=0) private Color color
@Parameter(label="Output Image", direction=OUT, description="Result image.", dataIOOrder=0) private transient MTBImage resultImg
public DrawStringToImage() 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
public void operate()
operate
in class de.unihalle.informatik.Alida.operator.ALDOperator
public void setInImage(MTBImage img)
img
- Input image.public void setString(String t)
t
- String to draw.public void setColor(Color c)
c
- Color to use.public MTBImage getResultImage()
Copyright © 2010–2020 Martin Luther University Halle-Wittenberg, Institute of Computer Science, Pattern Recognition and Bioinformatics. All rights reserved.