|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.unihalle.informatik.Alida.operator.ALDOperator
de.unihalle.informatik.MiToBo.core.operator.MTBOperator
de.unihalle.informatik.MiToBo.segmentation.snakes.datatypes.SnakeHelperOperators.MaskMaker
protected class SnakeHelperOperators.MaskMaker
Operator class to generate 2D array mask for snake interior.
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.
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 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. |
Fields inherited from class de.unihalle.informatik.Alida.operator.ALDOperator |
---|
completeDAG, name, portHashAccess, verbose, versionProvider |
Constructor Summary | |
---|---|
SnakeHelperOperators.MaskMaker(MTBSnake input,
int w,
int h)
Default constructor with zero offsets. |
|
SnakeHelperOperators.MaskMaker(MTBSnake input,
int xoff,
int yoff,
int w,
int h)
Constructor with non-zero offsets. |
Method Summary | |
---|---|
protected int[][] |
getResultMask()
Returns generated mask. |
protected void |
operate()
|
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 |
---|
@Parameter(label="inSnake", direction=IN, required=true, description="Input snake.") private MTBSnake inSnake
@Parameter(label="maskHeight", direction=IN, required=true, description="Height of the mask.") private int maskHeight
@Parameter(label="maskWidth", direction=IN, required=true, description="Width of the mask.") private int maskWidth
@Parameter(label="outMask", direction=OUT, description="Output mask.") private int[][] outMask
@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
Constructor Detail |
---|
SnakeHelperOperators.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
SnakeHelperOperators.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
Method Detail |
---|
protected int[][] getResultMask()
protected void operate()
operate
in class de.unihalle.informatik.Alida.operator.ALDOperator
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |