public class ImageFunctionDescriptor
extends javax.media.jai.OperationDescriptorImpl
OperationDescriptor
describing the "ImageFunction" operation.
The "ImageFunction" operation generates an image on the basis of a functional description provided by an object which is an instance of a class
which implements the ImageFunction
interface. The (x,y) coordinates passed to the getElements()
methods of the
ImageFunction
object are derived by applying an optional translation and scaling to the X- and Y-coordinates of the image. The image
X- and Y-coordinates as usual depend on the values of the minimum X- and Y- coordinates of the image which need not be zero. Specifically, the
function coordinates passed to getElements()
are calculated from the image coordinates as:
functionX = xScale * (imageX - xTrans); functionY = yScale * (imageY - yTrans);This implies that the pixel at coordinates (xTrans,yTrans) will be assigned the value of the function at (0,0).
The number of bands in the destination image must be equal to the value returned by the getNumElements()
method of the
ImageFunction
unless the isComplex()
method of the ImageFunction
returns true
in which case it
will be twice that. The data type of the destination image is determined by the SampleModel
specified by an ImageLayout
object provided via a hint. If no layout hint is provided, the data type will default to single-precision floating point. The double precision
floating point form of the getElements()
method of the ImageFunction
will be invoked if and only if the data type is
specified to be double
. For all other data types the single precision form of getElements()
will be invoked and the
destination sample values will be clamped to the data type of the image.
The width and height of the image are provided explicitely as parameters. These values override the width and height specified via an
ImageLayout
if such is provided.
"ImageFunction" defines a PropertyGenerator that sets the "COMPLEX" property of the image to java.lang.Boolean.TRUE
or
java.lang.Boolean.FALSE
depending on whether the isComplex()
method of the ImageFunction
parameter returns
true
or false
, respectively. This property may be retrieved by calling the getProperty()
method with
"COMPLEX" as the property name.
It should be pointed out that users can define a valid area using an input ROI
object, and also can define NoData values by using an input
NoData Range
.
Name | Value |
---|---|
GlobalName | ImageFunction |
LocalName | ImageFunction |
Vendor | it.geosolutions.jaiext |
Description | Generates an image from a functional description. |
DocURL | |
Version | 1.0 |
arg0Desc | The function object. |
arg1Desc | The image width. |
arg2Desc | The image height. |
arg3Desc | The X scale factor. |
arg4Desc | The Y scale factor. |
arg5Desc | The X translation. |
arg6Desc | The Y translation. |
arg7Desc | The ROI object. |
arg8Desc | The NoData range object. |
arg9Desc | The value for destination NoData. |
Name | Class Type | Default Value |
---|---|---|
function | javax.media.jai.ImageFunction | NO_PARAMETER_DEFAULT |
width | java.lang.Integer | NO_PARAMETER_DEFAULT |
height | java.lang.Integer | NO_PARAMETER_DEFAULT |
xScale | java.lang.Float | 1.0F |
yScale | java.lang.Float | 1.0F |
xTrans | java.lang.Float | 0.0F |
yTrans | java.lang.Float | 0.0F |
roi | javax.media.jai.ROI | null |
nodata | it.geosolutions.jaiext.range.Range | null |
destNoData | java.lang.Float | 0.0F |
Constructor and Description |
---|
ImageFunctionDescriptor()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
static javax.media.jai.RenderedOp |
create(javax.media.jai.ImageFunction function,
Integer width,
Integer height,
Float xScale,
Float yScale,
Float xTrans,
Float yTrans,
javax.media.jai.ROI roi,
Range nodata,
float destNoData,
RenderingHints hints)
Generates an image from a functional description.
|
javax.media.jai.PropertyGenerator[] |
getPropertyGenerators()
Returns an array of
PropertyGenerators implementing property inheritance for the "ImageFunction" operation. |
arePropertiesSupported, getDefaultSourceClass, getDestClass, getDestClass, getInvalidRegion, getName, getNumParameters, getNumSources, getParamClasses, getParamDefaults, getParamDefaultValue, getParameterListDescriptor, getParamMaxValue, getParamMinValue, getParamNames, getPropertyGenerators, getRenderableDestClass, getRenderableSourceClasses, getResourceBundle, getResources, getSourceClasses, getSourceClasses, getSourceNames, getSupportedModes, isImmediate, isModeSupported, isRenderableSupported, isRenderedSupported, makeDefaultSourceClassList, validateArguments, validateArguments, validateParameters, validateParameters, validateRenderableArguments, validateRenderableSources, validateSources, validateSources
public javax.media.jai.PropertyGenerator[] getPropertyGenerators()
PropertyGenerators
implementing property inheritance for the "ImageFunction" operation.getPropertyGenerators
in interface javax.media.jai.OperationDescriptor
getPropertyGenerators
in class javax.media.jai.OperationDescriptorImpl
public static javax.media.jai.RenderedOp create(javax.media.jai.ImageFunction function, Integer width, Integer height, Float xScale, Float yScale, Float xTrans, Float yTrans, javax.media.jai.ROI roi, Range nodata, float destNoData, RenderingHints hints)
Creates a ParameterBlockJAI
from all supplied arguments except hints
and invokes
JAI.create(String,ParameterBlock,RenderingHints)
.
function
- The functional description.width
- The image width.height
- The image height.xScale
- The X scale factor. May be null
.yScale
- The Y scale factor. May be null
.xTrans
- The X translation. May be null
.yTrans
- The Y translation. May be null
.roi
- The optional ROI . May be null
.nodata
- The optional NoData Range used for checking invalid values May be null
.destNoData
- The Y translation.hints
- The RenderingHints
to use. May be null
.RenderedOp
destination.IllegalArgumentException
- if function
is null
.IllegalArgumentException
- if width
is null
.IllegalArgumentException
- if height
is null
.JAI
,
ParameterBlockJAI
,
RenderedOp
Copyright © 2006–2015 GeoSolutions. All rights reserved.