protected class SnakeHelperOperators.MaskMaker extends MTBOperator
The mask will have size (width x height) and the area enclosed by the polygon will be filled in white. The background will be filled in black. The orientation of the polygon is not considered here. Note that undefined behavior will result if applied to non-closed snakes.
Modifier and Type | Field and Description |
---|---|
private MTBSnake |
inSnake
Input snake.
|
private int |
maskHeight
Height of the mask to be generated.
|
private int |
maskWidth
Width of the mask to be generated.
|
private int[][] |
outMask
Generated mask.
|
private int |
xOffset
x-offset of the mask coordinate system.
|
private int |
yOffset
y-offset of the mask coordinate system.
|
Constructor and Description |
---|
MaskMaker(MTBSnake input,
int w,
int h)
Default constructor with zero offsets.
|
MaskMaker(MTBSnake input,
int xoff,
int yoff,
int w,
int h)
Constructor with non-zero offsets.
|
Modifier and Type | Method and Description |
---|---|
protected int[][] |
getResultMask()
Returns generated mask.
|
protected void |
operate() |
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="inSnake", direction=IN, required=true, description="Input snake.") private MTBSnake inSnake
@Parameter(label="outMask", direction=OUT, description="Output mask.") private int[][] outMask
@Parameter(label="maskWidth", direction=IN, required=true, description="Width of the mask.") private int maskWidth
@Parameter(label="maskHeight", direction=IN, required=true, description="Height of the mask.") private int maskHeight
@Parameter(label="xOffset", direction=IN, required=false, description="Origin offset in x.") private int xOffset
@Parameter(label="yOffset", direction=IN, required=false, description="Origin offset in y.") private int yOffset
MaskMaker(MTBSnake input, int w, int h) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
input
- Snake for which the mask is to be generated.w
- Width of mask array.h
- Height of mask array.de.unihalle.informatik.Alida.exceptions.ALDOperatorException
MaskMaker(MTBSnake input, int xoff, int yoff, int w, int h) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
input
- Snake for which the mask is to be generated.xoff
- Offset in x direction, 1st column will have this coordinate.yoff
- Offset in y direction, 1st row will have this coordinate.w
- Width of mask array.h
- Height of mask array.de.unihalle.informatik.Alida.exceptions.ALDOperatorException
Copyright © 2010–2020 Martin Luther University Halle-Wittenberg, Institute of Computer Science, Pattern Recognition and Bioinformatics. All rights reserved.