|
||||||||
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.ImgTophat
@ALDAOperator(genericExecutionMode=ALL) public class ImgTophat
This class implements the tophat operator.
Attention: if masksize is even, errors may result due to lack of operator symmetry
Nested Class Summary | |
---|---|
static class |
ImgTophat.tophatMode
Available operating modes. |
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
|
(package private) MTBImage |
mtbImg
MTB input image to work on. |
private ImgTophat.tophatMode |
processMode
|
private MTBImage |
resultImg
|
Fields inherited from class de.unihalle.informatik.Alida.operator.ALDOperator |
---|
completeDAG, name, portHashAccess, verbose, versionProvider |
Constructor Summary | |
---|---|
ImgTophat()
Default constructor. |
|
ImgTophat(MTBImage ip,
ImgTophat.tophatMode op,
int msize)
Constructor with parameters. |
Method Summary | |
---|---|
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. |
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, direction=IN, description="Input image") private transient MTBImage inImg
@Parameter(label="Masksize", required=true, direction=IN, description="Masksize") private int masksize
MTBImage mtbImg
@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
Constructor Detail |
---|
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.masksize
- Size of squared mask.
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
Method Detail |
---|
public MTBImage getInputImage()
public int getMasksize()
public ImgTophat.tophatMode getMode()
de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
public MTBImage getResultImage()
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
public void setResultImage(MTBImage rimage)
rimage
- Result image.
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
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
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
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |