The Resonon API is no longer being updated or maintained. We recommend customers move to using the camera vendors' SDKs.
Documentation on how to do so is available here.
Resonon API  3.12 [Deprecated]
C++ API for controlling Resonon hyperspectral imagers
Public Member Functions | List of all members
Resonon::ResononImagerBase Class Referenceabstract

An abstract base class which provides a common interface for all imagers. More...

#include "resonon_imager_base.h"

Inheritance diagram for Resonon::ResononImagerBase:
Resonon::PikaAllied Resonon::PikaBasler

Public Member Functions

 ResononImagerBase ()
 
virtual ~ResononImagerBase ()
 
virtual void connect (const char *camera_sn=NULL)=0
 
virtual void disconnect ()=0
 
virtual void start ()=0
 
virtual void stop ()=0
 
virtual void get_imager_type (char *buffer, int buffer_size)=0
 
virtual void get_serial_number (char *buffer, int buffer_size)=0
 
virtual void get_camera_serial_number (char *buffer, int buffer_size)=0
 
virtual void generate_configuration_report (char *buffer, int buffer_size)=0
 
virtual float get_coeff_a ()=0
 
virtual float get_coeff_b ()=0
 
virtual float get_coeff_c ()=0
 
virtual double get_wavelength_at_band (const int band)=0
 
int get_nearest_band_to_wavelength (const double wavelength)
 Return the band number that is closest to the requested wavelength from the current windowing settings. More...
 
virtual int get_frame_buffer_size_in_bytes ()=0
 
virtual unsigned short * get_frame (unsigned short *buffer)=0
 
virtual std::uint64_t get_last_timestamp ()=0
 
virtual std::uint64_t ticks_per_second ()=0
 
virtual void set_spectral_bin (int new_spectral_bin)
 Set the binning in the spectral dimension, if supported by the camera. More...
 
virtual int get_spectral_bin ()
 Get the current spectral binning setting. More...
 
virtual int get_min_spectral_bin ()
 Get the minimum spectral binning setting. More...
 
virtual int get_max_spectral_bin ()
 Get the maximum spectral binning setting. More...
 
virtual int get_band_count ()=0
 
virtual int get_start_band ()
 Get the start of the user-defined spectral window. More...
 
virtual void set_start_band (int band)
 Set the first band in the user-defined spectral window. More...
 
virtual int get_min_start_band ()
 Get the minimum band number allowed for the start of the spectral window at current settings. More...
 
virtual int get_max_start_band ()
 Get the maximum band number allowed for the start of the spectral window at current settings. More...
 
virtual int get_inc_start_band ()
 Get the increment for valid value of the start of the spectral window at current settings. More...
 
virtual int get_end_band ()
 Get the end of the user-defined spectral window. More...
 
virtual void set_end_band (int band)
 Set the end of the user-defined spectral window. More...
 
virtual int get_min_end_band ()
 Get the minimum band number allowed for the end of the user-defined spectral window at current settings. More...
 
virtual int get_max_end_band ()
 Get the maximum band number allowed for the end of the user-defined spectral window at current settings. More...
 
virtual int get_inc_end_band ()
 Get the increment for valid value of the end of the user-defined spectral window at current settings. More...
 
virtual int get_sample_count ()=0
 
virtual int get_start_sample ()
 Get the start of the user-defined spatial window. More...
 
virtual void set_start_sample (int sample)
 Set the first sample in the user-defined spatial window. More...
 
virtual int get_min_start_sample ()
 Get the minimum sample number allowed for the start of the spatial window at current settings. More...
 
virtual int get_max_start_sample ()
 Get the maximum sample number allowed for the start of the spatial window at current settings. More...
 
virtual int get_inc_start_sample ()
 Get the increment for valid value of the start of the spatial window at current settings. More...
 
virtual int get_end_sample ()
 Get the end of the user-defined spatial window. More...
 
virtual void set_end_sample (int sample)
 Set the end of the user-defined spatial window. More...
 
virtual int get_min_end_sample ()
 Get the minimum sample number allowed for the end of the user-defined spatial window at current settings. More...
 
virtual int get_max_end_sample ()
 Get the maximum sample number allowed for the end of the user-defined spatial window at current settings. More...
 
virtual int get_inc_end_sample ()
 Get the increment for valid value of the end of the user-defined spatial window at current settings. More...
 
virtual void set_framerate (const double frames_per_second)=0
 
virtual double get_framerate ()=0
 
virtual double get_min_framerate ()=0
 
virtual double get_max_framerate ()=0
 
virtual double get_min_integration_time ()=0
 
virtual double get_max_integration_time ()=0
 
virtual void set_integration_time (const double milliseconds)=0
 
virtual double get_integration_time ()=0
 
