Helios++
Helios software for LiDAR simulations
SpectralLibrary Class Reference

Class representing the spectral library. More...

#include <SpectralLibrary.h>

Public Member Functions

 SpectralLibrary (float wavelength_m, std::string spectra)
 Spectral library constructor. More...
 
void readReflectances ()
 Read spectra file. More...
 
void setReflectances (Scene *scene)
 Fill scene materials reflectance with available spectra data. More...
 

Private Member Functions

float interpolateReflectance (float w0, float w1, float r0, float r1)
 Reflectance interpolation function. More...
 
void readFileAster (boost::filesystem::path path)
 

Private Attributes

const std::string spectra
 Spectra specification.
 
const double defaultReflectance = 50
 Default reflectance value.
 
std::map< std::string, float > reflectanceMap
 Reflectances retrieved from file.
 
float wavelength_um = 0
 Wavelength. More...
 

Detailed Description

Class representing the spectral library.

Constructor & Destructor Documentation

◆ SpectralLibrary()

SpectralLibrary::SpectralLibrary ( float  wavelength_m,
std::string  spectra 
)

Spectral library constructor.

Parameters
wavelength_mWavelength in meters \(w_{m}\)
spectraPath to spectra file

Member Function Documentation

◆ interpolateReflectance()

float SpectralLibrary::interpolateReflectance ( float  w0,
float  w1,
float  r0,
float  r1 
)
private

Reflectance interpolation function.

\[ \Delta_{w} = w_{1} - w_{0} \\ s = w_{um} - w_{0} \\ \Delta_{r} = r_{1} - r_{0} \\ r = r_{0} + \frac{s \Delta_{r}}{\Delta_{w}} \]

Returns
Interpolated reflectance

◆ readFileAster()

void SpectralLibrary::readFileAster ( boost::filesystem::path  path)
private
Parameters
AssistreadReflectances method reading spectra file
See also
SpectralLibrary::readReflectances

◆ readReflectances()

void SpectralLibrary::readReflectances ( )

Read spectra file.

See also
SpectralLibrary::readFileAster

◆ setReflectances()

void SpectralLibrary::setReflectances ( Scene scene)

Fill scene materials reflectance with available spectra data.

Parameters
sceneScene with materials which reflectance must be setted

Member Data Documentation

◆ wavelength_um

float SpectralLibrary::wavelength_um = 0
private

Wavelength.

\[ w_{um} = w_{m} \cdot 10^{6} \]


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