de.unihalle.informatik.MiToBo.enhance
Class GammaCorrection2D

java.lang.Object
  extended by de.unihalle.informatik.Alida.operator.ALDOperator
      extended by de.unihalle.informatik.MiToBo.core.operator.MTBOperator
          extended by de.unihalle.informatik.MiToBo.enhance.GammaCorrection2D
All Implemented Interfaces:
de.unihalle.informatik.Alida.datatypes.ALDConfigurationValidator, de.unihalle.informatik.Alida.operator.events.ALDOperatorExecutionProgressEventListener, EventListener

@ALDAOperator(genericExecutionMode=ALL,
              level=APPLICATION)
@ALDMetaInfo(export=MANDATORY)
public class GammaCorrection2D
extends MTBOperator

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.

Author:
Danny Misiak

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
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
 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
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

GammaCorrection2D

public GammaCorrection2D()
                  throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
Standard constructor.

Throws:
de.unihalle.informatik.Alida.exceptions.ALDOperatorException

GammaCorrection2D

public GammaCorrection2D(MTBImage inimg,
                         double _gamma,
                         int _channel)
                  throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
Constructor to create a new gamma correction 2D operator.

Parameters:
inimg - 2D input image for gamma correction
_gamma - gamma value to apply gamma correction
_channel - image channel to apply gamma correction
Throws:
de.unihalle.informatik.Alida.exceptions.ALDOperatorException

GammaCorrection2D

public GammaCorrection2D(MTBImage inimg,
                         int _channel)
                  throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
No gamma value is set. The gamma value is computed automatically.

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)

Parameters:
inimg - 2D input image for gamma correction
_channel - image channel to apply gamma correction
Throws:
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
Method Detail

getInputImage

public MTBImage getInputImage()
Get the input image.


setInputImage

public void setInputImage(MTBImage inImg)
Set the input image.


getGamma

public double getGamma()
Get the gamma value.


setGamma

public void setGamma(double _gamma)
Set the gamma value.


getChannel

public int getChannel()
Get the image channel.


setChannel

public void setChannel(int _channel)
Set the image channel.


getResultImage

public MTBImage getResultImage()
Get the gamma corrected image.


setGammaToAuto

public void setGammaToAuto(boolean a)
Set if gamma should be calculated automatically or not.


getGammaToAuto

public boolean getGammaToAuto()
Get if gamma should be calculated automatically or not.


operate

protected void operate()
                throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
This method does the actual work.

Specified by:
operate in class de.unihalle.informatik.Alida.operator.ALDOperator
Throws:
de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
de.unihalle.informatik.Alida.exceptions.ALDOperatorException

validateCustom

public void validateCustom()
                    throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
Overrides:
validateCustom in class de.unihalle.informatik.Alida.operator.ALDOperator
Throws:
de.unihalle.informatik.Alida.exceptions.ALDOperatorException


Copyright © 2010–2015 Martin Luther University Halle-Wittenberg. All rights reserved.