virtual void set_gain (const double gain)
 Sets the camera gain. More...
 
virtual double get_gain ()
 Gets the camera gain setting. More...
 
virtual double get_min_gain ()
 Gets the camera minimum gain setting. More...
 
virtual double get_max_gain ()
 Gets the camera maximum gain setting. More...
 
virtual void set_internal_trigger ()
 Sets the camera triggering to internal (automatic). More...
 
virtual void set_external_trigger (unsigned int signal_line, bool rising_edge=true)
 Set the camera to externally triggered mode. More...
 
virtual bool is_trigger_external ()
 Polls the imager to see if triggering is set to external. More...
 

Detailed Description

An abstract base class which provides a common interface for all imagers.

Constructor & Destructor Documentation

◆ ResononImagerBase()

ResononImagerBase::ResononImagerBase ( )

◆ ~ResononImagerBase()

ResononImagerBase::~ResononImagerBase ( )
virtual

Member Function Documentation

◆ connect()

virtual void Resonon::ResononImagerBase::connect ( const char *  camera_sn = NULL)
pure virtual

◆ disconnect()

virtual void Resonon::ResononImagerBase::disconnect ( )
pure virtual

◆ generate_configuration_report()

virtual void Resonon::ResononImagerBase::generate_configuration_report ( char *  buffer,
int  buffer_size 
)
pure virtual

◆ get_band_count()

virtual int Resonon::ResononImagerBase::get_band_count ( )
pure virtual

◆ get_camera_serial_number()

virtual void Resonon::ResononImagerBase::get_camera_serial_number ( char *  buffer,
int  buffer_size 
)
pure virtual

◆ get_coeff_a()

virtual float Resonon::ResononImagerBase::get_coeff_a ( )
pure virtual

◆ get_coeff_b()

virtual float Resonon::ResononImagerBase::get_coeff_b ( )
pure virtual

◆ get_coeff_c()

virtual float Resonon::ResononImagerBase::get_coeff_c ( )
pure virtual

◆ get_end_band()

int ResononImagerBase::get_end_band ( )
virtual

Get the end of the user-defined spectral window.

This is the first band AFTER the spectral window.

Exceptions
std::runtime_erroron error or if the camera does not support spectral windowing

Reimplemented in Resonon::PikaBasler.

◆ get_end_sample()

int ResononImagerBase::get_end_sample ( )
virtual

Get the end of the user-defined spatial window.

This is the first sample AFTER the spatial window.

Exceptions
std::runtime_erroron error or if the camera does not support spatial windowing

Reimplemented in Resonon::PikaBasler.

◆ get_frame()

virtual unsigned short* Resonon::ResononImagerBase::get_frame ( unsigned short *  buffer)
pure virtual

◆ get_frame_buffer_size_in_bytes()

virtual int Resonon::ResononImagerBase::get_frame_buffer_size_in_bytes ( )
pure virtual

◆ get_framerate()

virtual double Resonon::ResononImagerBase::get_framerate ( )
pure virtual

◆ get_gain()

double ResononImagerBase::get_gain ( )
virtual

Gets the camera gain setting.

Exceptions
std::runtime_errorif the camera does not support gain.

Reimplemented in Resonon::PikaBasler.

◆ get_imager_type()

virtual void Resonon::ResononImagerBase::get_imager_type ( char *  buffer,
int  buffer_size 
)
pure virtual

◆ get_inc_end_band()

int ResononImagerBase::get_inc_end_band ( )
virtual

Get the increment for valid value of the end of the user-defined spectral window at current settings.

This is the first band AFTER the spectral window.

Exceptions
std::runtime_erroron error or if the camera does not support spectral windowing

Reimplemented in Resonon::PikaBasler.

◆ get_inc_end_sample()

int ResononImagerBase::get_inc_end_sample ( )
virtual

Get the increment for valid value of the end of the user-defined spatial window at current settings.

This is the first sample AFTER the spatial window.

Exceptions
std::runtime_erroron error or if the camera does not support spatial windowing

Reimplemented in Resonon::PikaBasler.

◆ get_inc_start_band()

int ResononImagerBase::get_inc_start_band ( )
virtual

Get the increment for valid value of the start of the spectral window at current settings.

Exceptions
std::runtime_erroron error or if the camera does not support spectral windowing

Reimplemented in Resonon::PikaBasler.

◆ get_inc_start_sample()

int ResononImagerBase::get_inc_start_sample ( )
virtual

Get the increment for valid value of the start of the spatial window at current settings.

Exceptions
std::runtime_erroron error or if the camera does not support spatial windowing

Reimplemented in Resonon::PikaBasler.

◆ get_integration_time()

virtual double Resonon::ResononImagerBase::get_integration_time ( )
pure virtual

◆ get_last_timestamp()

