Class cuvis::ProcessingContext
ClassList > cuvis > ProcessingContext
#include <cuvis.hpp>
Public Functions
| Type | Name |
|---|---|
| ProcessingContext (Calibration const & calib) |
|
| ProcessingContext (Measurement const & mesu, bool load_references=true) |
|
| ProcessingContext (SessionFile const & session, bool load_references=true) |
|
| ProcessingContext (CUVIS_PROC_CONT handle) Expert: Create a wrapper class around a handle. This only allowed once per handle, otherwise the handle could be freed before all instances of the wrapper class are deleted. This can be useful if a previously a handle has been copied and now should be wrapped at another place in a program. Most of the time this is not necesarry and the wrapper class can be copied just as well. |
|
| Measurement & | apply (Measurement & mesu) const |
| bool | calc_distance (double distMM) |
| void | clear_reference (reference_type_t type) Clear a reference measurement. |
| std::string | get_calib_id () const get the calibration id of the procession context |
| CUVIS_PROC_CONT | get_handle () const Expert: Return the current handle of the wrapper class. |
| CUVIS_PROC_CONT | get_handle_copy () const Expert: Create a copy of the current handle of the wrapper class and return it. This handle needs to be also freed before the resource will be released by the sdk. |
| ProcessingArgs const & | get_processingArgs () const get the arguments of the processing context |
| std::optional< Measurement > | get_reference (reference_type_t type) const get a specific reference from the processing context |
| std::optional< target_spectrum_t > | get_reference_target_spectrum () const get the target reflectivity spectrum, if one is set |
| std::optional< sensor_spectrum_t > | get_reference_white_spectrum () const get the white reference spectrum, if one is set |
| bool | has_reference (reference_type_t type) const Check if an explicit reference was set. |
| bool | is_capable (Measurement const & mesu, ProcessingArgs const & procArgs) const Check if a processing mode is possible for a measurement. |
| void | set_processingArgs (ProcessingArgs const & procArgs) set the processing arguments for the processing context |
| void | set_reference (Measurement const & mesu, reference_type_t type) Set the reference for processing context. |
| void | set_reference_target_spectrum (target_spectrum_t const & spectrum) Set the reflectivity curve of the white target. |
| void | set_reference_white_spectrum (sensor_spectrum_t const & spectrum) Set an averaged sensor spectrum as the white reference. |
Public Functions Documentation
function ProcessingContext [1/4]
cuvis::ProcessingContext::ProcessingContext (
Calibration const & calib
)
function ProcessingContext [2/4]
cuvis::ProcessingContext::ProcessingContext (
Measurement const & mesu,
bool load_references=true
)
function ProcessingContext [3/4]
cuvis::ProcessingContext::ProcessingContext (
SessionFile const & session,
bool load_references=true
)
function ProcessingContext [4/4]
Expert: Create a wrapper class around a handle. This only allowed once per handle, otherwise the handle could be freed before all instances of the wrapper class are deleted. This can be useful if a previously a handle has been copied and now should be wrapped at another place in a program. Most of the time this is not necesarry and the wrapper class can be copied just as well.
cuvis::ProcessingContext::ProcessingContext (
CUVIS_PROC_CONT handle
)
function apply
Measurement & cuvis::ProcessingContext::apply (
Measurement & mesu
) const
function calc_distance
bool cuvis::ProcessingContext::calc_distance (
double distMM
)
function clear_reference
Clear a reference measurement.
void cuvis::ProcessingContext::clear_reference (
reference_type_t type
)
Parameters:
typeType of reference to clear
function get_calib_id
get the calibration id of the procession context
std::string cuvis::ProcessingContext::get_calib_id () const
function get_handle
Expert: Return the current handle of the wrapper class.
CUVIS_PROC_CONT cuvis::ProcessingContext::get_handle () const
function get_handle_copy
Expert: Create a copy of the current handle of the wrapper class and return it. This handle needs to be also freed before the resource will be released by the sdk.
CUVIS_PROC_CONT cuvis::ProcessingContext::get_handle_copy () const
function get_processingArgs
get the arguments of the processing context
ProcessingArgs const & cuvis::ProcessingContext::get_processingArgs () const
function get_reference
get a specific reference from the processing context
std::optional< Measurement > cuvis::ProcessingContext::get_reference (
reference_type_t type
) const
The processing context can hold explicit references (e.g. a dark), see ProcessingArgs.set_reference . These reference can be obtained by this functions
function get_reference_target_spectrum
get the target reflectivity spectrum, if one is set
std::optional< target_spectrum_t > cuvis::ProcessingContext::get_reference_target_spectrum () const
function get_reference_white_spectrum
get the white reference spectrum, if one is set
std::optional< sensor_spectrum_t > cuvis::ProcessingContext::get_reference_white_spectrum () const
Returns an owning copy, including the effective bit depth and integration time the spectrum was set with.
function has_reference
Check if an explicit reference was set.
bool cuvis::ProcessingContext::has_reference (
reference_type_t type
) const
Parameters:
typereference type to check for
function is_capable
Check if a processing mode is possible for a measurement.
bool cuvis::ProcessingContext::is_capable (
Measurement const & mesu,
ProcessingArgs const & procArgs
) const
Depending on the measurement, it's intrinsic references, the processing context's explicit references and the internal camera calibration itself the availability of a mode varies.
Use this function, to check whether a specific mode is explicitly possible for a measurement.
function set_processingArgs
set the processing arguments for the processing context
void cuvis::ProcessingContext::set_processingArgs (
ProcessingArgs const & procArgs
)
Parameters:
procArgsarguments to set
function set_reference
Set the reference for processing context.
void cuvis::ProcessingContext::set_reference (
Measurement const & mesu,
reference_type_t type
)
Parameters:
mesumeasurement The measurement to be used as explicit referencetypeType of reference to set
function set_reference_target_spectrum
Set the reflectivity curve of the white target.
void cuvis::ProcessingContext::set_reference_target_spectrum (
target_spectrum_t const & spectrum
)
Fills the Reference_TargetSpectrum slot. When no target spectrum is set, a perfectly white target (reflectivity 1.0 everywhere) is assumed.
Parameters:
spectrumwavelengths [nm] and reflectivity fractions (1.0 = 100 percent), equally long and non-empty
function set_reference_white_spectrum
Set an averaged sensor spectrum as the white reference.
void cuvis::ProcessingContext::set_reference_white_spectrum (
sensor_spectrum_t const & spectrum
)
Fills the Reference_WhiteSpectrum slot, which replaces a white reference measurement in the reflectance calculation. Setting the spectrum clears a previously set white measurement, and setting a white measurement clears the spectrum.
Parameters:
spectrumwavelengths [nm], raw counts (equally long and non-empty), effective bit depth (1 to 16) and integration time [ms]
The documentation for this class was generated from the following file cuvis.cpp/interface/cuvis.hpp