Class 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:
    Serialized Form
    • Constructor Summary

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

      All Methods Static Methods Concrete Methods 
      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 createTargetImageLayout​(RenderedImage source, SampleModel sampleModel)
      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
    • Field Detail

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

      • ReinterpretDescriptor

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

      • 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:
        DataBuffer