@ALDAOperator(genericExecutionMode=ALL) public class ImgTophat extends MTBOperator
Attention: if masksize is even, errors may result due to lack of operator symmetry
Modifier and Type | Class and Description |
---|---|
static class |
ImgTophat.tophatMode
Available operating modes.
|
Modifier and Type | Field and Description |
---|---|
private MTBImage |
inImg |
private int |
masksize |
(package private) MTBImage |
mtbImg
MTB input image to work on.
|
private ImgTophat.tophatMode |
processMode |
private MTBImage |
resultImg |
Constructor and Description |
---|
ImgTophat()
Default constructor.
|
ImgTophat(MTBImage ip,
ImgTophat.tophatMode op,
int msize)
Constructor with parameters.
|
Modifier and Type | Method and Description |
---|---|
MTBImage |
getInputImage()
Get reference to the current input image.
|
int |
getMasksize()
Get current masksize.
|
ImgTophat.tophatMode |
getMode()
Get the desired operator mode.
|
MTBImage |
getResultImage()
Get the result image after applying the operator.
|
protected void |
operate() |
void |
setResultImage(MTBImage rimage)
Set the result image.
|
private MTBImage |
tophat_concave(MTBImage img,
int msize)
Apply a top hat operator to the image for concavity detection.
|
private MTBImage |
tophat_convex(MTBImage img,
int msize)
Apply a top hat operator to the image for convexity detection.
|
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="Masksize", required=true, direction=IN, description="Masksize") private int masksize
@Parameter(label="Input image", required=true, direction=IN, description="Input image") private transient MTBImage inImg
@Parameter(label="processMode", required=false, direction=IN, description="Process mode") private ImgTophat.tophatMode processMode
@Parameter(label="Result image", required=true, direction=OUT, description="Result image") private transient MTBImage resultImg
MTBImage mtbImg
public ImgTophat() throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
public ImgTophat(MTBImage ip, ImgTophat.tophatMode op, int msize) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
ip
- Image to work on.op
- Operator mode.msize
- Size of squared mask.de.unihalle.informatik.Alida.exceptions.ALDOperatorException
public MTBImage getInputImage()
public ImgTophat.tophatMode getMode()
de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
public int getMasksize()
public MTBImage getResultImage()
public void setResultImage(MTBImage rimage)
rimage
- Result image.de.unihalle.informatik.Alida.exceptions.ALDOperatorException
protected 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 tophat_convex(MTBImage img, int msize) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException, de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
The operation is performed assuming a squared structural element with specified mask size and grayscale entries of 0.
img
- Input image.msize
- Size of mask.de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
private MTBImage tophat_concave(MTBImage img, int msize) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException, de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
The operation is performed assuming a squared structural element with specified mask size and grayscale entries of 0.
img
- Input image.msize
- Size of mask.de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
Copyright © 2010–2020 Martin Luther University Halle-Wittenberg, Institute of Computer Science, Pattern Recognition and Bioinformatics. All rights reserved.