it.geosolutions.jaiext.nullop
Class NullCRIF

java.lang.Object
  extended by javax.media.jai.CRIFImpl
      extended by it.geosolutions.jaiext.nullop.NullCRIF
All Implemented Interfaces:
ContextualRenderedImageFactory, RenderedImageFactory

public class NullCRIF
extends javax.media.jai.CRIFImpl

A ContextualRenderedImageFactory representing an operation which performs no processing of its image source(s) per se, i.e., a no-op.

The primary use of this image factory is as a utility class in implementing operations which generate only non-image data via the use of PropertyGenerators. Another use of this class is the possibility to put this OpImage at the sink of a RenderedOp chain for caching the tiles of the last OpImage without caching the tiles of the previous calculations.


Field Summary
 
Fields inherited from class javax.media.jai.CRIFImpl
operationName
 
Constructor Summary
NullCRIF()
          Constructs a NullCRIF.
 
Method Summary
 RenderedImage create(ParameterBlock pb, RenderingHints renderHints)
          Returns the first source in the source list in the ParameterBlock or the value returned by getSourcelessImage() if there are no sources.
static RenderedImage getSourcelessImage()
          Gets the value of the RenderedImage to be returned by the RIF.create() method when there are no sources in the ParameterBlock.
static void setSourcelessImage(RenderedImage im)
          Sets the value of the RenderedImage to be returned by the RenderedImageFactory.create() method when there are no sources in the ParameterBlock.
 
Methods inherited from class javax.media.jai.CRIFImpl
create, getBounds2D, getProperty, getPropertyNames, isDynamic, mapRenderContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NullCRIF

public NullCRIF()
Constructs a NullCRIF. The operationName in the superclass is set to null.

Method Detail

setSourcelessImage

public static final void setSourcelessImage(RenderedImage im)
Sets the value of the RenderedImage to be returned by the RenderedImageFactory.create() method when there are no sources in the ParameterBlock.

Parameters:
a - RenderedImage or null.

getSourcelessImage

public static final RenderedImage getSourcelessImage()
Gets the value of the RenderedImage to be returned by the RIF.create() method when there are no sources in the ParameterBlock.

Returns:
a RenderedImage or null.

create

public RenderedImage create(ParameterBlock pb,
                            RenderingHints renderHints)
Returns the first source in the source list in the ParameterBlock or the value returned by getSourcelessImage() if there are no sources.

Specified by:
create in interface RenderedImageFactory
Specified by:
create in class javax.media.jai.CRIFImpl
Throws:
ClassCastException - if there are sources and the source at index zero is not a RenderedImage.


Copyright © 2006–2015 GeoSolutions. All rights reserved.