|
||||||||
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.morphology.ImgDilate
@ALDAOperator(genericExecutionMode=ALL, level=APPLICATION) public class ImgDilate
This class implements morphological dilation on 2D binary/grayscale images.
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
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 MTBImage |
inImg
|
private int |
masksize
|
private MTBImage |
resultImg
|
Fields inherited from class de.unihalle.informatik.Alida.operator.ALDOperator |
---|
completeDAG, name, portHashAccess, verbose, versionProvider |
Constructor Summary | |
---|---|
ImgDilate()
Default constructor. |
|
ImgDilate(MTBImage inimg,
int ms)
Constructor. |
Method Summary | |
---|---|
private MTBImage |
applyMask(MTBImage mImg,
int msize)
Invokes dilation. |
private MTBImage |
applyMaskBinary(MTBImage img,
int msize,
int minVal,
int maxVal)
Applies a dilation mask to the given binary image. |
private MTBImage |
applyMaskGray(MTBImage mImg,
int msize)
Applies a dilation mask to the given intensity image. |
MTBImage |
getInputImage()
Get value of inImg. |
int |
getMasksize()
Get value of masksize. |
MTBImage |
getResultImage()
Get value of resultImg. |
protected void |
operate()
This method does the actual work. |
void |
setResultImage(MTBImage value)
Set value of resultImg. |
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="Input Image", required=true, dataIOOrder=0, direction=IN, description="Input image") private transient MTBImage inImg
@Parameter(label="Masksize", required=true, dataIOOrder=1, direction=IN, description="Masksize") private int masksize
@Parameter(label="Result Image", required=true, direction=OUT, description="Result image") private transient MTBImage resultImg
Constructor Detail |
---|
public ImgDilate() throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
public ImgDilate(MTBImage inimg, int ms) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
inimg
- Input image.ms
- Size of square mask.
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
Method Detail |
---|
private MTBImage applyMask(MTBImage mImg, int msize)
The method first checks if image is binary or not. Subsequently the corresponding dilation function is called.
mImg
- Input image.msize
- Size of square mask.
private MTBImage applyMaskBinary(MTBImage img, int msize, int minVal, int maxVal)
ip
- Input image for dilation.msize
- Size of squared dilation mask.minVal
- Minimal intensity in image.maxVal
- Maximal intensity in image.
private MTBImage applyMaskGray(MTBImage mImg, int msize)
ip
- Input image for dilation.msize
- Size of squared dilation mask.
public MTBImage getInputImage()
public int getMasksize()
public MTBImage getResultImage()
protected void operate()
operate
in class de.unihalle.informatik.Alida.operator.ALDOperator
public void setResultImage(MTBImage value)
value
- New value of resultImg
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |