|
||||||||
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.enhance.GammaCorrection2D
@ALDAOperator(genericExecutionMode=ALL, level=APPLICATION) public class GammaCorrection2D
Gamma correction on a 8- oder 16-bit image for one- or multi-channel images. The gamma value can be set or automatically be computed.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class de.unihalle.informatik.Alida.operator.ALDOperator |
---|
de.unihalle.informatik.Alida.operator.ALDOperator.HidingMode |
Field Summary | |
---|---|
private boolean |
auto
|
private int |
channel
|
private double |
gamma
|
private MTBImage |
inputImage
|
private MTBImage |
resultImage
|
Fields inherited from class de.unihalle.informatik.Alida.operator.ALDOperator |
---|
completeDAG, name, portHashAccess, verbose, versionProvider |
Constructor Summary | |
---|---|
GammaCorrection2D()
Standard constructor. |
|
GammaCorrection2D(MTBImage inimg,
double _gamma,
int _channel)
Constructor to create a new gamma correction 2D operator. |
|
GammaCorrection2D(MTBImage inimg,
int _channel)
No gamma value is set. |
Method Summary | |
---|---|
private MTBImage |
correctGamma(MTBImage inputImg,
double gamma,
int channel)
Perform gamma correction to the specified channel of the input image, using the given gamma value. |
private MTBImage |
correctGammaAuto(MTBImage inputImg,
int channel)
Perform gamma correction to the specified channel of the input image. |
int |
getChannel()
Get the image channel. |
double |
getGamma()
Get the gamma value. |
boolean |
getGammaToAuto()
Get if gamma should be calculated automatically or not. |
MTBImage |
getInputImage()
Get the input image. |
MTBImage |
getResultImage()
Get the gamma corrected image. |
protected void |
operate()
This method does the actual work. |
void |
setChannel(int _channel)
Set the image channel. |
void |
setGamma(double _gamma)
Set the gamma value. |
void |
setGammaToAuto(boolean a)
Set if gamma should be calculated automatically or not. |
void |
setInputImage(MTBImage inImg)
Set the input image. |
void |
validateCustom()
|
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, 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="Auto Gamma", required=false, direction=IN, description="Automatic gamma value computation.", mode=STANDARD, dataIOOrder=3) private boolean auto
@Parameter(label="Image Channel", required=true, direction=IN, description="Channel of image.", mode=STANDARD, dataIOOrder=2) private int channel
@Parameter(label="Gamma Value", direction=INOUT, description="Gamma value.", mode=STANDARD, dataIOOrder=1) private double gamma
@Parameter(label="Input Image", required=true, direction=IN, description="Input image", mode=STANDARD, dataIOOrder=0) private transient MTBImage inputImage
@Parameter(label="Result Image", direction=OUT, description="Gamma corrected image.") private transient MTBImage resultImage
Constructor Detail |
---|
public GammaCorrection2D() throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
public GammaCorrection2D(MTBImage inimg, double _gamma, int _channel) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
inimg
- 2D input image for gamma correction_gamma
- gamma value to apply gamma correction_channel
- image channel to apply gamma correction
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
public GammaCorrection2D(MTBImage inimg, int _channel) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
gamma = log(r/maxInt)/ log(mean/maxInt)
maxInt is the maximum pixel intensity for all pixels in the image, for example 65535 for a 16-Bit pixel image
mean is the mean value over all image pixels
r is the half value of the pixel intensity range (32768 for 16-bit image)
inimg
- 2D input image for gamma correction_channel
- image channel to apply gamma correction
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
Method Detail |
---|
private MTBImage correctGamma(MTBImage inputImg, double gamma, int channel)
private MTBImage correctGammaAuto(MTBImage inputImg, int channel)
public int getChannel()
public double getGamma()
public boolean getGammaToAuto()
public MTBImage getInputImage()
public MTBImage getResultImage()
protected void operate() throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
operate
in class de.unihalle.informatik.Alida.operator.ALDOperator
de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
public void setChannel(int _channel)
public void setGamma(double _gamma)
public void setGammaToAuto(boolean a)
public void setInputImage(MTBImage inImg)
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
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |