Package org.esa.snap.core.datamodel
Class ImageInfo
java.lang.Object
org.esa.snap.core.datamodel.ImageInfo
- All Implemented Interfaces:
Cloneable
This class contains information about how a product's raster data node is displayed as an image.
- Version:
- $Revision$ $Date$
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Enumerates the possible histogram matching modes.static enum
Enumerates the possible histogram matching modes. -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionImageInfo
(ColorPaletteDef colorPaletteDef) Constructs a new image information instance.ImageInfo
(RGBChannelDef rgbChannelDef) Constructs a new RGB image information instance. -
Method Summary
Modifier and TypeMethodDescriptionfinal ImageInfo
clone()
Creates and returns a copy of this object.Creates and returns a "deep" copy of this object.createIndexColorModel
(Scaling scaling) void
dispose()
Releases all of the resources used by this object instance and all of its owned children.int
Gets the number of color components the image shall have using an instance of thisImageInfo
.Gets the color palette definition as used for images created from single bands.Color[]
static ImageInfo.HistogramMatching
getHistogramMatching
(String mode) Converts a string to a histogram matching.Gets the RGB(A) channel definition as used for images created from 3 tp 4 bands.boolean
void
setColorPaletteDef
(ColorPaletteDef colorPaletteDef, double minSample, double maxSample, boolean autoDistribute) Transfers the colour palette into this image info.void
setColorPaletteDef
(ColorPaletteDef colorPaletteDef, double minSample, double maxSample, boolean autoDistribute, boolean isSourceLogScaled, boolean isTargetLogScaled) void
setColorPaletteDefInvert
(ColorPaletteDef colorPaletteDef, double min, double max) void
Sets the colours of the colour palette of this image info.void
setColorSchemeInfo
(ColorSchemeInfo colorSchemeInfo) void
setHistogramMatching
(ImageInfo.HistogramMatching histogramMatching) void
setLogScaled
(boolean logScaled) void
setNoDataColor
(Color noDataColor) void
setUncertaintyBandName
(String uncertaintyBandName) void
setUncertaintyVisualisationMode
(ImageInfo.UncertaintyVisualisationMode uncertaintyVisualisationMode) void
setZoomToHistLimits
(Boolean zoomToHistLimits)
-
Field Details
-
NO_COLOR
-
HISTOGRAM_MATCHING_OFF
Deprecated.since BEAM 4.2, use enumImageInfo.HistogramMatching
- See Also:
-
HISTOGRAM_MATCHING_EQUALIZE
Deprecated.- See Also:
-
HISTOGRAM_MATCHING_NORMALIZE
Deprecated.- See Also:
-
-
Constructor Details
-
ImageInfo
Constructs a new image information instance.- Parameters:
colorPaletteDef
- the color palette definition
-
ImageInfo
Constructs a new RGB image information instance.- Parameters:
rgbChannelDef
- the RGB channel definition
-
-
Method Details
-
getColorPaletteDef
Gets the color palette definition as used for images created from single bands.- Returns:
- The color palette definition. Can be
null
. In this casegetRgbChannelDef()
is non-null.
-
getRgbChannelDef
Gets the RGB(A) channel definition as used for images created from 3 tp 4 bands.- Returns:
- The RGB(A) channel definition.
Can be
null
. In this casegetColorPaletteDef()
is non-null.
-
getNoDataColor
-
setNoDataColor
-
getUncertaintyBandName
-
setUncertaintyBandName
-
getHistogramMatching
-
setHistogramMatching
-
getUncertaintyVisualisationMode
-
setUncertaintyVisualisationMode
public void setUncertaintyVisualisationMode(ImageInfo.UncertaintyVisualisationMode uncertaintyVisualisationMode) -
isLogScaled
public boolean isLogScaled() -
setLogScaled
public void setLogScaled(boolean logScaled) -
getColors
-
getColorComponentCount
public int getColorComponentCount()Gets the number of color components the image shall have using an instance of thisImageInfo
.- Returns:
3
for RGB images,4
for RGB images with an alpha channel (transparency)
-
createIndexColorModel
-
createComponentColorModel
-
clone
Creates and returns a copy of this object. -
createDeepCopy
Creates and returns a "deep" copy of this object. The method simply returns the value ofclone()
.- Returns:
- a copy of this object
-
dispose
public void dispose()Releases all of the resources used by this object instance and all of its owned children. Its primary use is to allow the garbage collector to perform a vanilla job.This method should be called only if it is for sure that this object instance will never be used again. The results of referencing an instance of this class after a call to
dispose()
are undefined.Overrides of this method should always call
super.dispose();
after disposing this instance. -
setColors
Sets the colours of the colour palette of this image info.- Parameters:
colors
- the new colours
-
setColorPaletteDef
public void setColorPaletteDef(ColorPaletteDef colorPaletteDef, double minSample, double maxSample, boolean autoDistribute) Transfers the colour palette into this image info.- Parameters:
colorPaletteDef
- another colour paletteminSample
- the minium allowed sample value in the new colour palettemaxSample
- the maximum allowed sample value in the new colour paletteautoDistribute
- if true, points are distributed between minSample/maxSample.
-
setColorPaletteDefInvert
-
setColorPaletteDef
public void setColorPaletteDef(ColorPaletteDef colorPaletteDef, double minSample, double maxSample, boolean autoDistribute, boolean isSourceLogScaled, boolean isTargetLogScaled) -
getHistogramMatching
Converts a string to a histogram matching.- Parameters:
mode
- the histogram matching string- Returns:
- the histogram matching.
ImageInfo.HistogramMatching.None
ifmaode
is not "Equalize" or "Normalize".
-
getColorSchemeInfo
-
setColorSchemeInfo
-
getZoomToHistLimits
-
setZoomToHistLimits
-
ImageInfo.HistogramMatching