Top | ![]() |
![]() |
![]() |
![]() |
CdSpectrum * | cd_spectrum_new () |
CdSpectrum * | cd_spectrum_sized_new () |
CdSpectrum * | cd_spectrum_planckian_new () |
void | cd_spectrum_free () |
CdSpectrum * | cd_spectrum_dup () |
void | cd_spectrum_normalize () |
void | cd_spectrum_normalize_max () |
const gchar * | cd_spectrum_get_id () |
GArray * | cd_spectrum_get_data () |
gdouble | cd_spectrum_get_start () |
gdouble | cd_spectrum_get_end () |
gdouble | cd_spectrum_get_norm () |
gdouble | cd_spectrum_get_resolution () |
guint | cd_spectrum_get_size () |
gdouble | cd_spectrum_get_value () |
gdouble | cd_spectrum_get_value_raw () |
gdouble | cd_spectrum_get_wavelength () |
gdouble | cd_spectrum_get_value_for_nm () |
void | cd_spectrum_set_id () |
void | cd_spectrum_set_data () |
void | cd_spectrum_set_start () |
void | cd_spectrum_set_end () |
void | cd_spectrum_set_norm () |
void | cd_spectrum_set_value () |
void | cd_spectrum_add_value () |
CdSpectrum * | cd_spectrum_multiply () |
CdSpectrum *
cd_spectrum_sized_new (guint reserved_size
);
Allocates a spectrum with a preallocated size.
Since 1.1.6
CdSpectrum *
cd_spectrum_planckian_new (gdouble temperature
);
Allocates a Planckian spectrum at a specific temperature.
Since 1.1.6
void
cd_spectrum_free (CdSpectrum *spectrum
);
Deallocates a color spectrum.
Since 1.1.6
void cd_spectrum_normalize (CdSpectrum *spectrum
,gdouble wavelength
,gdouble value
);
Normalizes a spectrum to a specific value at a specific wavelength.
spectrum |
a CdSpectrum instance |
|
wavelength |
the wavelength in nm |
|
value |
the value to normalize to |
Since 1.1.6
void cd_spectrum_normalize_max (CdSpectrum *spectrum
,gdouble value
);
Normalizes a spectrum to a specific value at its maximum value.
Since 1.2.6
const gchar *
cd_spectrum_get_id (const CdSpectrum *spectrum
);
Gets the spectral data.
Since 1.1.6
GArray *
cd_spectrum_get_data (const CdSpectrum *spectrum
);
Gets the spectral data. NOTE: This is not normalized
Since 1.1.6
gdouble
cd_spectrum_get_start (const CdSpectrum *spectrum
);
Gets the start value of the spectral data.
Since 1.1.6
gdouble
cd_spectrum_get_end (const CdSpectrum *spectrum
);
Gets the end value of the spectral data.
Since 1.1.6
gdouble
cd_spectrum_get_norm (const CdSpectrum *spectrum
);
Gets the normalization value of the spectral data. NOTE: This affects every value in the spectrum.
Since 1.1.6
gdouble
cd_spectrum_get_resolution (const CdSpectrum *spectrum
);
Gets the divisor of the spectra, for instance a .
Since 1.2.6
guint
cd_spectrum_get_size (const CdSpectrum *spectrum
);
Gets the size of the spectrum data.
Since 1.1.6
gdouble cd_spectrum_get_value (const CdSpectrum *spectrum
,guint idx
);
Gets the spectrum data at a specified index.
Since 1.1.6
gdouble cd_spectrum_get_value_raw (const CdSpectrum *spectrum
,guint idx
);
Gets the spectrum data at a specified index, without any normalization
applied. Most people should use cd_spectrum_get_value()
instead.
Since 1.2.6
gdouble cd_spectrum_get_wavelength (const CdSpectrum *spectrum
,guint idx
);
Gets the wavelenth that corresponds to the specified index.
Since 1.1.6
gdouble cd_spectrum_get_value_for_nm (const CdSpectrum *spectrum
,gdouble wavelength
);
Gets the value from the spectral data for a given wavelength.
Since 1.1.6
void cd_spectrum_set_id (CdSpectrum *spectrum
,const gchar *id
);
Sets a spectrum id.
Since 1.1.6
void cd_spectrum_set_data (CdSpectrum *spectrum
,GArray *value
);
Sets the spectrum data.
Since 1.1.6
void cd_spectrum_set_start (CdSpectrum *spectrum
,gdouble start
);
Set the start value of the spectal data in nm.
Since 1.1.6
void cd_spectrum_set_end (CdSpectrum *spectrum
,gdouble end
);
Set the end value of the spectal data in nm.
Since 1.1.6
void cd_spectrum_set_norm (CdSpectrum *spectrum
,gdouble norm
);
Set the normalization value of the spectrum. NOTE: This affects every value in the spectrum.
Since 1.1.6
void cd_spectrum_set_value (CdSpectrum *spectrum
,guint idx
,gdouble data
);
Overwrites the spectrum data at a specified index.
Since 1.2.6
void cd_spectrum_add_value (CdSpectrum *spectrum
,gdouble data
);
Adds a value in nm to the spectrum.
Since 1.1.6
CdSpectrum * cd_spectrum_multiply (CdSpectrum *s1
,CdSpectrum *s2
,gdouble resolution
);
Multiplies two spectra together.
s1 |
a CdSpectrum instance, possibly an illuminant. |
|
s2 |
a CdSpectrum instance, possibly an absorption spectrum. |
|
resolution |
the step size in nm |
Since 1.1.6