de.unihalle.informatik.MiToBo.tools.image
Class ImageConverter

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.tools.image.ImageConverter
All Implemented Interfaces:
de.unihalle.informatik.Alida.datatypes.ALDConfigurationValidator, de.unihalle.informatik.Alida.operator.events.ALDOperatorExecutionProgressEventListener, EventListener

@ALDMetaInfo(export=ALLOWED)
@ALDAOperator(genericExecutionMode=ALL)
public class ImageConverter
extends MTBOperator

Plugin to convert images that are represented by MTBImage. This plugin can be used as operator, because it provides more functionality than the MTBImage.convertType(..)-method, namely splitting of RGB color channels to true channels and merging of true channels to RGB color channels. See setChannelsAreRGBFlag(..)-method

Author:
Oliver Gress

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
ImageConverter()
          Constructor.
ImageConverter(MTBImage _inputImg, MTBImage.MTBImageType _outputType, boolean _scaleValues, Boolean _channelsAreRGB)
          Constructor
 
Method Summary
 Boolean getChannelsAreRGBFlag()
          Get flag if RGB color channels are interpreted as real image channels.
 MTBImage getInputImg()
          Get input image
 MTBImage.MTBImageType getOutputType()
          Get output image type
 MTBImage getResultImg()
          Get result image
 boolean isScaleValues()
          Get flag if values are scaled to match the range of output type values if necessary
protected  void operate()
           
 void setChannelsAreRGBFlag(Boolean channelsAreRGB1)
          Set flag if RGB color channels are interpreted as real image channels.
 void setInputImg(MTBImage _inputImg1)
          Set input image
 void setOutputType(MTBImage.MTBImageType outputType1)
          Set output image type
protected  void setResultImg(MTBImage resultImg1)
          Set result image
 void setScaleValues(boolean scaleValues1)
          Set flag if values are scaled to match the range of output type values if necessary
 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

ImageConverter

public ImageConverter()
               throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
Constructor. Use set-functions to specify parameters

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

ImageConverter

public ImageConverter(MTBImage _inputImg,
                      MTBImage.MTBImageType _outputType,
                      boolean _scaleValues,
                      Boolean _channelsAreRGB)
               throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
Constructor

Parameters:
_inputImg - input image that has to be converted
_outputType - output image type
_scaleValues - set true to scale values to the range of output type values if necessary
_channelsAreRGB - if true, RGB color channels are separated to true channels when converting from RGB to gray and channels are merged into RGB color channels when converting from gray to RGB. See setChannelsAreRGBFlag(..)-method. May be null for gray-to-gray conversion.
Throws:
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
Method Detail

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

operate

protected void operate()
Specified by:
operate in class de.unihalle.informatik.Alida.operator.ALDOperator

getInputImg

public MTBImage getInputImg()
Get input image


setInputImg

public void setInputImg(MTBImage _inputImg1)
Set input image


getResultImg

public MTBImage getResultImg()
Get result image


setResultImg

protected void setResultImg(MTBImage resultImg1)
Set result image


getOutputType

public MTBImage.MTBImageType getOutputType()
Get output image type


setOutputType

public void setOutputType(MTBImage.MTBImageType outputType1)
Set output image type


isScaleValues

public boolean isScaleValues()
Get flag if values are scaled to match the range of output type values if necessary


setScaleValues

public void setScaleValues(boolean scaleValues1)
Set flag if values are scaled to match the range of output type values if necessary


getChannelsAreRGBFlag

public Boolean getChannelsAreRGBFlag()
Get flag if RGB color channels are interpreted as real image channels. (see setChannelsAreRGBFlag(..))


setChannelsAreRGBFlag

public void setChannelsAreRGBFlag(Boolean channelsAreRGB1)
Set flag if RGB color channels are interpreted as real image channels. If true and conversion is from gray value to RGB or vice versa, the each color channel is treated as separate channel. If false RGB values are converted to gray values (gray = (R+G+B)/3). In the other conversion direction, gray values are converted to gray RGB values (R=G=B = gray)



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