@ALDAOperator(genericExecutionMode=ALL,
level=APPLICATION)
public class ImgOpen
extends MTBOperator
If the given image only contains two pixel values it is interpreted as binary image. In the resulting image the background pixels will be set to the smaller value, while the foreground pixels will be set to the larger ones.
The structuring element is a square matrix of size 'masksize' x 'masksize', with reference pixel in the center of the matrix. Attention: if masksize is even, errors may result due to lack of operator symmetry
| Modifier and Type | Field and Description |
|---|---|
private MTBImage |
inImg |
private int |
masksize |
private MTBImage |
resultImg |
| Constructor and Description |
|---|
ImgOpen()
Default constructor.
|
ImgOpen(MTBImage inimg,
int ms)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
MTBImage |
getInputImage()
Returns the input image, null if not set.
|
int |
getMasksize()
Returns the given mask size, 0 if not set.
|
MTBImage |
getResultImage()
Returns the opened image, null if not available.
|
protected void |
operate()
This method does the actual work.
|
private void |
setResultImage(MTBImage result)
Set result image.
|
readResolveaddOperatorExecutionProgressEventListener, 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="Masksize",
required=true,
dataIOOrder=1,
direction=IN,
description="Masksize")
private int masksize
@Parameter(label="Input Image",
required=true,
dataIOOrder=0,
direction=IN,
description="Input image")
private transient MTBImage inImg
@Parameter(label="Result Image",
required=true,
direction=OUT,
description="Result image")
private transient MTBImage resultImg
public ImgOpen()
throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDOperatorExceptionpublic ImgOpen(MTBImage inimg, int ms) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
inimg - Input image.ms - Size of square mask.de.unihalle.informatik.Alida.exceptions.ALDOperatorExceptionpublic MTBImage getInputImage()
public int getMasksize()
public MTBImage getResultImage()
private void setResultImage(MTBImage result)
protected void operate()
throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException,
de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
operate in class de.unihalle.informatik.Alida.operator.ALDOperatorde.unihalle.informatik.Alida.exceptions.ALDOperatorExceptionde.unihalle.informatik.Alida.exceptions.ALDProcessingDAGExceptionCopyright © 2010–2020 Martin Luther University Halle-Wittenberg, Institute of Computer Science, Pattern Recognition and Bioinformatics. All rights reserved.