virtual std::uint64_t Resonon::ResononImagerBase::get_last_timestamp ( )
pure virtual

◆ get_max_end_band()

int ResononImagerBase::get_max_end_band ( )
virtual

Get the maximum band number allowed for the end of the user-defined spectral window at current settings.

This is the first band AFTER the spectral window.

Exceptions
std::runtime_erroron error or if the camera does not support spectral windowing

Reimplemented in Resonon::PikaBasler.

◆ get_max_end_sample()

int ResononImagerBase::get_max_end_sample ( )
virtual

Get the maximum sample number allowed for the end of the user-defined spatial window at current settings.

This is the first sample AFTER the spatial window.

Exceptions
std::runtime_erroron error or if the camera does not support spatial windowing

Reimplemented in Resonon::PikaBasler.

◆ get_max_framerate()

virtual double Resonon::ResononImagerBase::get_max_framerate ( )
pure virtual

◆ get_max_gain()

double ResononImagerBase::get_max_gain ( )
virtual

Gets the camera maximum gain setting.

Exceptions
std::runtime_errorif the camera does not support gain.

Reimplemented in Resonon::PikaBasler.

◆ get_max_integration_time()

virtual double Resonon::ResononImagerBase::get_max_integration_time ( )
pure virtual

◆ get_max_spectral_bin()

int ResononImagerBase::get_max_spectral_bin ( )
virtual

Get the maximum spectral binning setting.

For some imagers this is always 1.

Returns
Maximum spectral binning setting.

Reimplemented in Resonon::PikaBasler.

◆ get_max_start_band()

int ResononImagerBase::get_max_start_band ( )
virtual

Get the maximum band number allowed for the start of the spectral window at current settings.

Exceptions
std::runtime_erroron error or if the camera does not support spectral windowing

Reimplemented in Resonon::PikaBasler.

◆ get_max_start_sample()

int ResononImagerBase::get_max_start_sample ( )
virtual

Get the maximum sample number allowed for the start of the spatial window at current settings.

Exceptions
std::runtime_erroron error or if the camera does not support spatial windowing

Reimplemented in Resonon::PikaBasler.

◆ get_min_end_band()

int ResononImagerBase::get_min_end_band ( )
virtual

Get the minimum band number allowed for the end of the user-defined spectral window at current settings.

This is the first band AFTER the spectral window.

Exceptions
std::runtime_erroron error or if the camera does not support spectral windowing

Reimplemented in Resonon::PikaBasler.

◆ get_min_end_sample()

int ResononImagerBase::get_min_end_sample ( )
virtual

Get the minimum sample number allowed for the end of the user-defined spatial window at current settings.

This is the first sample AFTER the spatial window.

Exceptions
std::runtime_erroron error or if the camera does not support spatial windowing

Reimplemented in Resonon::PikaBasler.

◆ get_min_framerate()

virtual double Resonon::ResononImagerBase::get_min_framerate ( )
pure virtual

◆ get_min_gain()

double ResononImagerBase::get_min_gain ( )
virtual

Gets the camera minimum gain setting.

Exceptions
std::runtime_errorif the camera does not support gain.

Reimplemented in Resonon::PikaBasler.

◆ get_min_integration_time()

virtual double Resonon::ResononImagerBase::get_min_integration_time ( )
pure virtual

◆ get_min_spectral_bin()

int ResononImagerBase::get_min_spectral_bin ( )
virtual

Get the minimum spectral binning setting.

For some imagers this is always 1.

Returns
Miminum spectral binning setting.

Reimplemented in Resonon::PikaBasler.

◆ get_min_start_band()

int ResononImagerBase::get_min_start_band ( )
virtual

Get the minimum band number allowed for the start of the spectral window at current settings.

Exceptions
std::runtime_erroron error or if the camera does not support spectral windowing

Reimplemented in Resonon::PikaBasler.

◆ get_min_start_sample()

int ResononImagerBase::get_min_start_sample ( )
virtual

Get the minimum sample number allowed for the start of the spatial window at current settings.

Exceptions
std::runtime_erroron error or if the camera does not support spatial windowing

Reimplemented in Resonon::PikaBasler.

◆ get_nearest_band_to_wavelength()

int ResononImagerBase::get_nearest_band_to_wavelength ( const double  wavelength)

Return the band number that is closest to the requested wavelength from the current windowing settings.

The actual wavelength at this band can be calculated by calling ResononImagerBase::get_wavelength_at_band() with the resulting band number. If two bands are exactly the same distance from the requested wavelength, the lower of the bands will be returned.

Parameters
wavelengthThe requested wavelength(nm).
Returns
The calculated band number.
Exceptions
std::runtime_errorif the imager is not connected.

◆ get_sample_count()

virtual int Resonon::ResononImagerBase::get_sample_count ( )
pure virtual

