Package com.bc.ceres.jai.operator
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
FieldsModifier and TypeFieldDescriptionstatic final InterpretationType
The default interpretation type: all data types are interpreted as in AWTstatic 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 -
Method Summary
Modifier and TypeMethodDescriptionstatic 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 Details
-
PARAM_NAME_FACTOR
- See Also:
-
PARAM_NAME_OFFSET
- See Also:
-
PARAM_NAME_SCALING_TYPE
- See Also:
-
PARAM_NAME_INTERPRETATION_TYPE
- See Also:
-
AWT
The default interpretation type: all data types are interpreted as in AWT -
INTERPRET_BYTE_SIGNED
Interpretation type for interpreting byte data as signed. -
INTERPRET_INT_UNSIGNED
Interpretation type for interpreting integer data as unsigned. -
LINEAR
The default scaling type: source samples are scaled linearly. -
EXPONENTIAL
Exponential scaling type: source samples are scaled linearly and then raised to the power of 10. -
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 (excepthints
) and invokesJAI.create(String,java.awt.image.renderable.ParameterBlock,java.awt.RenderingHints)
.- Parameters:
source
- TheRenderedImage
source.factor
- The scaling factor.offset
- The scaling offset.scalingType
- The manner of scaling.interpretationType
- The interpretation type.hints
- TheRenderingHints
to use. May benull
.- Returns:
- The
RenderedOp
destination. - Throws:
IllegalArgumentException
- ifsource
isnull
.- See Also:
-
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 typefactor
- The scaling factor.offset
- The scaling offset.scalingType
- The manner of scaling.interpretationType
- The interpretation type.- Returns:
- the target data type.
- See Also:
-