Package org.esa.snap.core.datamodel
Class ImageInfo
- java.lang.Object
-
- org.esa.snap.core.datamodel.ImageInfo
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ImageInfo.HistogramMatching
Enumerates the possible histogram matching modes.static class
ImageInfo.UncertaintyVisualisationMode
Enumerates the possible histogram matching modes.
-
Field Summary
Fields Modifier and Type Field Description static String
HISTOGRAM_MATCHING_EQUALIZE
Deprecated.static String
HISTOGRAM_MATCHING_NORMALIZE
Deprecated.static String
HISTOGRAM_MATCHING_OFF
Deprecated.since BEAM 4.2, use enumImageInfo.HistogramMatching
static Color
NO_COLOR
-
Constructor Summary
Constructors Constructor Description ImageInfo(ColorPaletteDef colorPaletteDef)
Constructs a new image information instance.ImageInfo(RGBChannelDef rgbChannelDef)
Constructs a new RGB image information instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ImageInfo
clone()
Creates and returns a copy of this object.ComponentColorModel
createComponentColorModel()
ImageInfo
createDeepCopy()
Creates and returns a "deep" copy of this object.IndexColorModel
createIndexColorModel(Scaling scaling)
void
dispose()
Releases all of the resources used by this object instance and all of its owned children.int
getColorComponentCount()
Gets the number of color components the image shall have using an instance of thisImageInfo
.ColorPaletteDef
getColorPaletteDef()
Gets the color palette definition as used for images created from single bands.Color[]
getColors()
ColorSchemeInfo
getColorSchemeInfo()
ImageInfo.HistogramMatching
getHistogramMatching()
static ImageInfo.HistogramMatching
getHistogramMatching(String mode)
Converts a string to a histogram matching.Color
getNoDataColor()
RGBChannelDef
getRgbChannelDef()
Gets the RGB(A) channel definition as used for images created from 3 tp 4 bands.String
getUncertaintyBandName()
ImageInfo.UncertaintyVisualisationMode
getUncertaintyVisualisationMode()
Boolean
getZoomToHistLimits()
boolean
isLogScaled()
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
setColors(Color[] colors)
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 Detail
-
NO_COLOR
public static final Color NO_COLOR
-
HISTOGRAM_MATCHING_OFF
@Deprecated public static final String HISTOGRAM_MATCHING_OFF
Deprecated.since BEAM 4.2, use enumImageInfo.HistogramMatching
- See Also:
- Constant Field Values
-
HISTOGRAM_MATCHING_EQUALIZE
@Deprecated public static final String HISTOGRAM_MATCHING_EQUALIZE
Deprecated.- See Also:
- Constant Field Values
-
HISTOGRAM_MATCHING_NORMALIZE
@Deprecated public static final String HISTOGRAM_MATCHING_NORMALIZE
Deprecated.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ImageInfo
public ImageInfo(ColorPaletteDef colorPaletteDef)
Constructs a new image information instance.- Parameters:
colorPaletteDef
- the color palette definition
-
ImageInfo
public ImageInfo(RGBChannelDef rgbChannelDef)
Constructs a new RGB image information instance.- Parameters:
rgbChannelDef
- the RGB channel definition
-
-
Method Detail
-
getColorPaletteDef
public ColorPaletteDef 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
public RGBChannelDef 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
public Color getNoDataColor()
-
setNoDataColor
public void setNoDataColor(Color noDataColor)
-
getUncertaintyBandName
public String getUncertaintyBandName()
-
setUncertaintyBandName
public void setUncertaintyBandName(String uncertaintyBandName)
-
getHistogramMatching
public ImageInfo.HistogramMatching getHistogramMatching()
-
setHistogramMatching
public void setHistogramMatching(ImageInfo.HistogramMatching histogramMatching)
-
getUncertaintyVisualisationMode
public ImageInfo.UncertaintyVisualisationMode getUncertaintyVisualisationMode()
-
setUncertaintyVisualisationMode
public void setUncertaintyVisualisationMode(ImageInfo.UncertaintyVisualisationMode uncertaintyVisualisationMode)
-
isLogScaled
public boolean isLogScaled()
-
setLogScaled
public void setLogScaled(boolean logScaled)
-
getColors
public Color[] 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
public IndexColorModel createIndexColorModel(Scaling scaling)
-
createComponentColorModel
public ComponentColorModel createComponentColorModel()
-
clone
public final ImageInfo clone()
Creates and returns a copy of this object.
-
createDeepCopy
public ImageInfo 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
public void setColors(Color[] colors)
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
public void setColorPaletteDefInvert(ColorPaletteDef colorPaletteDef, double min, double max)
-
setColorPaletteDef
public void setColorPaletteDef(ColorPaletteDef colorPaletteDef, double minSample, double maxSample, boolean autoDistribute, boolean isSourceLogScaled, boolean isTargetLogScaled)
-
getHistogramMatching
public static ImageInfo.HistogramMatching getHistogramMatching(String mode)
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
public ColorSchemeInfo getColorSchemeInfo()
-
setColorSchemeInfo
public void setColorSchemeInfo(ColorSchemeInfo colorSchemeInfo)
-
getZoomToHistLimits
public Boolean getZoomToHistLimits()
-
setZoomToHistLimits
public void setZoomToHistLimits(Boolean zoomToHistLimits)
-
-