org.jaitools.media.jai.rangelookup
Class RangeLookupDescriptor

java.lang.Object
  extended by javax.media.jai.OperationDescriptorImpl
      extended by org.jaitools.media.jai.rangelookup.RangeLookupDescriptor
All Implemented Interfaces:
Serializable, javax.media.jai.OperationDescriptor, javax.media.jai.RegistryElementDescriptor

public class RangeLookupDescriptor
extends javax.media.jai.OperationDescriptorImpl

Describes the "RangeLookup" operation.

This is a variation on the JAI javax.media.jai.LookupDescriptor. It works with a RangeLookupTable object in which each entry maps a source image value range to a destination image value.

Example of use...



 // Perform a lookup as follows:
 //   Src Value     Dest Value
 //     x < 5            1
 //   5 <= x < 10        2
 //  10 <= x <= 20       3
 //  any other value    99
 
 RenderedImage myIntImg = ...

 RangeLookupTable table = new RangeLookupTable(99);

 Range r = new Range(null, true, 5, false);  // x < 5
 table.add(r, 1);

 r = new Range(5, true, 10, false);  // 5 <= x < 10
 table.add(r, 2);

 r = new Range(10, true, 20, true);  // 10 <= x <= 20
 table.add(r, 2);

 ParameterBlockJAI pb = new ParameterBlockJAI("rangelookup");
 pb.setSource("source0", myIntImg);
 pb.setParameter("table", table);
 RenderedImage luImg = JAI.create("rangelookup", pb);
 

Since:
1.0
Version:
$Id$
Author:
Michael Bedward
See Also:
Range, RangeLookupTable, Serialized Form

Field Summary
 
Fields inherited from class javax.media.jai.OperationDescriptorImpl
resources, sourceNames, supportedModes
 
Fields inherited from interface javax.media.jai.OperationDescriptor
NO_PARAMETER_DEFAULT
 
Constructor Summary
RangeLookupDescriptor()
          Constructor.
 
Method Summary
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RangeLookupDescriptor

public RangeLookupDescriptor()
Constructor.



Copyright © 2009-2012. All Rights Reserved.