|
||||||||||
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.ImageValueTools
@ALDMetaInfo(export=ALLOWED) @ALDAOperator(genericExecutionMode=NONE) public class ImageValueTools
An operator class for different simple operations on the values of an image like inversion, filling with a constant value, etc.
The policy here is to use static functions instead of constructing a new
object, set its parameters and then call runOp()
. Thus the
source code is reduced as the functions of this class are assumed to be
called quite often.
This class is meant to implement convenience functions on images to keep the image classes from bloating. Feel free to extend this class with your convenience functions. Please implement static methods for any functionality to keep the policy of this class. Be aware that the input image is changed, i.e. the input image is also the result image. (You don't need to get the result image, if you still have a reference to the input image, but this method is implemented for completeness)
Nested Class Summary | |
---|---|
static class |
ImageValueTools.ImageValueModification
Available image value modification methods. |
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 | |
---|---|
|
ImageValueTools()
|
protected |
ImageValueTools(MTBImage img)
Constructor. |
Method Summary | |
---|---|
protected void |
fill(MTBImage img,
Color rgbvalue)
|
protected void |
fill(MTBImage img,
double grayvalue)
|
static void |
fillImage(MTBImage img,
Color rgbvalue,
MTBOperator callingOperator)
Fill the image with a RGB color value. |
static void |
fillImage(MTBImage img,
double grayvalue,
MTBOperator callingOperator)
Fill the specified image with a gray value. |
protected Double |
getGrayValue()
|
MTBImage |
getInputImage()
|
protected double |
getLowerBound()
Get lower bound of the normalization to range [lowerBound, upperBound]. |
protected ImageValueTools.ImageValueModification |
getModification()
|
MTBImage |
getResultImage()
|
protected Color |
getRGBValue()
|
protected double |
getUpperBound()
Get upper bound of the normalization to range [lowerBound, upperBound]. |
protected void |
invert(MTBImage img)
|
static void |
invertImage(MTBImage img,
MTBOperator callingOperator)
Invert the specified image. |
protected void |
normFromTo(MTBImage img)
|
static void |
normImageFromTo(MTBImage img,
double oldMinVal,
double oldMaxVal,
double newMinVal,
double newMaxVal,
MTBOperator callingOperator)
Normalize the image values to range [lowerBound, upperBound]. |
static void |
normImageTo(MTBImage img,
double lowerBound,
double upperBound,
MTBOperator callingOperator)
Normalize the image values to range [lowerBound, upperBound]. |
protected void |
normTo(MTBImage img,
double lowerBound,
double upperBound)
|
protected void |
operate()
|
void |
setFill(Color _rgbValue)
|
void |
setFill(double _grayValue)
|
void |
setInputImage(MTBImage _inputImage)
|
void |
setInvert()
|
void |
setModification(ImageValueTools.ImageValueModification mod)
|
void |
setNormFromTo(double minVal,
double maxVal,
double minVal_new,
double maxVal_new)
|
void |
setNormTo(double _lowerBound,
double _upperBound)
|
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 |
Constructor Detail |
---|
public ImageValueTools() throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
protected ImageValueTools(MTBImage img) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
img
-
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, 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 static void invertImage(MTBImage img, MTBOperator callingOperator) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException, de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
public static void fillImage(MTBImage img, double grayvalue, MTBOperator callingOperator) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException, de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
img
- grayvalue
- callingOperator
-
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
public static void fillImage(MTBImage img, Color rgbvalue, MTBOperator callingOperator) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException, de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
img
- rgbvalue
- callingOperator
-
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
public static void normImageTo(MTBImage img, double lowerBound, double upperBound, MTBOperator callingOperator) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException, de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
public static void normImageFromTo(MTBImage img, double oldMinVal, double oldMaxVal, double newMinVal, double newMaxVal, MTBOperator callingOperator) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException, de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
img
- lowerBound
- upperBound
-
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
public MTBImage getInputImage()
public void setInputImage(MTBImage _inputImage)
public MTBImage getResultImage()
public void setInvert()
public void setFill(Color _rgbValue) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
public void setFill(double _grayValue) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
public void setNormTo(double _lowerBound, double _upperBound) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
public void setNormFromTo(double minVal, double maxVal, double minVal_new, double maxVal_new)
public void setModification(ImageValueTools.ImageValueModification mod)
protected ImageValueTools.ImageValueModification getModification()
protected Double getGrayValue()
protected Color getRGBValue()
protected double getLowerBound()
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
protected double getUpperBound()
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
protected void invert(MTBImage img)
protected void fill(MTBImage img, double grayvalue)
protected void fill(MTBImage img, Color rgbvalue)
protected void normTo(MTBImage img, double lowerBound, double upperBound)
protected void normFromTo(MTBImage img)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |