public class LookupDescriptor
extends javax.media.jai.OperationDescriptorImpl
OperationDescriptor
describing the "Lookup" operation.
The Lookup operation takes a rendered image and a lookup table, and performs general table lookup by passing the source image through the table. If ROI or No Data values are set then the lookupTable takes in account this 2 parameters. The out-of-ROI values or No Data values are set to destination no data.
The source may be a single- or multi-banded image of data types byte
, ushort
, short
, or int
.
The lookup table may be single- or multi-banded and of any DataBuffer supported data types. The destination image must have the same data type as
the lookup table, and its number of bands is determined based on the number of bands of the source and the table. If the source is single-banded,
the destination has the same number of bands as the lookup table; otherwise, the destination has the same number of bands as the source.
If either the source or the table is single-banded and the other one is multi-banded, then the single band is applied to every band of the multi-banded object. If both are multi-banded, then their corresponding bands are matched up.
The table may have a set of offset values, one for each band. This value is subtracted from the source pixel values before indexing into the table data array.
It is the user's responsibility to make certain the lookup table supplied is suitable for the source image. Specifically, the table data covers the entire range of the source data. Otherwise, the result of this operation is undefined.
By the nature of this operation, the destination may have a different number of bands and/or data type from the source. The
SampleModel
of the destination is created in accordance with the actual lookup table used in a specific case.
The destination pixel values are defined by the pseudocode:
dst[x][y][b] = table[b][src[x][y][0] - offsets[b]]
dst[x][y][b] = table[0][src[x][y][b] - offsets[0]]
dst[x][y][b] = table[b][src[x][y][b] - offsets[b]]
Name | Value |
---|---|
GlobalName | Lookup |
LocalName | Lookup |
Vendor | it.geosolutions.jaiext |
Description | Lookup operation supporting ROI and No Data. |
DocURL | Not defined |
Version | 1.0 |
arg0Desc | The lookup table to use. |
arg1Desc | Destination No Data used for ROI or No Data. |
arg2Desc | ROI object used. |
arg3Desc | No Data Range used. |
arg4Desc | Boolean checking if ROI RasterAccessor is used. |
Name | Class Type | Default Value |
---|---|---|
table | it.geosolutions.jaiext.lookup.LookupTable | NO_PARAMETER_DEFAULT |
destinationNoData | Double | 0 |
ROI | javax.media.jai.ROI | NO_PARAMETER_DEFAULT |
NoData | it.geosolutions.jaiext.range.Range | NO_PARAMETER_DEFAULT |
useRoiAccessor | Boolean | false |
Constructor and Description |
---|
LookupDescriptor() |
Modifier and Type | Method and Description |
---|---|
static javax.media.jai.RenderedOp |
create(RenderedImage source0,
LookupTable table,
double destinationNoData,
javax.media.jai.ROI roi,
Range noData,
boolean useRoiAccessor,
RenderingHints hints)
Performs a lookup operation on an integral image.
|
javax.media.jai.PropertyGenerator[] |
getPropertyGenerators()
Returns an array of
PropertyGenerators implementing property inheritance for the "Lookup" 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 "Lookup" operationgetPropertyGenerators
in interface javax.media.jai.OperationDescriptor
getPropertyGenerators
in class javax.media.jai.OperationDescriptorImpl
public static javax.media.jai.RenderedOp create(RenderedImage source0, LookupTable table, double destinationNoData, javax.media.jai.ROI roi, Range noData, boolean useRoiAccessor, RenderingHints hints)
Creates a ParameterBlockJAI
from all supplied arguments except hints
and invokes
JAI.create(String,ParameterBlock,RenderingHints)
.
source0
- RenderedImage
source 0.table
- The lookuptable used.destinationNoData
- Destination no data used for ROI or No Data.ROI
- Roi object on which the calculation are performed.NoData
- No Data range used for calculation.useRoiAccessor
- Boolean indicating if ROI RasterAccessor must be used.hints
- The RenderingHints
to use.RenderedOp
destination.IllegalArgumentException
- if source0
is null
.JAI
,
ParameterBlockJAI
,
RenderedOp
Copyright © 2006–2017 GeoSolutions. All rights reserved.