|
||||||||||
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.tools.image.ImageContrastReducer
@ALDAOperator(genericExecutionMode=ALL, level=STANDARD, allowBatchMode=true) public class ImageContrastReducer
Contrast-reduction of images by reducing number of gray-scale values.
This operator performs a reduction of the contrast in an image by reducing the number of gray-scale values to, e.g., 4-bit or 2-bit. Different modes for choosing the gray values in the result image are available. Currently only byte and short gray-scale images are handled, passing color images or images of another type to the operator results in an error.
Note that the result image always shares the type of the input image, irrespective of the actual number of bits used for representing the values. In addition, it is not guaranteed that the whole range of available gray values is used.
Nested Class Summary | |
---|---|
static class |
ImageContrastReducer.ResultValueMode
Modes for choosing result values. |
static class |
ImageContrastReducer.TargetContrast
Available target contrast modes. |
Nested classes/interfaces inherited from class de.unihalle.informatik.Alida.operator.ALDOperator |
---|
de.unihalle.informatik.Alida.operator.ALDOperator.HidingMode |
Field Summary | |
---|---|
protected MTBImage |
inImg
Input image. |
protected MTBImage |
resultImg
Result image. |
protected ImageContrastReducer.ResultValueMode |
resultValueMode
Result value mode. |
protected ImageContrastReducer.TargetContrast |
targetContrast
Target contrast of result image. |
Fields inherited from class de.unihalle.informatik.Alida.operator.ALDOperator |
---|
completeDAG, name, operatorExecutionEventlistenerList, portHashAccess, verbose, versionProvider |
Constructor Summary | |
---|---|
ImageContrastReducer()
Default constructor. |
Method Summary | |
---|---|
MTBImage |
getInImg()
Get input image. |
MTBImage |
getResultImg()
Get result image. |
protected void |
operate()
|
void |
setInImg(MTBImage img)
Set input image. |
void |
setResultValueSelectionMode(ImageContrastReducer.ResultValueMode vsm)
Set value selection mode. |
void |
setTargetContrast(ImageContrastReducer.TargetContrast tc)
Set target contrast. |
void |
validateCustom()
|
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, validateGeneric, writeHistory, writeHistory, writeHistory |
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, mode=STANDARD, dataIOOrder=0, description="Input image to transform.") protected MTBImage inImg
@Parameter(label="Target Contrast", required=true, direction=IN, mode=STANDARD, dataIOOrder=1, description="Target contrast, i.e., number of bits.") protected ImageContrastReducer.TargetContrast targetContrast
@Parameter(label="Result Value Mode", required=true, direction=IN, mode=STANDARD, dataIOOrder=2, description="Mode for selecting the result values.") protected ImageContrastReducer.ResultValueMode resultValueMode
@Parameter(label="Result Image", required=true, direction=OUT, mode=STANDARD, dataIOOrder=0, description="Result image.") protected MTBImage resultImg
Constructor Detail |
---|
public ImageContrastReducer() throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
Method Detail |
---|
public void validateCustom() throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
validateCustom
in class de.unihalle.informatik.Alida.operator.ALDOperator
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
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
public void setInImg(MTBImage img)
img
- Input image to process.public MTBImage getInImg()
public void setTargetContrast(ImageContrastReducer.TargetContrast tc)
tc
- Target contrast.public void setResultValueSelectionMode(ImageContrastReducer.ResultValueMode vsm)
vsm
- Mode for selecting result values.public MTBImage getResultImg()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |