public class RGBImageProfile extends Object implements com.bc.ceres.core.runtime.ConfigurableExtension
Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
RGBImageProfile() |
RGBImageProfile(String name) |
RGBImageProfile(String name,
String[] rgbaExpressions) |
RGBImageProfile(String name,
String[] rgbaExpressions,
String[] pattern)
Creates a new RGB profile.
|
Modifier and Type | Method and Description |
---|---|
void |
configure(com.bc.ceres.core.runtime.ConfigurationElement config)
Configures this extension with the supplied configuration data.
|
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() |
String[] |
getPattern() |
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 |
setPattern(String[] pattern) |
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) |
static void |
storeRgbaExpressions(Product product,
String[] rgbaExpressions,
String[] bandNames) |
String |
toString() |
public static final String RED_BAND_NAME
public static final String GREEN_BAND_NAME
public static final String BLUE_BAND_NAME
public static final String ALPHA_BAND_NAME
public static final String[] RGB_BAND_NAMES
public static final String[] RGBA_BAND_NAMES
public static final String FILENAME_EXTENSION
public static final String PROPERTY_KEY_NAME
public static final String PROPERTY_KEY_RED
public static final String PROPERTY_KEY_GREEN
public static final String PROPERTY_KEY_BLUE
public static final String PROPERTY_KEY_ALPHA
public static final String PROPERTY_KEY_INTERNAL
public static final String PROPERTY_KEY_PREFIX_RGB_PROFILE
public RGBImageProfile()
public RGBImageProfile(String name)
public RGBImageProfile(String name, String[] rgbaExpressions, String[] pattern)
new String[]{ "MER_*_2*", "MER_*_2*", ""}
name
- The name of the profilergbaExpressions
- the expressions for the RGBA channels. Only RGB expressions are mandatory, the one for the alpha
channel can be missingpattern
- Pattern to check if this profile can be applied to a certain product. Three patterns need to be provided.
1. Will be matched against the product type
2. Will be matched against the product name
3. Will be matched against the description of the productpublic String getName()
public void setName(String name)
public boolean isInternal()
public void setInternal(boolean internal)
public boolean equalExpressions(RGBImageProfile profile)
public boolean equalExpressions(String[] rgbaExpressions)
public boolean isValid()
public String[] getRgbExpressions()
public void setRgbExpressions(String[] rgbExpressions)
public String[] getRgbaExpressions()
public void setRgbaExpressions(String[] rgbaExpressions)
public String getRedExpression()
public void setRedExpression(String expression)
public String getGreenExpression()
public void setGreenExpression(String expression)
public String getBlueExpression()
public void setBlueExpression(String expression)
public String getAlphaExpression()
public void setAlphaExpression(String expression)
public boolean hasAlpha()
public String[] getPattern()
public void setPattern(String[] pattern)
public boolean isApplicableTo(Product product)
product
- the productpublic static RGBImageProfile getCurrentProfile(Product product)
public static RGBImageProfile loadProfile(File file) throws IOException
file
- the fileIOException
- if an I/O error occurssetProperties(java.util.Properties)
public static RGBImageProfile loadProfile(URL url) throws IOException
url
- the urlIOException
- if an I/O error occurssetProperties(java.util.Properties)
public void store(File file) throws IOException
file
- the fileIOException
- if an I/O error occursgetProperties(java.util.Properties)
public void getProperties(Properties properties)
properties
- the property map which receives the properties of this profilespublic void setProperties(Properties properties)
properties
- the property map which provides the properties for this profilespublic static void storeRgbaExpressions(Product product, String[] rgbaExpressions)
public static void storeRgbaExpressions(Product product, String[] rgbaExpressions, String[] bandNames)
public void configure(com.bc.ceres.core.runtime.ConfigurationElement config) throws CoreException
com.bc.ceres.core.runtime.ConfigurableExtension
configure
in interface com.bc.ceres.core.runtime.ConfigurableExtension
config
- The configuration data.CoreException
- if an error occurred during configuration.Copyright © 2014–2017 European Space Agency (ESA). All rights reserved.