Class ReinterpretDescriptor

java.lang.Object
javax.media.jai.OperationDescriptorImpl
com.bc.ceres.jai.operator.ReinterpretDescriptor
All Implemented Interfaces:
Serializable, javax.media.jai.OperationDescriptor, javax.media.jai.RegistryElementDescriptor

public class ReinterpretDescriptor extends javax.media.jai.OperationDescriptorImpl
An OperationDescriptor describing the "Reinterpret" operation.

The Reinterpret operation creates a single-banded, tiled rendered image, where the source samples are rescaled or reformatted.

See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final InterpretationType
    The default interpretation type: all data types are interpreted as in AWT
    static final ScalingType
    Exponential scaling type: source samples are scaled linearly and then raised to the power of 10.
    static final InterpretationType
    Interpretation type for interpreting byte data as signed.
    static final InterpretationType
    Interpretation type for interpreting integer data as unsigned.
    static final ScalingType
    The default scaling type: source samples are scaled linearly.
    static final ScalingType
    Logarithmic scaling type: source samples are scaled linearly and then their logarithms to the basis of 10 are computed.
    static final String
     
    static final String
     
    static final String
     
    static final String
     

    Fields inherited from class javax.media.jai.OperationDescriptorImpl

    resources, sourceNames, supportedModes

    Fields inherited from interface javax.media.jai.OperationDescriptor

    NO_PARAMETER_DEFAULT
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs a new instance of this class.
  • Method Summary

    Modifier and Type
    Method
    Description
    static javax.media.jai.RenderedOp
    create(RenderedImage source, double factor, double offset, ScalingType scalingType, InterpretationType interpretationType, RenderingHints hints)
    Reinterprets an image.
    static javax.media.jai.ImageLayout
    Creates the target image layout for a given source and a given target sample model.
    static int
    getTargetDataType(int sourceDataType, double factor, double offset, ScalingType scalingType, InterpretationType interpretationType)
    Returns the target data type for a given source data type and reinterpretation properties.

    Methods inherited from class javax.media.jai.OperationDescriptorImpl

    arePropertiesSupported, getDefaultSourceClass, getDestClass, getDestClass, getInvalidRegion, getName, getNumParameters, getNumSources, getParamClasses, getParamDefaults, getParamDefaultValue, getParameterListDescriptor, getParamMaxValue, getParamMinValue, getParamNames, getPropertyGenerators, getPropertyGenerators, getRenderableDestClass, getRenderableSourceClasses, getResourceBundle, getResources, getSourceClasses, getSourceClasses, getSourceNames, getSupportedModes, isImmediate, isModeSupported, isRenderableSupported, isRenderedSupported, makeDefaultSourceClassList, validateArguments, validateArguments, validateParameters, validateParameters, validateRenderableArguments, validateRenderableSources, validateSources, validateSources

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • PARAM_NAME_FACTOR

      public static final String PARAM_NAME_FACTOR
      See Also:
    • PARAM_NAME_OFFSET

      public static final String PARAM_NAME_OFFSET
      See Also:
    • PARAM_NAME_SCALING_TYPE

      public static final String PARAM_NAME_SCALING_TYPE
      See Also:
    • PARAM_NAME_INTERPRETATION_TYPE

      public static final String PARAM_NAME_INTERPRETATION_TYPE
      See Also:
    • AWT

      public static final InterpretationType AWT
      The default interpretation type: all data types are interpreted as in AWT
    • INTERPRET_BYTE_SIGNED

      public static final InterpretationType INTERPRET_BYTE_SIGNED
      Interpretation type for interpreting byte data as signed.
    • INTERPRET_INT_UNSIGNED

      public static final InterpretationType INTERPRET_INT_UNSIGNED
      Interpretation type for interpreting integer data as unsigned.
    • LINEAR

      public static final ScalingType LINEAR
      The default scaling type: source samples are scaled linearly.
    • EXPONENTIAL

      public static final ScalingType EXPONENTIAL
      Exponential scaling type: source samples are scaled linearly and then raised to the power of 10.
    • LOGARITHMIC

      public static final ScalingType LOGARITHMIC
      Logarithmic scaling type: source samples are scaled linearly and then their logarithms to the basis of 10 are computed.
  • Constructor Details

    • ReinterpretDescriptor

      public ReinterpretDescriptor()
      Constructs a new instance of this class.
  • Method Details

    • create

      public static javax.media.jai.RenderedOp create(RenderedImage source, double factor, double offset, ScalingType scalingType, InterpretationType interpretationType, RenderingHints hints)
      Reinterprets an image.

      Creates a ParameterBlockJAI from all supplied arguments (except hints) and invokes JAI.create(String,java.awt.image.renderable.ParameterBlock,java.awt.RenderingHints).

      Parameters:
      source - The RenderedImage source.
      factor - The scaling factor.
      offset - The scaling offset.
      scalingType - The manner of scaling.
      interpretationType - The interpretation type.
      hints - The RenderingHints to use. May be null.
      Returns:
      The RenderedOp destination.
      Throws:
      IllegalArgumentException - if source is null.
      See Also:
      • JAI
      • ParameterBlockJAI
      • RenderedOp
    • createTargetImageLayout

      public static javax.media.jai.ImageLayout createTargetImageLayout(RenderedImage source, SampleModel sampleModel)
      Creates the target image layout for a given source and a given target sample model.
      Parameters:
      source - The source.
      sampleModel - The target sample model.
      Returns:
      the target image layout.
    • getTargetDataType

      public static int getTargetDataType(int sourceDataType, double factor, double offset, ScalingType scalingType, InterpretationType interpretationType)
      Returns the target data type for a given source data type and reinterpretation properties.
      Parameters:
      sourceDataType - The source data type
      factor - The scaling factor.
      offset - The scaling offset.
      scalingType - The manner of scaling.
      interpretationType - The interpretation type.
      Returns:
      the target data type.
      See Also: