Public Member Functions | |
| LeafOptics (helios::Context *a_context) | |
| Constructor. | |
| void | run (const std::vector< uint > &UUIDs, const LeafOpticsProperties &leafproperties, const std::string &label) |
| Run the LeafOptics model to generate reflectivity and transmissivity spectra, create associated global data, and assign to specified primitives. | |
| void | run (const LeafOpticsProperties &leafproperties, const std::string &label) |
| Run the LeafOptics model to generate reflectivity and transmissivity spectra and create associated global data. | |
| void | PROSPECT (float numberlayers, float Chlorophyllcontent, float carotenoidcontent, float anthocyancontent, float brownpigments, float watermass, float drymass, float protein, float carbonconstituents, std::vector< float > &reflectivities_fit, std::vector< float > &transmissivities_fit) |
| LeafOptics model kernel. | |
| void | getLeafSpectra (const LeafOpticsProperties &leafproperties, std::vector< helios::vec2 > &reflectivities_fit, std::vector< helios::vec2 > &transmissivities_fit) |
| Get the leaf spectra. | |
| void | setProperties (const std::vector< uint > &UUIDs, const LeafOpticsProperties &leafproperties) |
| Set leaf optical properties for a set of primitives. | |
| void | getPropertiesFromSpectrum (const std::vector< uint > &UUIDs) |
| Get PROSPECT parameters from reflectivity spectrum for a set of primitives. | |
| void | getPropertiesFromSpectrum (uint UUID) |
| Get PROSPECT parameters from reflectivity spectrum for a single primitive. | |
| void | getPropertiesFromLibrary (const std::string &species, LeafOpticsProperties &leafproperties) |
| Get leaf optical properties from the built-in species library. | |
| void | disableMessages () |
| Disable command-line output messages from this plug-in. | |
| void | enableMessages () |
| Enable command-line output messages from this plug-in. | |
| void | optionalOutputPrimitiveData (const char *label) |
| Add optional primitive data output. | |
| void | run (const std::vector< uint > &UUIDs, const LeafOpticsProperties_Nauto ¶ms) |
| Run nitrogen-based leaf optics for the specified primitives. | |
| void | updateNitrogenBasedSpectra () |
| Update nitrogen-based spectra for currently tracked primitives. | |
Static Public Member Functions | |
| static int | selfTest (int argc=0, char **argv=nullptr) |
| Self-test. | |
Definition at line 123 of file LeafOptics.h.
| LeafOptics::LeafOptics | ( | helios::Context * | a_context | ) |
Constructor.
Definition at line 20 of file LeafOptics.cpp.
| void LeafOptics::disableMessages | ( | ) |
Disable command-line output messages from this plug-in.
Definition at line 766 of file LeafOptics.cpp.
| void LeafOptics::enableMessages | ( | ) |
Enable command-line output messages from this plug-in.
Definition at line 770 of file LeafOptics.cpp.
| void LeafOptics::getLeafSpectra | ( | const LeafOpticsProperties & | leafproperties, |
| std::vector< helios::vec2 > & | reflectivities_fit, | ||
| std::vector< helios::vec2 > & | transmissivities_fit | ||
| ) |
Get the leaf spectra.
| [in] | leafproperties | LeafOptics properties. |
| [out] | reflectivities_fit | reflectivities of the leaf. Any existing contents are overwritten. |
| [out] | transmissivities_fit | transmissivities of the leaf. Any existing contents are overwritten. |
Definition at line 512 of file LeafOptics.cpp.
| void LeafOptics::getPropertiesFromLibrary | ( | const std::string & | species, |
| LeafOpticsProperties & | leafproperties | ||
| ) |
Get leaf optical properties from the built-in species library.
| [in] | species | Name of the species to retrieve properties for (e.g., "default"). Species names are case-insensitive. |
| [out] | leafproperties | LeafOpticsProperties struct to be populated with the species-specific properties. If the species is not found in the library, default properties are used and a warning is issued. |
Definition at line 744 of file LeafOptics.cpp.
| void LeafOptics::getPropertiesFromSpectrum | ( | const std::vector< uint > & | UUIDs | ) |
Get PROSPECT parameters from reflectivity spectrum for a set of primitives.
| [in] | UUIDs | UUIDs for primitives to query. For each primitive, this method retrieves the "reflectivity_spectrum" primitive data and checks if it matches a spectrum generated by this LeafOptics instance. If a match is found, the corresponding PROSPECT model parameters are assigned as primitive data using the same labels as setProperties() ("chlorophyll", "carotenoid", "anthocyanin", "brown", "water", "drymass", "protein", "cellulose"). Primitives without matching spectra are silently skipped. |
Definition at line 687 of file LeafOptics.cpp.
| void LeafOptics::getPropertiesFromSpectrum | ( | uint | UUID | ) |
Get PROSPECT parameters from reflectivity spectrum for a single primitive.
| [in] | UUID | UUID for primitive to query. This method retrieves the "reflectivity_spectrum" primitive data and checks if it matches a spectrum generated by this LeafOptics instance. If a match is found, the corresponding PROSPECT model parameters are assigned as primitive data using the same labels as setProperties() ("chlorophyll", "carotenoid", "anthocyanin", "brown", "water", "drymass", "protein", "cellulose"). If no matching spectrum is found, the primitive is silently skipped. |
Definition at line 740 of file LeafOptics.cpp.
| void LeafOptics::optionalOutputPrimitiveData | ( | const char * | label | ) |
Add optional primitive data output.
| [in] | label | Label of the primitive data to output. Available labels: "chlorophyll", "carotenoid", "anthocyanin", "brown", "water", "drymass", "protein", "cellulose". |
Definition at line 774 of file LeafOptics.cpp.
| void LeafOptics::PROSPECT | ( | float | numberlayers, |
| float | Chlorophyllcontent, | ||
| float | carotenoidcontent, | ||
| float | anthocyancontent, | ||
| float | brownpigments, | ||
| float | watermass, | ||
| float | drymass, | ||
| float | protein, | ||
| float | carbonconstituents, | ||
| std::vector< float > & | reflectivities_fit, | ||
| std::vector< float > & | transmissivities_fit | ||
| ) |
LeafOptics model kernel.
| [in] | numberlayers | number of layers in the leaf |
| [in] | Chlorophyllcontent | chlorophyll content in the leaf |
| [in] | carotenoidcontent | carotenoid content in the leaf |
| [in] | anthocyancontent | anthocyan content in the leaf |
| [in] | brownpigments | brown pigment content in the leaf |
| [in] | watermass | water mass in the leaf |
| [in] | drymass | dry mass in the leaf |
| [in] | protein | protein content in the leaf |
| [in] | carbonconstituents | carbon constituents in the leaf |
| [out] | reflectivities_fit | reflectivities of the leaf at each of the 2101 wavelengths. Any existing contents are overwritten. |
| [out] | transmissivities_fit | transmissivities of the leaf at each of the 2101 wavelengths. Any existing contents are overwritten. |
Definition at line 389 of file LeafOptics.cpp.
| void LeafOptics::run | ( | const LeafOpticsProperties & | leafproperties, |
| const std::string & | label | ||
| ) |
Run the LeafOptics model to generate reflectivity and transmissivity spectra and create associated global data.
| [in] | leafproperties | LeafOptics properties. |
| [in] | label | label of spectra that will be created. This label will be appended to "leaf_reflectivity_" and "leaf_transmissivity_" (e.g., "leaf_reflectivity_bean" if the label is "bean"). |
Definition at line 362 of file LeafOptics.cpp.
| void LeafOptics::run | ( | const std::vector< uint > & | UUIDs, |
| const LeafOpticsProperties & | leafproperties, | ||
| const std::string & | label | ||
| ) |
Run the LeafOptics model to generate reflectivity and transmissivity spectra, create associated global data, and assign to specified primitives.
| [in] | UUIDs | UUIDs for primitives that will be assigned the generated reflectivity and transmissivity spectra. |
| [in] | leafproperties | LeafOptics properties. |
| [in] | label | label of spectra that will be created. This label will be appended to "leaf_reflectivity_" and "leaf_transmissivity_" (e.g., "leaf_reflectivity_bean" if the label is "bean"). |
Definition at line 320 of file LeafOptics.cpp.
| void LeafOptics::run | ( | const std::vector< uint > & | UUIDs, |
| const LeafOpticsProperties_Nauto & | params | ||
| ) |
Run nitrogen-based leaf optics for the specified primitives.
Computes leaf optical properties based on nitrogen content. Groups primitives by parent object, reads "leaf_nitrogen_gN_m2" from each object, and assigns spectra accordingly.
Behavior depends on call sequence:
All primitives belonging to the same parent object receive the same spectrum.
| [in] | UUIDs | Primitive UUIDs of leaf surfaces |
| [in] | params | Nitrogen-auto parameters specifying conversion coefficients, fixed PROSPECT values, and binning configuration |
Definition at line 998 of file LeafOptics.cpp.
|
static |
Self-test.
Definition at line 1929 of file selfTest.cpp.
| void LeafOptics::setProperties | ( | const std::vector< uint > & | UUIDs, |
| const LeafOpticsProperties & | leafproperties | ||
| ) |
Set leaf optical properties for a set of primitives.
| [in] | UUIDs | UUIDs for primitives for which optical properties should be set. |
| [in] | leafproperties | LeafOptics properties. |
Definition at line 665 of file LeafOptics.cpp.
| void LeafOptics::updateNitrogenBasedSpectra | ( | ) |
Update nitrogen-based spectra for currently tracked primitives.
Efficient update method for when nitrogen values have changed but the primitive set is unchanged. Re-reads nitrogen from parent objects and reassigns primitives if the change exceeds configured thresholds.
This is equivalent to calling run() with the same UUIDs but faster since it skips primitive grouping and add/remove processing.
Definition at line 1161 of file LeafOptics.cpp.