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: RangeLookupDescriptor.java 1791 2011-06-23 03:28:29Z michael.bedward $
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
static javax.media.jai.RenderedOp create(RenderedImage source0, RangeLookupTable table, RenderingHints hints)
          Deprecated. This method will be removed in JAITools version 1.3
 
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.

Method Detail

create

public static javax.media.jai.RenderedOp create(RenderedImage source0,
                                                RangeLookupTable table,
                                                RenderingHints hints)
Deprecated. This method will be removed in JAITools version 1.3

Convenience method which constructs a ParameterBlockJAI and invokes JAI.create("RangeLookup", params) .

Parameters:
source0 - the source image
table - an instance of RangeLookupTable defining the mappings from source image value ranges to destination image values
hints - rendering hints (may be null)
Returns:
the RenderedOp destination


Copyright © 2009-2011. All Rights Reserved.