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
AnOperationDescriptor
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
-
-
Field Summary
Fields Modifier and Type Field Description static InterpretationType
AWT
The default interpretation type: all data types are interpreted as in AWTstatic ScalingType
EXPONENTIAL
Exponential scaling type: source samples are scaled linearly and then raised to the power of 10.static InterpretationType
INTERPRET_BYTE_SIGNED
Interpretation type for interpreting byte data as signed.static InterpretationType
INTERPRET_INT_UNSIGNED
Interpretation type for interpreting integer data as unsigned.static ScalingType
LINEAR
The default scaling type: source samples are scaled linearly.static ScalingType
LOGARITHMIC
Logarithmic scaling type: source samples are scaled linearly and then their logarithms to the basis of 10 are computed.static String
PARAM_NAME_FACTOR
static String
PARAM_NAME_INTERPRETATION_TYPE
static String
PARAM_NAME_OFFSET
static String
PARAM_NAME_SCALING_TYPE
-
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
-
PARAM_NAME_FACTOR
public static final String PARAM_NAME_FACTOR
- See Also:
- Constant Field Values
-
PARAM_NAME_OFFSET
public static final String PARAM_NAME_OFFSET
- See Also:
- Constant Field Values
-
PARAM_NAME_SCALING_TYPE
public static final String PARAM_NAME_SCALING_TYPE
- See Also:
- Constant Field Values
-
PARAM_NAME_INTERPRETATION_TYPE
public static final String PARAM_NAME_INTERPRETATION_TYPE
- See Also:
- Constant Field Values
-
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.
-
-
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 (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:
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 typefactor
- The scaling factor.offset
- The scaling offset.scalingType
- The manner of scaling.interpretationType
- The interpretation type.- Returns:
- the target data type.
- See Also:
DataBuffer
-
-