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 classImageInfo.HistogramMatchingEnumerates the possible histogram matching modes.static classImageInfo.UncertaintyVisualisationModeEnumerates the possible histogram matching modes.
-
Field Summary
Fields Modifier and Type Field Description static StringHISTOGRAM_MATCHING_EQUALIZEDeprecated.static StringHISTOGRAM_MATCHING_NORMALIZEDeprecated.static StringHISTOGRAM_MATCHING_OFFDeprecated.since BEAM 4.2, use enumImageInfo.HistogramMatchingstatic ColorNO_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 ImageInfoclone()Creates and returns a copy of this object.ComponentColorModelcreateComponentColorModel()ImageInfocreateDeepCopy()Creates and returns a "deep" copy of this object.IndexColorModelcreateIndexColorModel(Scaling scaling)voiddispose()Releases all of the resources used by this object instance and all of its owned children.intgetColorComponentCount()Gets the number of color components the image shall have using an instance of thisImageInfo.ColorPaletteDefgetColorPaletteDef()Gets the color palette definition as used for images created from single bands.Color[]getColors()ColorSchemeInfogetColorSchemeInfo()ImageInfo.HistogramMatchinggetHistogramMatching()static ImageInfo.HistogramMatchinggetHistogramMatching(String mode)Converts a string to a histogram matching.ColorgetNoDataColor()RGBChannelDefgetRgbChannelDef()Gets the RGB(A) channel definition as used for images created from 3 tp 4 bands.StringgetUncertaintyBandName()ImageInfo.UncertaintyVisualisationModegetUncertaintyVisualisationMode()BooleangetZoomToHistLimits()booleanisLogScaled()voidsetColorPaletteDef(ColorPaletteDef colorPaletteDef, double minSample, double maxSample, boolean autoDistribute)Transfers the colour palette into this image info.voidsetColorPaletteDef(ColorPaletteDef colorPaletteDef, double minSample, double maxSample, boolean autoDistribute, boolean isSourceLogScaled, boolean isTargetLogScaled)voidsetColorPaletteDefInvert(ColorPaletteDef colorPaletteDef, double min, double max)voidsetColors(Color[] colors)Sets the colours of the colour palette of this image info.voidsetColorSchemeInfo(ColorSchemeInfo colorSchemeInfo)voidsetHistogramMatching(ImageInfo.HistogramMatching histogramMatching)voidsetLogScaled(boolean logScaled)voidsetNoDataColor(Color noDataColor)voidsetUncertaintyBandName(String uncertaintyBandName)voidsetUncertaintyVisualisationMode(ImageInfo.UncertaintyVisualisationMode uncertaintyVisualisationMode)voidsetZoomToHistLimits(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:
3for RGB images,4for 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.Noneifmaodeis not "Equalize" or "Normalize".
-
getColorSchemeInfo
public ColorSchemeInfo getColorSchemeInfo()
-
setColorSchemeInfo
public void setColorSchemeInfo(ColorSchemeInfo colorSchemeInfo)
-
getZoomToHistLimits
public Boolean getZoomToHistLimits()
-
setZoomToHistLimits
public void setZoomToHistLimits(Boolean zoomToHistLimits)
-
-