@ALDAOperator(genericExecutionMode=ALL, level=APPLICATION, shortDescription="Basic morphological operations on binary and grayscale images.") public class BasicMorphology extends MTBOperator
Modifier and Type | Class and Description |
---|---|
static class |
BasicMorphology.maskShape |
static class |
BasicMorphology.opMode |
Modifier and Type | Field and Description |
---|---|
private BasicMorphology.maskShape |
currentMaskShape
shape of mask if mask !
|
private Integer |
currentMaskSize
mask size of mask if mask !
|
private MTBImage |
inImg |
private MTBStructuringElement |
mask |
private int |
maskCenterX |
private int |
maskCenterY |
private Integer |
maskSize |
private int |
maskSizeX |
private int |
maskSizeY |
private BasicMorphology.opMode |
mode |
private MTBImage |
resultImg |
private BasicMorphology.maskShape |
shape |
private int |
sizeT |
private int |
sizeX |
private int |
sizeY |
Constructor and Description |
---|
BasicMorphology() |
BasicMorphology(Integer _maskSize,
BasicMorphology.opMode _mode,
BasicMorphology.maskShape _shape)
Constructor to create new BasicMorphology object with mask size, mode and shape of the structuring element.
|
BasicMorphology(MTBImage inImg,
MTBStructuringElement mask) |
Modifier and Type | Method and Description |
---|---|
private MTBImage |
blackTophat(MTBImage img)
calculates the black tophat transform, i.e. difference of the closing of the image and the image
(also called closing tophat) |
private MTBImage |
close(MTBImage img) |
private MTBImage |
dilate(MTBImage img) |
private MTBImage |
erode(MTBImage img) |
private MTBStructuringElement |
generateStructuringElement() |
String |
getDocumentation() |
MTBImage |
getResultImage() |
private MTBImage |
morphGradient(MTBImage img) |
private MTBImage |
open(MTBImage img) |
void |
operate() |
void |
setInImg(MTBImage _inImg)
Set input image for morphological operation.
|
void |
setMask(BasicMorphology.maskShape shape,
int size) |
void |
setMask(MTBStructuringElement mask) |
void |
setMode(BasicMorphology.opMode mode) |
private MTBImage |
whiteTophat(MTBImage img)
calculates the white tophat transform, i.e. difference of image and the opening of the image
(also called opening tophat) |
readResolve
addOperatorExecutionProgressEventListener, addParameter, addParameter, addParameterUnconditioned, fieldContained, fireOperatorExecutionProgressEvent, getALDPortHashAccessKey, getConstructionMode, 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="input image", required=true, direction=IN, supplemental=false, description="input image", dataIOOrder=0) private transient MTBImage inImg
@Parameter(label="mask size", required=false, direction=IN, supplemental=false, description="side length of structuring element", dataIOOrder=1) private Integer maskSize
@Parameter(label="mask shape", required=false, direction=IN, supplemental=false, description="shape of structuring element", dataIOOrder=2) private BasicMorphology.maskShape shape
@Parameter(label="mode", required=false, direction=IN, supplemental=false, description="type of operation", dataIOOrder=3) private BasicMorphology.opMode mode
@Parameter(label="result image", required=true, direction=OUT, supplemental=false, description="resulting image") private transient MTBImage resultImg
private BasicMorphology.maskShape currentMaskShape
private Integer currentMaskSize
private int sizeX
private int sizeY
private int sizeT
private int maskSizeX
private int maskSizeY
private int maskCenterX
private int maskCenterY
private MTBStructuringElement mask
public BasicMorphology() throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
public BasicMorphology(MTBImage inImg, MTBStructuringElement mask) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
inImg
- input imagemask
- structuring element used for the morphological operationde.unihalle.informatik.Alida.exceptions.ALDOperatorException
public BasicMorphology(Integer _maskSize, BasicMorphology.opMode _mode, BasicMorphology.maskShape _shape) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
_maskSize
- size of structuring element used for the morphological operation_mode
- mode of morphological operation_shape
- shape of structuring element used for the morphological operationde.unihalle.informatik.Alida.exceptions.ALDOperatorException
public void setInImg(MTBImage _inImg)
public void operate() throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException, de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
operate
in class de.unihalle.informatik.Alida.operator.ALDOperator
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
private MTBImage morphGradient(MTBImage img) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
img
- de.unihalle.informatik.Alida.exceptions.ALDOperatorException
private MTBImage whiteTophat(MTBImage img) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
img
- de.unihalle.informatik.Alida.exceptions.ALDOperatorException
private MTBImage blackTophat(MTBImage img) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
img
- de.unihalle.informatik.Alida.exceptions.ALDOperatorException
public void setMode(BasicMorphology.opMode mode)
mode
- morphological operation to applypublic void setMask(BasicMorphology.maskShape shape, int size)
public void setMask(MTBStructuringElement mask)
mask
- structuring element to usepublic MTBImage getResultImage()
private MTBStructuringElement generateStructuringElement()
public String getDocumentation()
getDocumentation
in class de.unihalle.informatik.Alida.operator.ALDOperator
Copyright © 2010–2020 Martin Luther University Halle-Wittenberg, Institute of Computer Science, Pattern Recognition and Bioinformatics. All rights reserved.