org.geotoolkit.coverage.processing.operation
Class Recolor

Object
  extended by AbstractOperation
      extended by Operation2D
          extended by IndexColorOperation
              extended by Recolor
All Implemented Interfaces:
Serializable, Operation

@Immutable
public class Recolor
extends IndexColorOperation

Replaces the colors of a GridCoverage2D. This operation accepts one argument, ColorMaps, which must be an instance of ColorMap.

Name: "Recolor"
JAI operator: none
Parameters:

Name Class Default value Minimum value Maximum value
"Source" GridCoverage2D N/A N/A N/A
"ColorMaps" ColorMap[] A gray scale N/A N/A

Since:
1.2
Version:
3.00
Author:
Martin Desruisseaux (IRD)
See Also:
Serialized Form
Module:
coverage/geotk-coverage (download)    View source code for this class

Field Summary
static ParameterDescriptor<ColorMap[]> COLOR_MAPS
          The parameter descriptor for the color map.
 
Fields inherited from class Operation2D
PRIMARY_SOURCE_INDEX, SOURCE_0, SOURCE_1, SOURCE_2
 
Fields inherited from class AbstractOperation
descriptor
 
Constructor Summary
Recolor()
          Constructs a new "Recolor" operation.
 
Method Summary
protected  GridSampleDimension transformColormap(int[] ARGB, int band, GridSampleDimension sampleDimension, ParameterValueGroup parameters)
          Transforms the supplied RGB colors.
 
Methods inherited from class IndexColorOperation
doOperation, getComputationView
 
Methods inherited from class Operation2D
extractSources, extractSources
 
Methods inherited from class AbstractOperation
equals, getDescription, getDocURL, getName, getNumSources, getParameters, getVendor, getVersion, hashCode, toString
 
Methods inherited from class Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

COLOR_MAPS

public static final ParameterDescriptor<ColorMap[]> COLOR_MAPS
The parameter descriptor for the color map.

Constructor Detail

Recolor

public Recolor()
Constructs a new "Recolor" operation.

Method Detail

transformColormap

protected GridSampleDimension transformColormap(int[] ARGB,
                                                int band,
                                                GridSampleDimension sampleDimension,
                                                ParameterValueGroup parameters)
Transforms the supplied RGB colors.

Specified by:
transformColormap in class IndexColorOperation
Parameters:
ARGB - Alpha, Red, Green and Blue components to transform.
band - The band number, from 0 to the number of bands in the image -1.
sampleDimension - The sample dimension of band band.
parameters - The user-supplied parameters.
Returns:
A sample dimension identical to sampleDimension except for the colors. Subclasses may conservatively returns sampleDimension.
See Also:
ColorMap.recolor(org.geotoolkit.coverage.GridSampleDimension, int[])


Copyright © 2009-2012 Geotoolkit.org. All Rights Reserved.