|
||||||||||
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.segmentation.thresholds.ImgThresh
@ALDAOperator(genericExecutionMode=ALL, level=STANDARD) public class ImgThresh
Image thresholding operator with lower threshold (threshold
and upper threshold
(upperThreshold
.
All pixels with threshold < intensity <= upperThreshold
are
defined as foreground pixels.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class de.unihalle.informatik.Alida.operator.ALDOperator |
---|
de.unihalle.informatik.Alida.operator.ALDOperator.HidingMode |
Field Summary |
---|
Fields inherited from class de.unihalle.informatik.Alida.operator.ALDOperator |
---|
completeDAG, name, operatorExecutionEventlistenerList, portHashAccess, verbose, versionProvider |
Constructor Summary | |
---|---|
ImgThresh()
|
|
ImgThresh(MTBImage img,
double thres)
Constructor for thresholding using 255 as foreground and 0 as background value. |
|
ImgThresh(MTBImage img,
double thres,
double fg,
double bg)
Constructor for thresholding using 'fgValue' as foreground and 'bgValue' as background value. |
Method Summary | |
---|---|
boolean |
getActualSliceOnly()
Get flag for thresholding only the actual slice (true) or the whole image (false) |
double |
getBGValue()
Get background value |
MTBImage |
getDestinationImage()
Get value of Input argument DestinationImage. |
double |
getFGValue()
Get foreground value |
MTBImage |
getInputImage()
Get input image |
MTBImage |
getResultImage()
Get the result image |
Double |
getThreshold()
Get threshold. |
boolean |
isBGOriginalValue()
Test if background pixels keep their original pixel values |
boolean |
isFGOriginalValue()
Test if foreground pixels keep their original pixel values |
protected void |
operate()
|
void |
setActualSliceOnly()
Only actual slice is thresholded, this will force the output image type to be of the same type as the input image (or destination image type) |
void |
setBGOriginalValue()
Tell the thresholder to use the original pixel value for background pixels |
void |
setBGValue(double value)
Set value of Parameter argument BGValue. |
void |
setDestinationImage(MTBImage img)
Set value of Input argument DestinationImage. |
void |
setFGOriginalValue()
Tell the thresholder to use the original pixel value for foreground pixels |
void |
setFGValue(double value)
Set value of Parameter argument FGValue. |
void |
setInputImage(MTBImage img)
Set input image |
protected void |
setResultImage(MTBImage img)
Set result image. |
void |
setThreshold(double thres)
Set threshold |
protected MTBImage |
threshold(MTBImage img,
double thresh,
double upperThres,
double _fgValue,
double _bgValue,
boolean _actualSliceOnly)
Apply threshold to an MTBImage and create a new thresholded MTBImage. |
protected void |
threshold(MTBImage img,
MTBImage threshImg,
double thresh,
double upperThresh,
double fgValue,
double bgValue,
boolean actualSliceOnly)
Apply threshold to an MTBImage and write results to a destination MTBImage. |
void |
unsetActualSliceOnly()
The whole image is thresholded (default) |
Methods inherited from class de.unihalle.informatik.MiToBo.core.operator.MTBOperator |
---|
readResolve |
Methods inherited from class de.unihalle.informatik.Alida.operator.ALDOperator |
---|
addOperatorExecutionProgressEventListener, fieldContained, fireOperatorExecutionProgressEvent, getALDPortHashAccessKey, getConstructionMode, getHidingMode, getInInoutNames, getInInoutNames, getInNames, getInOutNames, getMissingRequiredInputs, getName, getNumParameters, getOutInoutNames, getOutNames, getParameter, getParameterDescriptor, getParameterNames, getSupplementalNames, getVerbose, getVersion, handleOperatorExecutionProgressEvent, isConfigured, print, print, print, printInterface, printInterface, readHistory, reinitializeParameterDescriptors, removeOperatorExecutionProgressEventListener, runOp, runOp, runOp, setConstructionMode, setHidingMode, setName, setParameter, setVerbose, toStringVerbose, unconfiguredItems, validate, validateCustom, validateGeneric, writeHistory, writeHistory, writeHistory |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ImgThresh(MTBImage img, double thres) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
img
- input imagethres
- values < threshold are set to 0, value >= threshold are set to 255
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
public ImgThresh(MTBImage img, double thres, double fg, double bg) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
img
- input imagethres
- values < threshold are set to 'fgValue', value >= threshold are set to 'bgValue'fg
- foreground value (POSITIVE_INFINITY is interpreted as use original value)bg
- background value (POSITIVE_INFINITY is interpreted as use original value)
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
public ImgThresh() throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
Method Detail |
---|
protected void operate() throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
operate
in class de.unihalle.informatik.Alida.operator.ALDOperator
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
protected MTBImage threshold(MTBImage img, double thresh, double upperThres, double _fgValue, double _bgValue, boolean _actualSliceOnly)
img
- source MTBImagethresh
- Lower threshold.upperThres
- Uppper threshold._fgValue
- Foreground pixel value. If set to Double.POSITIVE_INFINITY, pixels higher than/equal to the threshold are set to their original values._bgValue
- Background pixel value. If set to Double.POSITIVE_INFINITY, pixels lower to the threshold are set to their original values._actualSliceOnly
- flag for only thresholding actual slice (true) or whole image (false)
protected void threshold(MTBImage img, MTBImage threshImg, double thresh, double upperThresh, double fgValue, double bgValue, boolean actualSliceOnly) throws IllegalArgumentException
img
- source MTBImagethreshImg
- destination image to write the thresholded result tothresh
- ThresholdfgValue
- Foreground pixel value. If set to Double.POSITIVE_INFINITY, pixels higher than/equal to the threshold are set to their original values.bgValue
- Background pixel value. If set to Double.POSITIVE_INFINITY, pixels lower to the threshold are set to their original values.actualSliceOnly
- flag for only thresholding actual slice (true) or whole image (false)
IllegalArgumentException
public MTBImage getInputImage()
public void setInputImage(MTBImage img)
public Double getThreshold()
public void setThreshold(double thres)
public double getFGValue()
public double getBGValue()
public boolean isFGOriginalValue()
public boolean isBGOriginalValue()
public void setFGOriginalValue()
public void setBGOriginalValue()
public boolean getActualSliceOnly()
public void setActualSliceOnly()
public void unsetActualSliceOnly()
public MTBImage getResultImage()
protected void setResultImage(MTBImage img)
img
- result imagepublic void setFGValue(double value)
value
- New value for FGValuepublic void setBGValue(double value)
value
- New value for BGValuepublic MTBImage getDestinationImage()
public void setDestinationImage(MTBImage img)
img
- destination image
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |