org.esa.beam.framework.datamodel
Class RGBImageProfile

java.lang.Object
  extended by org.esa.beam.framework.datamodel.RGBImageProfile
All Implemented Interfaces:
com.bc.ceres.core.runtime.ConfigurableExtension

public class RGBImageProfile
extends Object
implements com.bc.ceres.core.runtime.ConfigurableExtension

A profile used for the creation of RGB images. The profile comprises the band arithmetic expressions for the computation of red, gree, blue and alpha (optional) channels of the resulting image.


Field Summary
static String ALPHA_BAND_NAME
          The default name for the band providing input for the alpha image channel.
static String BLUE_BAND_NAME
          The default name for the band providing input for the blue image channel.
static String FILENAME_EXTENSION
           
static String GREEN_BAND_NAME
          The default name for the band providing input for the green image channel.
static String PROPERTY_KEY_ALPHA
           
static String PROPERTY_KEY_BLUE
           
static String PROPERTY_KEY_GREEN
           
static String PROPERTY_KEY_INTERNAL
           
static String PROPERTY_KEY_NAME
           
static String PROPERTY_KEY_PREFIX_RGB_PROFILE
          Preferences key for RGB profile entries
static String PROPERTY_KEY_RED
           
static String RED_BAND_NAME
          The default name for the band providing input for the red image channel.
static String[] RGB_BAND_NAMES
          An array of 3 strings containing the names for the default red, green and blue bands.
static String[] RGBA_BAND_NAMES
          An array of 4 strings containing the names for the default red, green, blue and alpha bands.
 
Constructor Summary
RGBImageProfile()
           
RGBImageProfile(String name)
           
RGBImageProfile(String name, String[] rgbaExpressions)
           
 
Method Summary
 void configure(com.bc.ceres.core.runtime.ConfigurationElement config)
           
 boolean equalExpressions(RGBImageProfile profile)
           
 boolean equalExpressions(String[] rgbaExpressions)
           
 boolean equals(Object obj)
           
 String getAlphaExpression()
           
 String getBlueExpression()
           
static RGBImageProfile getCurrentProfile(Product product)
           
 String getGreenExpression()
           
 String getName()
           
 void getProperties(Properties properties)
          Sets profile properties and accoringly sets them in the given property map.
 String getRedExpression()
           
 String[] getRgbaExpressions()
           
 String[] getRgbExpressions()
           
 boolean hasAlpha()
           
 int hashCode()
           
 boolean isApplicableTo(Product product)
          Tests whether this profile is applicable to the given product.
 boolean isInternal()
           
 boolean isValid()
          Tests if one of the R,G,B expressions are non-empty strings.
static RGBImageProfile loadProfile(File file)
          Loads a profile from the given file using the Java properties file format
static RGBImageProfile loadProfile(URL url)
          Loads a profile from the given url using the Java properties file format
 void setAlphaExpression(String expression)
           
 void setBlueExpression(String expression)
           
 void setGreenExpression(String expression)
           
 void setInternal(boolean internal)
           
 void setName(String name)
           
 void setProperties(Properties properties)
          Sets profile properties from the given property map.
 void setRedExpression(String expression)
           
 void setRgbaExpressions(String[] rgbaExpressions)
           
 void setRgbExpressions(String[] rgbExpressions)
           
 void store(File file)
          Stores this profile in the given file using the Java properties file format
static void storeRgbaExpressions(Product product, String[] rgbaExpressions)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

RED_BAND_NAME

public static final String RED_BAND_NAME
The default name for the band providing input for the red image channel.

See Also:
Constant Field Values

GREEN_BAND_NAME

public static final String GREEN_BAND_NAME
The default name for the band providing input for the green image channel.

See Also:
Constant Field Values

BLUE_BAND_NAME

public static final String BLUE_BAND_NAME
The default name for the band providing input for the blue image channel.

See Also:
Constant Field Values

ALPHA_BAND_NAME

public static final String ALPHA_BAND_NAME
The default name for the band providing input for the alpha image channel.

See Also:
Constant Field Values

RGB_BAND_NAMES

public static final String[] RGB_BAND_NAMES
An array of 3 strings containing the names for the default red, green and blue bands.


RGBA_BAND_NAMES

public static final String[] RGBA_BAND_NAMES
An array of 4 strings containing the names for the default red, green, blue and alpha bands.


FILENAME_EXTENSION

public static final String FILENAME_EXTENSION
See Also:
Constant Field Values

PROPERTY_KEY_NAME

public static final String PROPERTY_KEY_NAME
See Also:
Constant Field Values

PROPERTY_KEY_RED

public static final String PROPERTY_KEY_RED
See Also:
Constant Field Values

PROPERTY_KEY_GREEN

public static final String PROPERTY_KEY_GREEN
See Also:
Constant Field Values

PROPERTY_KEY_BLUE

public static final String PROPERTY_KEY_BLUE
See Also:
Constant Field Values

PROPERTY_KEY_ALPHA

public static final String PROPERTY_KEY_ALPHA
See Also:
Constant Field Values

PROPERTY_KEY_INTERNAL

public static final String PROPERTY_KEY_INTERNAL
See Also:
Constant Field Values

PROPERTY_KEY_PREFIX_RGB_PROFILE

public static final String PROPERTY_KEY_PREFIX_RGB_PROFILE
Preferences key for RGB profile entries

See Also:
Constant Field Values
Constructor Detail

RGBImageProfile

public RGBImageProfile()

RGBImageProfile

public RGBImageProfile(String name)

RGBImageProfile

public RGBImageProfile(String name,
                       String[] rgbaExpressions)
Method Detail

getName

public String getName()

setName

public void setName(String name)

isInternal

public boolean isInternal()

setInternal

public void setInternal(boolean internal)

equalExpressions

public boolean equalExpressions(RGBImageProfile profile)

equalExpressions

public boolean equalExpressions(String[] rgbaExpressions)

isValid

public boolean isValid()
Tests if one of the R,G,B expressions are non-empty strings.

Returns:
true, if so

getRgbExpressions

public String[] getRgbExpressions()

setRgbExpressions

public void setRgbExpressions(String[] rgbExpressions)

getRgbaExpressions

public String[] getRgbaExpressions()

setRgbaExpressions

public void setRgbaExpressions(String[] rgbaExpressions)

getRedExpression

public String getRedExpression()

setRedExpression

public void setRedExpression(String expression)

getGreenExpression

public String getGreenExpression()

setGreenExpression

public void setGreenExpression(String expression)

getBlueExpression

public String getBlueExpression()

setBlueExpression

public void setBlueExpression(String expression)

getAlphaExpression

public String getAlphaExpression()

setAlphaExpression

public void setAlphaExpression(String expression)

hasAlpha

public boolean hasAlpha()

isApplicableTo

public boolean isApplicableTo(Product product)
Tests whether this profile is applicable to the given product. With other words, the method tests if an RGB image can be created from the given product.

Parameters:
product - the product
Returns:
true, if so

getCurrentProfile

public static RGBImageProfile getCurrentProfile(Product product)

loadProfile

public static RGBImageProfile loadProfile(File file)
                                   throws IOException
Loads a profile from the given file using the Java properties file format

Parameters:
file - the file
Returns:
the profile, never null
Throws:
IOException - if an I/O error occurs
See Also:
setProperties(java.util.Properties)

loadProfile

public static RGBImageProfile loadProfile(URL url)
                                   throws IOException
Loads a profile from the given url using the Java properties file format

Parameters:
url - the url
Returns:
the profile, never null
Throws:
IOException - if an I/O error occurs
See Also:
setProperties(java.util.Properties)

store

public void store(File file)
           throws IOException
Stores this profile in the given file using the Java properties file format

Parameters:
file - the file
Throws:
IOException - if an I/O error occurs
See Also:
getProperties(java.util.Properties)

getProperties

public void getProperties(Properties properties)
Sets profile properties and accoringly sets them in the given property map.

Parameters:
properties - the property map which receives the properties of this profiles

setProperties

public void setProperties(Properties properties)
Sets profile properties from the given property map.

Parameters:
properties - the property map which provides the properties for this profiles

storeRgbaExpressions

public static void storeRgbaExpressions(Product product,
                                        String[] rgbaExpressions)

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object

configure

public void configure(com.bc.ceres.core.runtime.ConfigurationElement config)
               throws com.bc.ceres.core.CoreException
Specified by:
configure in interface com.bc.ceres.core.runtime.ConfigurableExtension
Throws:
com.bc.ceres.core.CoreException


Copyright © 2002-2013 Brockmann Consult GmbH. All Rights Reserved.