org.geotools.image.io
Class GeographicImageReadParam

java.lang.Object
  extended by javax.imageio.IIOParam
      extended by javax.imageio.ImageReadParam
          extended by org.geotools.image.io.GeographicImageReadParam
Direct Known Subclasses:
NetcdfReadParam

public class GeographicImageReadParam
extends javax.imageio.ImageReadParam

Default parameters for GeographicImageReader.

Since:
2.4
Version:
$Id: GeographicImageReadParam.java 30679 2008-06-13 10:19:41Z acuster $
Author:
Martin Desruisseaux

Field Summary
static java.lang.String DEFAULT_PALETTE_NAME
          The name of the default color palette to apply when none was explicitly specified.
 
Fields inherited from class javax.imageio.ImageReadParam
canSetSourceRenderSize, destination, destinationBands, minProgressivePass, numProgressivePasses, sourceRenderSize
 
Fields inherited from class javax.imageio.IIOParam
controller, defaultController, destinationOffset, destinationType, sourceBands, sourceRegion, sourceXSubsampling, sourceYSubsampling, subsamplingXOffset, subsamplingYOffset
 
Constructor Summary
GeographicImageReadParam(javax.imageio.ImageReader reader)
          Creates a new, initially empty, set of parameters.
 
Method Summary
 java.lang.String getPaletteName()
          Returns the name of the color palette to apply when creating an index color model.
 int getVisibleBand()
          Returns the band to display in the target image.
 void setPaletteName(java.lang.String palette)
          Sets the color palette as one of the available names provided by the default palette factory.
 void setVisibleBand(int visibleBand)
          Sets the band to make visible in the destination image.
 java.lang.String toString()
          Returns a string representation of this block of parameters.
 
Methods inherited from class javax.imageio.ImageReadParam
canSetSourceRenderSize, getDestination, getDestinationBands, getSourceMaxProgressivePass, getSourceMinProgressivePass, getSourceNumProgressivePasses, getSourceRenderSize, setDestination, setDestinationBands, setDestinationType, setSourceProgressivePasses, setSourceRenderSize
 
Methods inherited from class javax.imageio.IIOParam
activateController, getController, getDefaultController, getDestinationOffset, getDestinationType, getSourceBands, getSourceRegion, getSourceXSubsampling, getSourceYSubsampling, getSubsamplingXOffset, getSubsamplingYOffset, hasController, setController, setDestinationOffset, setSourceBands, setSourceRegion, setSourceSubsampling
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_PALETTE_NAME

public static final java.lang.String DEFAULT_PALETTE_NAME
The name of the default color palette to apply when none was explicitly specified.

See Also:
getPaletteName(), setPaletteName(java.lang.String), Constant Field Values
Constructor Detail

GeographicImageReadParam

public GeographicImageReadParam(javax.imageio.ImageReader reader)
Creates a new, initially empty, set of parameters.

Parameters:
reader - The reader for which this parameter block is created
Method Detail

getVisibleBand

public int getVisibleBand()
Returns the band to display in the target image. In theory, images backed by index color model should have only ony band. But sometime we want to load additional bands as numerical data, in order to perform computations. In such case, we need to specify which band in the destination image will be used as an index for displaying the colors. The default value is 0.


setVisibleBand

public void setVisibleBand(int visibleBand)
                    throws java.lang.IllegalArgumentException
Sets the band to make visible in the destination image.

Parameters:
visibleBand - The band to make visible.
Throws:
java.lang.IllegalArgumentException - if the specified band index is invalid.

getPaletteName

public java.lang.String getPaletteName()
Returns the name of the color palette to apply when creating an index color model. This is the name specified by the last call to setPaletteName(java.lang.String).


setPaletteName

public void setPaletteName(java.lang.String palette)
Sets the color palette as one of the available names provided by the default palette factory. This name will be given by the GeographicImageReader default implementation to the default palette factory for creating a image type specifier.

See Also:
PaletteFactory.getAvailableNames()

toString

public java.lang.String toString()
Returns a string representation of this block of parameters.

Overrides:
toString in class java.lang.Object


Copyright © 1996-2010 Geotools. All Rights Reserved.