|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectImageInspector
@Deprecated public class ImageInspector
Provides convenience methods for describing an image. This base class is "read only" in that
it doesn't provide any operation that may change the pixel values. However subclasses like
ImageWorker may applied JAI operations on the image.
| coverage/geotk-coverage (download) | View source code for this class |
| Field Summary | |
|---|---|
static Hints.Key |
IGNORE_FULLY_TRANSPARENT_PIXELS
Deprecated. If TRUE, the RGB values of fully transparent pixels will not be taken
in account when deciding if an Index Color Model is gray scale. |
static PaletteInterpretation |
IHS
Deprecated. An additional PaletteInterpretation code representing the IHS (Intensity, Hue,
Saturation) color space. |
protected RenderedImage |
image
Deprecated. The image on which operation are appiled. |
| Constructor Summary | |
|---|---|
ImageInspector(RenderedImage image)
Deprecated. Creates a new ImageInspector for the specified image. |
|
| Method Summary | |
|---|---|
BufferedImage |
getBufferedImage()
Deprecated. Returns the current image as a buffered image. |
PaletteInterpretation |
getColorSpaceType()
Deprecated. Returns the type of the Color Space used by the image. |
ROI |
getImageAsROI()
Deprecated. Returns a Region Of Interest built from a binarized version of the current rendered image. |
double[] |
getMaximums()
Deprecated. Returns the maximal values found in every image bands. |
double[] |
getMinimums()
Deprecated. Returns the minimal values found in every image bands. |
int |
getNumBands()
Deprecated. Returns the number of bands in the image. |
PlanarImage |
getPlanarImage()
Deprecated. Returns the rendered image as a planar image. |
RenderedImage |
getRenderedImage()
Deprecated. Returns the current image. |
RenderedOp |
getRenderedOperation()
Deprecated. Returns the rendered image as a rendered operation. |
Object |
getRenderingHint(RenderingHints.Key key)
Deprecated. Returns the rendering hint for the specified key, or null if none. |
RenderingHints |
getRenderingHints()
Deprecated. Returns the rendering hints for an image to be computed by subclasses. |
ROI |
getROI()
Deprecated. Returns the Region Of Interest currently set, or null if none. |
int |
getTransparentPixel()
Deprecated. Returns the transparent pixel value, or -1 if none. |
boolean |
isBinary()
Deprecated. Returns true if the image is binary. |
boolean |
isBytes()
Deprecated. Returns true if the image stores its pixel values in bytes. |
boolean |
isGrayScale()
Deprecated. Returns true if the image uses gray scale. |
boolean |
isIndexed()
Deprecated. Returns true if the image uses an
Index Color Model. |
boolean |
isTiled()
Deprecated. Returns true if the image is tiled. |
boolean |
isTranslucent()
Deprecated. Returns true if the image is
translucent. |
void |
removeRenderingHint(RenderingHints.Key key)
Deprecated. Removes a rendering hint. |
void |
setImage(RenderedImage image)
Deprecated. Sets the image on which future operations will be applied. |
void |
setRenderingHint(RenderingHints.Key key,
Object value)
Deprecated. Sets a rendering hint to use for all images to be computed by subclasses. |
void |
setROI(ROI roi)
Deprecated. Sets the Region Of Interest (ROI). |
void |
show()
Deprecated. Shows the current image in a window together with the operation chain as a tree. |
| Methods inherited from class Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final PaletteInterpretation IHS
PaletteInterpretation code representing the IHS (Intensity, Hue,
Saturation) color space. This color space is also known as HSI or HIS and is implemented
in Java Advanced Imaging by the IHSColorSpace class.
public static final Hints.Key IGNORE_FULLY_TRANSPARENT_PIXELS
TRUE, the RGB values of fully transparent pixels will not be taken
in account when deciding if an Index Color Model is gray scale. Fully transparent pixels
are the ones having an alpha value of 0.
The default value is Boolean.TRUE.
isGrayScale(),
setRenderingHint(java.awt.RenderingHints.Key, java.lang.Object)protected RenderedImage image
| Constructor Detail |
|---|
public ImageInspector(RenderedImage image)
ImageInspector for the specified image.
image - The source image.| Method Detail |
|---|
public void setImage(RenderedImage image)
image - The new source image.public RenderedImage getRenderedImage()
getBufferedImage(),
getPlanarImage(),
getRenderedOperation(),
getImageAsROI()public BufferedImage getBufferedImage()
getRenderedImage(),
getPlanarImage(),
getRenderedOperation(),
getImageAsROI()public PlanarImage getPlanarImage()
getRenderedImage(),
getRenderedOperation(),
getImageAsROI()public RenderedOp getRenderedOperation()
getRenderedImage(),
getPlanarImage(),
getImageAsROI()public ROI getImageAsROI()
getRenderedImage(),
getPlanarImage(),
getRenderedOperation()public ROI getROI()
null if none.
The ROI applies to statistical methods like getMinimums() and getMaximums().
The default value is null, which means that statistics are computed on the whole
image.
getMinimums(),
getMaximums()public void setROI(ROI roi)
null value sets the ROI to the
whole image. The ROI applies to statistical methods like getMinimums()
and getMaximums().
roi - The new Region Of Interest.getMinimums(),
getMaximums()public RenderingHints getRenderingHints()
setRenderingHint(java.awt.RenderingHints.Key, java.lang.Object) method. If the
user provided explicitly a JAI.KEY_IMAGE_LAYOUT, then the user layout has
precedence over the automatic layout computed in the previous item.
null).public Object getRenderingHint(RenderingHints.Key key)
null if none.
Newly created image worker have no rendering hints.
key - The key for which to get the rendering hint.
public void setRenderingHint(RenderingHints.Key key,
Object value)
Some common examples:
setRenderingHint(JAI.KEY_TILE_CACHE, null)
disables completely the tile cache.setRenderingHint(ImageWorker.TILING_ALLOWED, Boolean.FALSE)
forces all operators to produce untiled images.
key - The key for which to set a rendering hint.value - The value to assign to the given key.public void removeRenderingHint(RenderingHints.Key key)
setRenderingHint(key, null). This is especially
true for the tile cache hint:
setRenderingHint(JAI.KEY_TILE_CACHE, null) disables the use of any tile cache.
In other words, this method call do request a tile cache, which happen to be the "null"
cache.removeRenderingHint(JAI.KEY_TILE_CACHE) unsets any tile cache specified by a
previous rendering hint. All images to be computed after this method call will save
their tiles in the JAI default tile cache.
key - The key for which to remove the rendering hint.public int getNumBands()
ImageWorker.retainBands(int, int),
SampleModel.getNumBands()public double[] getMinimums()
getMaximums(),
setROI(javax.media.jai.ROI)public double[] getMaximums()
getMinimums(),
setROI(javax.media.jai.ROI)public int getTransparentPixel()
public boolean isTranslucent()
true if the image is
translucent.
true if the image is translucent.ImageWorker.forceBitmaskIndexColorModel(int)public boolean isTiled()
true if the image is tiled.
true if the image is tiled.ImageWorker.tile()public boolean isBytes()
true if the image stores its pixel values in bytes.
If true, then each sample values use at most 8 bits. However they may use
less than 8 bits. For example a binary image stores 8 pixels by byte.
true if the image stores pixel values as bytes.ImageWorker.format(int, boolean)public boolean isBinary()
true if the image is binary. An image is binary if it has
only one band and uses only one bit per pixel. Such image can contains only two values:
0 and 1.
true if the image is binary.ImageWorker.binarize(boolean)public boolean isIndexed()
true if the image uses an
Index Color Model.
true if the image is indexed.ImageWorker.setColorModelType(java.lang.Class extends java.awt.image.ColorModel>)public boolean isGrayScale()
true if the image uses gray scale. This method returns
true if one of the following conditions is true:
IndexColorModel and the color map contains
identical values for the Red, Green and Blue components. The color of fully transparent
pixels is ignored by default, but this can be changed by assigning the value FALSE
to the IGNORE_FULLY_TRANSPARENT_PIXELS rendering hint.
Relationship with Color Space type
If this method returns false, then it is guaranteed that getColorSpaceType()
will not return PaletteInterpretation.GRAY. However the converse is not necessarily
true. See the Index Color Model section in getColorSpaceType().
true if the image uses gray scale.IGNORE_FULLY_TRANSPARENT_PIXELSpublic PaletteInterpretation getColorSpaceType()
PaletteInterpretation code list, or the IHS constant. Otherwise
this method returns null.
Index Color Model
RGB Color Space doesn't mean that pixel values are directly stored as RGB components.
The main canvat is IndexColorModel, which has RGB color space despite the fact
that images using such Color Model have only one band. In addition the color map in an
IndexColorModel may contains only gray colors - this method will not
returns the PaletteInterpretation.GRAY in this case since the Color Space still
of type RGB in the Java2D sense. For detecting such
IndexColorModel having only gray colors, use isGrayScale() instead.
null if unknown.ImageWorker.setColorSpaceType(org.opengis.coverage.PaletteInterpretation)
@Debug
public void show()
throws HeadlessException
geotk-widgets.jar file in the classpath.
HeadlessException - if geotk-widgets.jar is not on the classpath, or
if AWT can't create the window components.OperationTreeBrowser.show(RenderedImage)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||