◆ get_serial_number()

virtual void Resonon::ResononImagerBase::get_serial_number ( char *  buffer,
int  buffer_size 
)
pure virtual

◆ get_spectral_bin()

int ResononImagerBase::get_spectral_bin ( )
virtual

Get the current spectral binning setting.

For some imagers this is always 1.

Returns
Current spectral binning setting.

Reimplemented in Resonon::PikaBasler.

◆ get_start_band()

int ResononImagerBase::get_start_band ( )
virtual

Get the start of the user-defined spectral window.

Exceptions
std::runtime_erroron error or if the camera does not support spectral windowing

Reimplemented in Resonon::PikaBasler.

◆ get_start_sample()

int ResononImagerBase::get_start_sample ( )
virtual

Get the start of the user-defined spatial window.

Exceptions
std::runtime_erroron error or if the camera does not support spatial windowing

Reimplemented in Resonon::PikaBasler.

◆ get_wavelength_at_band()

virtual double Resonon::ResononImagerBase::get_wavelength_at_band ( const int  band)
pure virtual

◆ is_trigger_external()

bool ResononImagerBase::is_trigger_external ( )
virtual

Polls the imager to see if triggering is set to external.

Returns
true if the camera is externally triggered, false if the camera is internally triggered.
Exceptions
std::runtime_erroron error.

Reimplemented in Resonon::PikaBasler, and Resonon::PikaAllied.

◆ set_end_band()

void ResononImagerBase::set_end_band ( int  band)
virtual

Set the end of the user-defined spectral window.

This is the first band AFTER the spectral window.

Exceptions
std::domain_errorif band is invalid for current binning settings
std::runtime_erroron error or if the camera does not support spectral windowing

Reimplemented in Resonon::PikaBasler.

◆ set_end_sample()

void ResononImagerBase::set_end_sample ( int  sample)
virtual

Set the end of the user-defined spatial window.

This is the first sample AFTER the spatial window.

Exceptions
std::domain_errorif sample is invalid for current binning settings
std::runtime_erroron error or if the camera does not support spatial windowing

Reimplemented in Resonon::PikaBasler.

◆ set_external_trigger()

void ResononImagerBase::set_external_trigger ( unsigned int  signal_line,
bool  rising_edge = true 
)
virtual

Set the camera to externally triggered mode.

Parameters
signal_lineThe signal trigger source. See subclass documentation for valid values.
rising_edgeSet to true to trigger on the rising edge or false to trigger on the falling edge.
Exceptions
std::runtime_erroron error or if the camera does not support external triggering.

Reimplemented in Resonon::PikaBasler, and Resonon::PikaAllied.

◆ set_framerate()

virtual void Resonon::ResononImagerBase::set_framerate ( const double  frames_per_second)
pure virtual

◆ set_gain()

void ResononImagerBase::set_gain ( const double  gain)
virtual

Sets the camera gain.

Exceptions
std::runtime_erroron error or if the camera does not support gain.

Reimplemented in Resonon::PikaBasler.

◆ set_integration_time()

virtual void Resonon::ResononImagerBase::set_integration_time ( const double  milliseconds)
pure virtual

◆ set_internal_trigger()

void ResononImagerBase::set_internal_trigger ( )
virtual

Sets the camera triggering to internal (automatic).

Exceptions
std::runtime_erroron error.

Reimplemented in Resonon::PikaBasler, and Resonon::PikaAllied.

◆ set_spectral_bin()

void ResononImagerBase::set_spectral_bin ( int  new_spectral_bin)
virtual

Set the binning in the spectral dimension, if supported by the camera.

Parameters
[in]new_spectral_binDesired binning in the spectral dimension.
Exceptions
std::runtime_errorif camera does not support binning or if invalid binning settings are requested.

Reimplemented in Resonon::PikaBasler.

◆ set_start_band()

void ResononImagerBase::set_start_band ( int  band)
virtual

Set the first band in the user-defined spectral window.

Exceptions
std::domain_errorif band is invalid for current binning settings
std::runtime_erroron error

Reimplemented in Resonon::PikaBasler.

◆ set_start_sample()

void ResononImagerBase::set_start_sample ( int  sample)
virtual

Set the first sample in the user-defined spatial window.

Exceptions
std::domain_errorif sample is invalid for current binning settings
std::runtime_erroron error or if the camera does not support spatial windowing

Reimplemented in Resonon::PikaBasler.

◆ start()

virtual void Resonon::ResononImagerBase::start ( )
pure virtual

◆ stop()

virtual void Resonon::ResononImagerBase::stop ( )
pure virtual

◆ ticks_per_second()

virtual std::uint64_t Resonon::ResononImagerBase::ticks_per_second ( )
pure virtual