Fesapi  2.0.0.0
This project provides C++ classes which allow an easy access in import and export to the Energistics standards.
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
eml2::GraphicalInformationSet Class Reference

Proxy class for handling the graphical information of data objects. More...

#include <GraphicalInformationSet.h>

Inheritance diagram for eml2::GraphicalInformationSet:
common::AbstractObject eml2_3::GraphicalInformationSet

Public Member Functions

virtual ~GraphicalInformationSet ()=default
 
unsigned int getGraphicalInformationSetCount () const
 
gsoap_eml2_3::eml23__DataObjectReference * getTargetObjectDor (unsigned int index) const
 
std::string getTargetObjectUuid (unsigned int index) const
 
AbstractObject * getTargetObject (unsigned int index) const
 
bool hasDirectGraphicalInformation (common::AbstractObject const *targetObject) const
 
bool hasGraphicalInformation (common::AbstractObject const *targetObject) const
 
bool hasDefaultColor (common::AbstractObject const *targetObject) const
 
double getDefaultHue (common::AbstractObject const *targetObject) const
 
double getDefaultSaturation (common::AbstractObject const *targetObject) const
 
double getDefaultValue (common::AbstractObject const *targetObject) const
 
double getDefaultAlpha (common::AbstractObject const *targetObject) const
 
void getDefaultRgbColor (common::AbstractObject const *targetObject, double &red, double &green, double &blue) const
 
void getDefaultRgbColor (common::AbstractObject const *targetObject, unsigned int &red, unsigned int &green, unsigned int &blue) const
 
bool hasDefaultColorTitle (common::AbstractObject const *targetObject) const
 
std::string getDefaultColorTitle (common::AbstractObject const *targetObject) const
 
void setDefaultHsvColor (common::AbstractObject *targetObject, double hue, double saturation, double value, double alpha=1.0, std::string const &colorTitle="")
 
void setDefaultRgbColor (common::AbstractObject *targetObject, double red, double green, double blue, double alpha=1.0, std::string const &colorTitle="")
 
void setDefaultRgbColor (common::AbstractObject *targetObject, unsigned int red, unsigned int green, unsigned int blue, double alpha=1.0, std::string const &colorTitle="")
 
bool hasDiscreteColorMap (common::AbstractObject const *targetObject) const
 
gsoap_eml2_3::eml23__DataObjectReference * getDiscreteColorMapDor (common::AbstractObject const *targetObject) const
 
std::string getDiscreteColorMapUuid (common::AbstractObject const *targetObject) const
 
resqml2::DiscreteColorMapgetDiscreteColorMap (common::AbstractObject const *targetObject) const
 
void setDiscreteColorMap (common::AbstractObject *targetObject, resqml2::DiscreteColorMap *discreteColorMap, bool useReverseMapping=false, bool useLogarithmicMapping=false)
 
bool hasContinuousColorMap (common::AbstractObject const *targetObject) const
 
gsoap_eml2_3::eml23__DataObjectReference * getContinuousColorMapDor (common::AbstractObject const *targetObject) const
 
std::string getContinuousColorMapUuid (common::AbstractObject const *targetObject) const
 
resqml2::ContinuousColorMapgetContinuousColorMap (common::AbstractObject const *targetObject) const
 
void setContinuousColorMap (common::AbstractObject *targetObject, resqml2::ContinuousColorMap *continuousColorMap, bool useReverseMapping=false, bool useLogarithmicMapping=false)
 
bool hasColorMapMinMax (common::AbstractObject const *targetObject) const
 
double getColorMapMin (common::AbstractObject const *targetObject) const
 
double getColorMapMax (common::AbstractObject const *targetObject) const
 
void setColorMapMinMax (common::AbstractObject const *targetObject, double min, double max) const
 
bool hasValueVectorIndex (common::AbstractObject const *targetObject)
 
int64_t getValueVectorIndex (common::AbstractObject const *targetObject)
 
void setValueVectorIndex (common::AbstractObject const *targetObject, int64_t valueVectorIndex)
 
std::string getXmlTag () const
 
std::string getXmlNamespace () const
 
void loadTargetRelationships ()
 
- Public Member Functions inherited from common::AbstractObject
bool isPartial () const
 
virtual bool isTopLevelElement () const
 
std::string getUuid () const
 
std::string getTitle () const
 
std::string getEditor () const
 
time_t getCreation () const
 
tm getCreationAsTimeStructure () const
 
std::string getOriginator () const
 
std::string getDescription () const
 
time_t getLastUpdate () const
 
tm getLastUpdateAsTimeStructure () const
 
std::string getFormat () const
 
std::string getDescriptiveKeywords () const
 
std::string getVersion () const
 
void setTitle (const std::string &title)
 
void setEditor (const std::string &editor)
 
void setCreation (time_t creation)
 
void setCreation (const tm &creation)
 
void setOriginator (const std::string &originator)
 
void setDescription (const std::string &description)
 
void setLastUpdate (time_t lastUpdate)
 
void setLastUpdate (const tm &lastUpdate)
 
void setDescriptiveKeywords (const std::string &descriptiveKeywords)
 
void setVersion (const std::string &version)
 
void setMetadata (const std::string &title, const std::string &editor, time_t creation, const std::string &originator, const std::string &description, time_t lastUpdate, const std::string &descriptiveKeywords)
 
void serializeIntoStream (std::ostream *stream)
 
void setGsoapProxy (gsoap_resqml2_0_1::eml20__AbstractCitedDataObject *gsoapProxy)
 
void setGsoapProxy (gsoap_eml2_1::eml21__AbstractObject *gsoapProxy)
 
gsoap_resqml2_0_1::eml20__AbstractCitedDataObject * getEml20GsoapProxy () const
 
gsoap_eml2_1::eml21__AbstractObject * getEml21GsoapProxy () const
 
gsoap_eml2_2::eml22__AbstractObject * getEml22GsoapProxy () const
 
void setGsoapProxy (gsoap_eml2_2::eml22__AbstractObject *gsoapProxy)
 
gsoap_eml2_3::eml23__AbstractObject * getEml23GsoapProxy () const
 
void setGsoapProxy (gsoap_eml2_3::eml23__AbstractObject *gsoapProxy)
 
soap * getGsoapContext () const
 
int getGsoapType () const
 
gsoap_resqml2_0_1::eml20__DataObjectReference * newResqmlReference () const
 
gsoap_eml2_1::eml21__DataObjectReference * newEmlReference () const
 
gsoap_eml2_2::eml22__DataObjectReference * newEml22Reference () const
 
gsoap_eml2_3::eml23__DataObjectReference * newEml23Reference () const
 
gsoap_resqml2_0_1::resqml20__ContactElementReference * newContactElementReference2_0_1 () const
 
gsoap_eml2_3::resqml22__ContactElement * newContactElementReference2_2 () const
 
common::DataObjectRepositorygetRepository () const
 
virtual std::string getXmlNamespaceVersion () const
 
virtual std::string getContentType () const
 
virtual std::string getQualifiedType () const
 
virtual std::string getPartNameInEpcDocument () const
 
std::string serializeIntoString ()
 
void addAlias (const std::string &authority, const std::string &title)
 
unsigned int getAliasCount () const
 
std::string getAliasAuthorityAtIndex (unsigned int index) const
 
std::string getAliasTitleAtIndex (unsigned int index) const
 
std::vector< eml2::Activity * > getActivitySet () const
 
unsigned int getActivityCount () const
 
eml2::ActivitygetActivity (unsigned int index) const
 
void pushBackExtraMetadata (const std::string &key, const std::string &value)
 
std::unordered_map< std::string, std::string > getExtraMetadataSet () const
 
std::vector< std::string > getExtraMetadata (const std::string &key) const
 
unsigned int getExtraMetadataCount () const
 
std::string getExtraMetadataKeyAtIndex (unsigned int index) const
 
std::string getExtraMetadataStringValueAtIndex (unsigned int index) const
 

Static Public Member Functions

static void rgbToHsv (double red, double green, double blue, double &hue, double &saturation, double &value)
 
static void rgbToHsv (unsigned int red, unsigned int green, unsigned int blue, double &hue, double &saturation, double &value)
 
static void hsvToRgb (double hue, double saturation, double value, double &red, double &green, double &blue)
 
static void hsvToRgb (double hue, double saturation, double value, unsigned int &red, unsigned int &green, unsigned int &blue)
 
- Static Public Member Functions inherited from common::AbstractObject
static void setFormat (const std::string &vendor, const std::string &applicationName, const std::string &applicationVersionNumber)
 

Static Public Attributes

static const char * XML_TAG
 

Additional Inherited Members

- Public Types inherited from common::AbstractObject
enum  hdfDatatypeEnum {
  UNKNOWN = 0 , DOUBLE = 1 , FLOAT = 2 , LONG_64 = 3 ,
  ULONG_64 = 4 , INT = 5 , UINT = 6 , SHORT = 7 ,
  USHORT = 8 , CHAR = 9 , UCHAR = 10
}
 

Detailed Description

Proxy class for handling the graphical information of data objects.

Constructor & Destructor Documentation

◆ ~GraphicalInformationSet()

virtual eml2::GraphicalInformationSet::~GraphicalInformationSet ( )
virtualdefault

Destructor does nothing since the memory is managed by the gsoap context.

Reimplemented in eml2_3::GraphicalInformationSet.

Member Function Documentation

◆ getColorMapMax()

double eml2::GraphicalInformationSet::getColorMapMax ( common::AbstractObject const *  targetObject) const

Gets the maximum value to map with a color map for a given data object. It only looks at direct color association (see hasDirectGraphicalInformation)

Exceptions
std::invalid_argumentIf the color information associated targetObject has no maximum value.
Parameters
targetObjectThe data object for which we look for the maximum value.
Returns
The maximum value.

◆ getColorMapMin()

double eml2::GraphicalInformationSet::getColorMapMin ( common::AbstractObject const *  targetObject) const

Gets the minimum value to map with a color map for a given data object. It only looks at direct color association (see hasDirectGraphicalInformation)

Exceptions
std::invalid_argumentIf the color information associated targetObject has no minimum value.
Parameters
targetObjectThe data object for which we look for the minimum value.
Returns
The minimum value.

◆ getContinuousColorMap()

resqml2::ContinuousColorMap* eml2::GraphicalInformationSet::getContinuousColorMap ( common::AbstractObject const *  targetObject) const

Gets the continuous color map of a given data object. If the data object has no continuous color map and if it is a property, we also look for its property kind continuous color map

Exceptions
std::invalid_argumentIf targetObject is null or if it has no continuous color map.
Parameters
targetObjectThe data object for which we look for a continuous color map.
Returns
The continuous color map of targetObject (or of its property kind).

◆ getContinuousColorMapDor()

gsoap_eml2_3::eml23__DataObjectReference* eml2::GraphicalInformationSet::getContinuousColorMapDor ( common::AbstractObject const *  targetObject) const

Gets the continuous color map data object reference of a given data object. If the data object has no continuous color map and if it is a property, we also look for its property kind continuous color map

Exceptions
std::invalid_argumentIf targetObject is null or if it has no continuous color map.
Parameters
targetObjectThe data object for which we look for a continuous color map.
Returns
A data object reference on the continuous color map of targetObject (or of its property kind).

◆ getContinuousColorMapUuid()

std::string eml2::GraphicalInformationSet::getContinuousColorMapUuid ( common::AbstractObject const *  targetObject) const

Gets the continuous color map data UUID of a given data object. If the data object has no continuous color map and if it is a property, we also look for its property kind continuous color map

Exceptions
std::invalid_argumentIf targetObject is null or if it has no continuous color map.
Parameters
targetObjectThe data object for which we look for a continuous color map.
Returns
The UUID of the continuous color map of targetObject (or of its property kind).

◆ getDefaultAlpha()

