|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.media.jai.OperationDescriptorImpl
it.geosolutions.jaiext.rescale.RescaleDescriptor
public class RescaleDescriptor
An OperationDescriptor
describing the "Rescale" operation.
The "Rescale" operation takes a rendered or renderable source image and changes the image dynamics by multiplying each pixel value by a constant and then adding another constant to the result of the multiplication. Each constant value is associated to a band. If the number of constants supplied is less than the number of bands of the destination, then the constant from entry 0 is applied to all the bands. Otherwise, a constant from a different entry is applied to each band. The optional presence of NoData or ROI is taken into account by replacing each value out of ROI or each NoData, with the supplied DestinationNoData value.
The destination pixel values are defined by the following pseudocode:
dst = destination pixel array src = source pixel array dst[x][y][b] = src[x][y][b] * constant + offset;
The pixel arithmetic is performed using the data type of the destination image. By default, the destination will have the same data type as the
source image unless an ImageLayout
containing a SampleModel
with a different data type is supplied as a rendering hint.
Name | Value |
---|---|
GlobalName | Rescaling |
LocalName | Rescaling |
Vendor | it.geosolutions.jaiext.roiaware |
Description | Operation which converts the image dynamic to a new dynamic. |
DocURL | Not Defined |
Version | 1.0 |
arg0Desc | Scale factors used for rescaling values. |
arg1Desc | Offset factors used for rescaling values. |
arg2Desc | ROI object used. |
arg3Desc | No Data Range used. |
arg4Desc | Boolean checking if ROI RasterAccessor is used. |
arg5Desc | Destination No Data value. |
Name | Class Type | Default Value |
---|---|---|
scale | double[] | {1.0} |
offset | double[] | {0.0} |
ROI | javax.media.jai.ROI | null |
noData | it.geosolutions.jaiext.range.Range | null |
useRoiAccessor | Boolean | false |
destNoData | Double | 0.0d |
Field Summary |
---|
Fields inherited from class javax.media.jai.OperationDescriptorImpl |
---|
sourceNames, supportedModes |
Fields inherited from interface javax.media.jai.OperationDescriptor |
---|
NO_PARAMETER_DEFAULT |
Constructor Summary | |
---|---|
RescaleDescriptor()
Constructor. |
Method Summary | |
---|---|
static javax.media.jai.RenderedOp |
create(RenderedImage source0,
double[] scales,
double[] offsets,
javax.media.jai.ROI roi,
Range rangeND,
boolean useRoiAccessor,
double destNoData,
RenderingHints hints)
Maps the pixels values of an image from one range to another range. |
static javax.media.jai.RenderableOp |
createRenderable(RenderableImage source0,
double[] scales,
double[] offsets,
javax.media.jai.ROI roi,
Range rangeND,
boolean useRoiAccessor,
double destNoData,
RenderingHints hints)
Maps the pixels values of an image from one range to another range. |
javax.media.jai.PropertyGenerator[] |
getPropertyGenerators()
Returns an array of PropertyGenerators implementing property inheritance for the "Rescale" operation |
boolean |
isRenderableSupported()
Returns true since renderable operation is supported. |
Methods inherited from class javax.media.jai.OperationDescriptorImpl |
---|
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, isRenderedSupported, makeDefaultSourceClassList, validateArguments, validateArguments, validateParameters, validateParameters, validateRenderableArguments, validateRenderableSources, validateSources, validateSources |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RescaleDescriptor()
Method Detail |
---|
public boolean isRenderableSupported()
true
since renderable operation is supported.
isRenderableSupported
in interface javax.media.jai.OperationDescriptor
isRenderableSupported
in class javax.media.jai.OperationDescriptorImpl
public javax.media.jai.PropertyGenerator[] getPropertyGenerators()
PropertyGenerators
implementing property inheritance for the "Rescale" operation
getPropertyGenerators
in interface javax.media.jai.OperationDescriptor
getPropertyGenerators
in class javax.media.jai.OperationDescriptorImpl
public static javax.media.jai.RenderedOp create(RenderedImage source0, double[] scales, double[] offsets, javax.media.jai.ROI roi, Range rangeND, boolean useRoiAccessor, double destNoData, RenderingHints hints)
Creates a ParameterBlockJAI
from all supplied arguments except hints
and invokes
JAI.create(String,ParameterBlock,RenderingHints)
.
source0
- RenderedImage
source 0.scales
- The per-band scale factors to multiply by.offsets
- The per-band offsets to be added.roi
- Optional ROI used for computations.noData
- Optional No Data range used for computations.useROIAccessor
- Boolean indicating if ROI RasterAccessor must be used.destinationNoData
- Destination value for No Data.hints
- The RenderingHints
to use.
RenderedOp
destination.
IllegalArgumentException
- if source0
is null
.public static javax.media.jai.RenderableOp createRenderable(RenderableImage source0, double[] scales, double[] offsets, javax.media.jai.ROI roi, Range rangeND, boolean useRoiAccessor, double destNoData, RenderingHints hints)
Creates a ParameterBlockJAI
from all supplied arguments except hints
and invokes
JAI.createRenderable(String, ParameterBlock, RenderingHints)
.
source0
- RenderedImage
source 0.scales
- The per-band scale factors to multiply by.offsets
- The per-band offsets to be added.roi
- Optional ROI used for computations.noData
- Optional No Data range used for computations.useROIAccessor
- Boolean indicating if ROI RasterAccessor must be used.destinationNoData
- Destination value for No Data.hints
- The RenderingHints
to use.
RenderedOp
destination.
IllegalArgumentException
- if source0
is null
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |