de.unihalle.informatik.MiToBo.drawing
Class DrawPolygon2DSet

java.lang.Object
  extended by de.unihalle.informatik.Alida.operator.ALDOperator
      extended by de.unihalle.informatik.MiToBo.core.operator.MTBOperator
          extended by de.unihalle.informatik.MiToBo.drawing.DrawPolygon2DSet
All Implemented Interfaces:
de.unihalle.informatik.Alida.datatypes.ALDConfigurationValidator

@ALDAOperator
public class DrawPolygon2DSet
extends MTBOperator

A class to visualize 2D polygons.

Background is always set to 0, polygons are drawn in red.

Author:
moeller

Nested Class Summary
 
Nested classes/interfaces inherited from class de.unihalle.informatik.Alida.operator.ALDOperator
de.unihalle.informatik.Alida.operator.ALDOperator.HidingMode
 
Field Summary
private  java.lang.String color
           
private  MTBImageRGB inputImage
           
private  MTBPolygon2DSet inputPolys
           
private  MTBImage resultImage
           
 
Fields inherited from class de.unihalle.informatik.Alida.operator.ALDOperator
completeDAG, name, portHashAccess, verbose, versionProvider
 
Constructor Summary
DrawPolygon2DSet()
          Default constructor.
DrawPolygon2DSet(MTBPolygon2DSet ps)
          Simple constructor.
DrawPolygon2DSet(MTBPolygon2DSet ps, MTBImageRGB img)
          Complete constructor.
 
Method Summary
 MTBImage getResultImage()
          Get the resulting region image.
protected  void operate()
           
 void setColor(java.lang.String c)
          Specify color in which to draw the snakes.
 
Methods inherited from class de.unihalle.informatik.MiToBo.core.operator.MTBOperator
readResolve
 
Methods inherited from class de.unihalle.informatik.Alida.operator.ALDOperator
deserializeFromXmlFile, fieldContained, getALDPortHashAccessKey, getConstructionMode, getInInoutNames, getInInoutNames, getInNames, getInOutNames, getMissingRequiredInputs, getName, getNumParameters, getOutInoutNames, getOutNames, getParameter, getParameterDescriptor, getParameterNames, getSupplementalNames, getVerbose, getVersion, isConfigured, parametersToXmlObject, print, print, print, printInterface, printInterface, readHistory, reinitializeParameterDescriptors, runOp, runOp, runOp, serializeToXmlFile, setConstructionMode, setName, setParameter, setParametersFromXml, setParametersFromXml, setVerbose, toStringVerbose, unconfiguredItems, validate, validateCustom, validateGeneric, writeHistory, writeHistory, writeHistory, writeParametersToXml
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

color

@Parameter(label="color",
           required=false,
           direction=IN,
           dataIOOrder=3,
           mode=STANDARD,
           description="Optional color.")
private java.lang.String color

inputImage

@Parameter(label="inputImage",
           required=false,
           direction=IN,
           dataIOOrder=2,
           mode=STANDARD,
           description="Optional input image.")
private MTBImageRGB inputImage

inputPolys

@Parameter(label="inputPolygons",
           required=true,
           direction=IN,
           dataIOOrder=1,
           mode=STANDARD,
           description="Input polygons.")
private MTBPolygon2DSet inputPolys

resultImage

@Parameter(label="resultImage",
           required=true,
           direction=OUT,
           dataIOOrder=1,
           mode=STANDARD,
           description="Result image")
private MTBImage resultImage
Constructor Detail

DrawPolygon2DSet

public DrawPolygon2DSet()
                 throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
Default constructor.

Throws:
de.unihalle.informatik.Alida.exceptions.ALDOperatorException

DrawPolygon2DSet

public DrawPolygon2DSet(MTBPolygon2DSet ps)
                 throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
Simple constructor.

Throws:
de.unihalle.informatik.Alida.exceptions.ALDOperatorException

DrawPolygon2DSet

public DrawPolygon2DSet(MTBPolygon2DSet ps,
                        MTBImageRGB img)
                 throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
Complete constructor.

Throws:
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
Method Detail

getResultImage

public MTBImage getResultImage()
Get the resulting region image.


operate

protected void operate()
Specified by:
operate in class de.unihalle.informatik.Alida.operator.ALDOperator

setColor

public void setColor(java.lang.String c)
Specify color in which to draw the snakes.

Known colors are: red, green, blue, yellow, white