double eml2::GraphicalInformationSet::getDefaultAlpha ( common::AbstractObject const *  targetObject) const

Gets the default alpha value of a given data object. It only looks at direct color association (see hasDirectGraphicalInformation)

Exceptions
std::invalid_argumentIf targetObject has no default color.
Parameters
targetObjectThe data object for which we look for the default alpha value.
Returns
The default alpha value in the range [0, 1] (0 means transparent and 1 means opaque).

◆ getDefaultColorTitle()

std::string eml2::GraphicalInformationSet::getDefaultColorTitle ( common::AbstractObject const *  targetObject) const

Gets the default color title of a given data object. It only looks at direct color association (see hasDirectGraphicalInformation)

Exceptions
std::invalid_argumentIf targetObject has no default color or if its default color has no title.
Parameters
targetObjectThe data object for which we look for the default color title.
Returns
The default title.

◆ getDefaultHue()

double eml2::GraphicalInformationSet::getDefaultHue ( common::AbstractObject const *  targetObject) const

Gets the default hue of a given data object. It only looks at direct color association (see hasDirectGraphicalInformation)

Exceptions
std::invalid_argumentIf targetObject has no default color.
Parameters
targetObjectThe data object for which we look for the default hue.
Returns
The default hue of targetObject in the range [0, 360].

◆ getDefaultRgbColor() [1/2]

void eml2::GraphicalInformationSet::getDefaultRgbColor ( common::AbstractObject const *  targetObject,
double &  red,
double &  green,
double &  blue 
) const

Gets the default RGB color (https://en.wikipedia.org/wiki/RGB_color_space) of a given data object. It only looks at direct color association (see hasDirectGraphicalInformation)

Exceptions
std::invalid_argumentIf targetObject has no default color.
Parameters
targetObjectThe data object for which we look for the default RGB color.
[out]redRed value in the range [0, 1].
[out]greenGreen value in the range [0, 1].
[out]blueBlue value in the range [0, 1].

◆ getDefaultRgbColor() [2/2]

void eml2::GraphicalInformationSet::getDefaultRgbColor ( common::AbstractObject const *  targetObject,
unsigned int &  red,
unsigned int &  green,
unsigned int &  blue 
) const

Gets the default RGB color (https://en.wikipedia.org/wiki/RGB_color_space) of a given data object. It only looks at direct color association (see hasDirectGraphicalInformation)

Exceptions
std::invalid_argumentIf targetObject has no default color.
Parameters
targetObjectThe data object for which we look for the default RGB color.
[out]redRed value in the range [0, 255].
[out]greenGreen value in the range [0, 255].
[out]blueBlue value in the range [0, 255].

◆ getDefaultSaturation()

double eml2::GraphicalInformationSet::getDefaultSaturation ( common::AbstractObject const *  targetObject) const

Gets the default saturation of a given data object. It only looks at direct color association (see hasDirectGraphicalInformation)

Exceptions
std::invalid_argumentIf targetObject has no default color.
Parameters
targetObjectThe data object for which we look for the default saturation.
Returns
The default saturation of targetObject in the range [0, 1].

◆ getDefaultValue()

double eml2::GraphicalInformationSet::getDefaultValue ( common::AbstractObject const *  targetObject) const

Gets the default color value of a given data object. It only looks at direct color association (see hasDirectGraphicalInformation)

Exceptions
std::invalid_argumentIf targetObject has no default color.
Parameters
targetObjectThe data object for which we look for the default color value.
Returns
The default color value of targetObject in the range [0, 1].

◆ getDiscreteColorMap()

resqml2::DiscreteColorMap* eml2::GraphicalInformationSet::getDiscreteColorMap ( common::AbstractObject const *  targetObject) const

Gets the discrete color map of a given data object. If the data object has no discrete color map and if it is a property, we also look for its property kind discrete color map

Exceptions
std::invalid_argumentIf targetObject is null or if it has no discrete color map.
Parameters
targetObjectThe data object for which we look for a discrete color map.
Returns
The discrete color map of targetObject (or of its property kind).

◆ getDiscreteColorMapDor()

gsoap_eml2_3::eml23__DataObjectReference* eml2::GraphicalInformationSet::getDiscreteColorMapDor ( common::AbstractObject const *  targetObject) const

Gets the discrete color map data object reference of a given data object. If the data object has no discrete color map and if it is a property, we also look for its property kind discrete color map

Exceptions
std::invalid_argumentIf targetObject is null or if it has no discrete color map.
Parameters
targetObjectThe data object for which we look for a discrete color map.
Returns
A data object reference on the discrete color map of targetObject (or of its property kind).

◆ getDiscreteColorMapUuid()

std::string eml2::GraphicalInformationSet::getDiscreteColorMapUuid ( common::AbstractObject const *  targetObject) const

Gets the discrete color map data UUID of a given data object. If the data object has no discrete color map and if it is a property, we also look for its property kind discrete color map

Exceptions
std::invalid_argumentIf targetObject is null or if it has no discrete color map.
Parameters
targetObjectThe data object for which we look for a discrete color map.
Returns
The UUID of the discrete color map of targetObject (or of its property kind).

◆ getGraphicalInformationSetCount()

unsigned int eml2::GraphicalInformationSet::getGraphicalInformationSetCount ( ) const

Gets the size of this graphical information set

Exceptions
std::range_errorIf the size is strictly greater than unsigned int max.
Returns
The size of this graphical information set.

◆ getTargetObject()

AbstractObject* eml2::GraphicalInformationSet::getTargetObject ( unsigned int  index) const

Gets the data object which receives some graphical information at a particular index of the graphical information set

Parameters
indexZero-based index of the data object we look for.
Returns
The data object which receives some graphical information at index.

◆ getTargetObjectDor()

gsoap_eml2_3::eml23__DataObjectReference* eml2::GraphicalInformationSet::getTargetObjectDor ( unsigned int  index) const

Gets the data object reference of the object which receives some graphical information at a particular index of the graphical information set

Exceptions
std::range_errorIf index is out of range.
Parameters
indexZero-based index of the data object we look for.
Returns
The data object reference of the object which receives some graphical information at index.

◆ getTargetObjectUuid()

std::string eml2::GraphicalInformationSet::getTargetObjectUuid ( unsigned int  index) const

Gets the UUID of the object which receives some graphical information at a particular index of the graphical information set

Exceptions
std::range_errorIf index is out of range.
Parameters
indexZero-based index of the data object we look for.
Returns
The UUUID of the object which receives some graphical information at index.

◆ getValueVectorIndex()

int64_t eml2::GraphicalInformationSet::getValueVectorIndex ( common::AbstractObject const *  targetObject)

Gets the value vector index to look when mapping with a color map. It is especially useful for vectorial property and for geometry

Exceptions
std::invalid_argumentIf the color information associated to targetObject has no value vector index.
Parameters
targetObjectThe data object for which we look for a value vector index to look when mapping with a color map.
Returns
The value vector index.

◆ getXmlNamespace()

std::string eml2::GraphicalInformationSet::getXmlNamespace ( ) const
inlinevirtual

Gets the XML namespace for the tags for the XML serialization of this instance

Returns
The XML namespace of this instance.

Implements common::AbstractObject.

Reimplemented in eml2_3::GraphicalInformationSet.

◆ getXmlTag()

std::string eml2::GraphicalInformationSet::getXmlTag ( ) const
inlinevirtual

Get the standard XML tag without XML namespace for serializing this data object

Returns
The XML tag.

Implements common::AbstractObject.

◆ hasColorMapMinMax()

bool eml2::GraphicalInformationSet::hasColorMapMinMax ( common::AbstractObject const *  targetObject) const

Query if a given data object has minimum and maximum values to map with a color map. It only looks at direct color association (see hasDirectGraphicalInformation)

Exceptions
std::invalid_argumentIf targetObject is null or if it has no color information.
Parameters
targetObjectThe data object for which we look for the minimum and maximum values.
Returns
True if minimum and maximum values exist, else false.

◆ hasContinuousColorMap()

bool eml2::GraphicalInformationSet::hasContinuousColorMap ( common::AbstractObject const *  targetObject) const

Query if a given data object has a continuous color map. If it has not and it is a property, we also look for its property kind continuous color map

Exceptions
std::invalid_argumentIf targetObject is null.
Parameters
targetObjectThe data object for which we look for a continuous color map.
Returns
True if targetObject (or its property kind) has a continuous color map, else false.

◆ hasDefaultColor()

bool eml2::GraphicalInformationSet::hasDefaultColor ( common::AbstractObject const *  targetObject) const

Query if a given data object has a default color. It only looks at direct color association (see hasDirectGraphicalInformation)

Exceptions
std::invalid_argumentIf the target object is null.
Parameters
targetObjectThe data object we want to test for having a default color.
Returns
True targetObject has one default color, else false.

◆ hasDefaultColorTitle()

bool eml2::GraphicalInformationSet::hasDefaultColorTitle ( common::AbstractObject const *  targetObject) const

Query if a given data object has a default color title. It only looks at direct color association (see hasDirectGraphicalInformation)

Exceptions
std::invalid_argumentIf targetObject has no default color.
Parameters
targetObjectThe data object for which we look for a default color title.
Returns
True if targetObject has a default color title, else false.

◆ hasDirectGraphicalInformation()

bool eml2::GraphicalInformationSet::hasDirectGraphicalInformation ( common::AbstractObject const *  targetObject) const

Query if a given data object has some direct graphical information, that is to say if there exists a direct association between this data object and a graphical information

Exceptions
std::invalid_argumentIf the target object is null.
Parameters
targetObjectThe data object we want to test for having some graphical information.
Returns
True if targetObject has some graphical information, else false.

◆ hasDiscreteColorMap()

bool eml2::GraphicalInformationSet::hasDiscreteColorMap ( common::AbstractObject const *  targetObject) const

Query if a given data object has a discrete color map. If it has not and it is a property, we also look for its property kind discrete color map

Exceptions
std::invalid_argumentIf targetObject is null.
Parameters
targetObjectThe data object for which we look for a discrete color map.
Returns
True if targetObject (or its property kind) has a discrete color map, else false.

◆ hasGraphicalInformation()

bool eml2::GraphicalInformationSet::hasGraphicalInformation ( common::AbstractObject const *  targetObject) const

Query if a given data object has some graphical information. If it has no direct graphical information (see hasDirectGraphicalInformation) and it is a property, we also check that its property kind has some

Exceptions
std::invalid_argumentIf the target object is null.
Parameters
targetObjectThe data object we want to test for having some graphical information.
Returns
True if targetObject (or its property kind) has some graphical information, else false.

◆ hasValueVectorIndex()

bool eml2::GraphicalInformationSet::hasValueVectorIndex ( common::AbstractObject const *  targetObject)

Query if a given data object indicates which value vector index to look when mapping with a color map. It is especially useful for vectorial property and for geometry

Exceptions
std::invalid_argumentIf targetObject is null or if it has no color information.
Parameters
targetObjectThe data object for which we look for a value vector index to look when mapping with a color map.
Returns
True if a value vector index exists, else false.

◆ hsvToRgb() [1/2]

static void eml2::GraphicalInformationSet::hsvToRgb ( double  hue,
double  saturation,
double  value,
double &  red,
double &  green,
double &  blue 
)
static

Converts HSV to RGB color (using https://en.wikipedia.org/wiki/HSL_and_HSV#HSV_to_RGB algorithm). No range check is done on parameters

Parameters
hueAngle in degrees in the range [0, 360].
saturationNumeric value in the range [0, 1].
valueNumeric value in the range [0, 1].
[out]redNumeric value in the range.
[out]greenNumeric value in the range.
[out]blueNumeric value in the range.

◆ hsvToRgb() [2/2]

static void eml2::GraphicalInformationSet::hsvToRgb ( double  hue,
double  saturation,
double  value,
unsigned int &  red,
unsigned int &  green,
unsigned int &  blue 
)
static

Converts HSV to RGB color (using https://stackoverflow.com/questions/1914115/converting-color-value-from-float-0-1-to-byte-0-255 algorithm). No range check is done on parameters

Parameters
hueAngle in degrees in the range [0, 360].
saturationNumeric value in the range [0, 1].
valueNumeric value in the range [0, 1].
[out]redNumeric value in the range.
[out]greenNumeric value in the range.
[out]blueNumeric value in the range.

◆ loadTargetRelationships()

void eml2::GraphicalInformationSet::loadTargetRelationships ( )
virtual

Reads the forward relationships of this data object and update the .rels of the associated data repository.

Implements common::AbstractObject.

◆ rgbToHsv() [1/2]

static void eml2::GraphicalInformationSet::rgbToHsv ( double  red,
double  green,
double  blue,
double &  hue,
double &  saturation,
double &  value 
)
static

Converts RGB to HSV color (using https://en.wikipedia.org/wiki/HSL_and_HSV#From_RGB algorithm). No range check is done on parameters

Parameters
redNumeric value in the range [0, 1].
greenNumeric value in the range [0, 1].
blueNumeric value in the range [0, 1].
[out]hueAngle in degrees in the range [0, 360].
[out]saturationNumeric value in the range [0, 1].
[out]valueNumeric value in the range [0, 1].

◆ rgbToHsv() [2/2]

static void eml2::GraphicalInformationSet::rgbToHsv ( unsigned int  red,
unsigned int  green,
unsigned int  blue,
double &  hue,
double &  saturation,
double &  value 
)
static

Converts RGB to HSV color (using https://en.wikipedia.org/wiki/HSL_and_HSV#From_RGB algorithm). No range check is done on parameters

Parameters
redNumeric value in the range [0, 255].
greenNumeric value in the range [0, 255].
blueNumeric value in the range [0, 255].
[out]hueAngle in degrees in the range [0, 360].
[out]saturationNumeric value in the range [0, 1].
[out]valueNumeric value in the range [0, 1].

◆ setColorMapMinMax()

void eml2::GraphicalInformationSet::setColorMapMinMax ( common::AbstractObject const *  targetObject,
double  min,
double  max 
) const

Sets the minimum and maximum values to map with a color map for a given data object

Exceptions
std::invalid_argumentIf targetObject has no color information.
Parameters
targetObjectThe data object for which we want to set the minimum and maximum values to map with a color map.
minThe minimum value.
maxThe maximum value.

◆ setContinuousColorMap()

void eml2::GraphicalInformationSet::setContinuousColorMap ( common::AbstractObject targetObject,
resqml2::ContinuousColorMap continuousColorMap,
bool  useReverseMapping = false,
bool  useLogarithmicMapping = false 
)

Sets a continuous color map on a given data object

Exceptions
std::invalid_argumentIf targetObject or continuous is null.
std::invalid_argumentIf targetObject is neither a property nor a property kind.
Parameters
[in]targetObjectThe data object on which we want to set a continuous color map.
[in]continuousColorMapThe continuous color map we want to set on the data object.
useReverseMapping(Optional) It true, it indicates that the minimum value of the property corresponds to the maximum index of the color map and that the maximum value of the property corresponds to the minimum index of the color map. Default value is false.
useLogarithmicMapping(Optional) If true, it indicates that the log of the property values are taken into account when mapped with the index of the color map. Default value is false.

◆ setDefaultHsvColor()

void eml2::GraphicalInformationSet::setDefaultHsvColor ( common::AbstractObject targetObject,
double  hue,
double  saturation,
double  value,
double  alpha = 1.0,
std::string const &  colorTitle = "" 
)

Sets the default HSV color (https://en.wikipedia.org/wiki/HSV_color_space) of a given data object

Exceptions
std::invalid_argumentIf targetObject is null or if it is not a feature, interpretation, representation or wellbore marker.
std::invalid_argumentIf hue is out of range [0, 360].
std::invalid_argumentIf saturation, value or alpha is out of range [0, 1].
Parameters
[in]targetObjectThe data object which receives the color.
hueThe hue angle in degrees in range [0, 360].
saturationThe saturation value in range [0, 1].
valueThe color value in range [0, 1].
alpha(Optional) The alpha value in range [0, 1] for transparency channel (0 means transparent and 1 means opaque). Default value is 1.
colorTitle(Optional) The title of the given HSV color. It is not set if title is empty (default).

◆ setDefaultRgbColor() [1/2]

void eml2::GraphicalInformationSet::setDefaultRgbColor ( common::AbstractObject targetObject,
double  red,
double  green,
double  blue,
double  alpha = 1.0,
std::string const &  colorTitle = "" 
)

Sets the default RGB color https://en.wikipedia.org/wiki/RGB_color_space of a given data object

Exceptions
std::invalid_argumentIf targetObject is null or if it is not a feature, interpretation, representation or wellbore marker.
std::invalid_argumentIf red, green, blue or alpha is out of range [0, 1].
Parameters
[in]targetObjectThe data object which receives the color.
redRed value in range [0, 1].
greenGreen value in range [0, 1].
blueBlue value in range [0, 1].
alpha(Optional) The alpha value in range [0, 1] for transparency channel (0 means transparent and 1 means opaque). Default value is 1.
colorTitle(Optional) The title of the given HSV color. It is not set if title is empty (default).

◆ setDefaultRgbColor() [2/2]

void eml2::GraphicalInformationSet::setDefaultRgbColor ( common::AbstractObject targetObject,
unsigned int  red,
unsigned int  green,
unsigned int  blue,
double  alpha = 1.0,
std::string const &  colorTitle = "" 
)

Sets the default RGB color https://en.wikipedia.org/wiki/RGB_color_space of a given data object

Exceptions
std::invalid_argumentIf targetObject is null or if it is not a feature, interpretation, representation or wellbore marker.
std::invalid_argumentIf red, green, blue or alpha is out of range [0, 255].
std::invalid_argumentIf alpha is out of range [0,1].
Parameters
[in]targetObjectThe data object which receives the color.
redRed value in range [0, 255].
greenGreen value in range [0, 255].
blueBlue value in range [0, 255].
alpha(Optional) The alpha value in range [0, 1] for transparency channel (0 means transparent and 1 means opaque). Default value is 1.
colorTitle(Optional) The title of the given HSV color. It is not set if title is empty (default).

◆ setDiscreteColorMap()

void eml2::GraphicalInformationSet::setDiscreteColorMap ( common::AbstractObject targetObject,
resqml2::DiscreteColorMap discreteColorMap,
bool  useReverseMapping = false,
bool  useLogarithmicMapping = false 
)

Sets a discrete color map on a given data object

Exceptions
std::invalid_argumentIf targetObject or discreteColorMap is null.
std::invalid_argumentIf targetObject is neither a property nor a property kind.
Parameters
[in]targetObjectThe data object on which we want to set a discrete color map.
[in]discreteColorMapThe discrete color map we want to set on the data object.
useReverseMapping(Optional) It true, it indicates that the minimum value of the property corresponds to the maximum index of the color map and that the maximum value of the property corresponds to the minimum index of the color map. Default value is false.
useLogarithmicMapping(Optional) If true, it indicates that the log of the property values are taken into account when mapped with the index of the color map. Default value is false.

◆ setValueVectorIndex()

void eml2::GraphicalInformationSet::setValueVectorIndex ( common::AbstractObject const *  targetObject,
int64_t  valueVectorIndex 
)

Sets the value vector index to look when mapping with a color map. It is especially useful for vectorial property and for geometry

Exceptions
std::invalid_argumentIf targetObject has no color information.
Parameters
targetObjectThe data object for which we want to set the value vector index to look when mapping with a color map.
valueVectorIndexThe value vector index to set.

Member Data Documentation

◆ XML_TAG

const char* eml2::GraphicalInformationSet::XML_TAG
static

The standard XML tag without XML namespace for serializing this data object


The documentation for this class was generated from the following file: