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::PikaBasler Class Reference

Interface to Pika L and Pika XC2 hyperspectral imagers with USB3 connectivity. More...

#include "resonon_imager_basler.h"

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

Public Member Functions

 PikaBasler ()
 Constructor for Pika L and XC2 hyperspectral imagers based on Basler cameras. More...
 
virtual ~PikaBasler ()
 
void connect (const char *camera_serial_number=NULL)
 Connect to camera. More...
 
void disconnect ()
 Disconnect from the camera. More...
 
void start ()
 Begin grabbing frames from the imager. More...
 
void stop ()
 Stop grabbing frames from the imager. More...
 
void get_imager_type (char *buffer, int buffer_size)
 Get a string identifying the type of imager being controlled by this class, such as Pika L or Pika XC2. More...
 
void get_serial_number (char *buffer, int buffer_size)
 Get a string identifying the serial number of the connected imager. More...
 
void get_camera_serial_number (char *buffer, int buffer_size)
 Get a string identifying the serial number of the camera embedded in the imager. More...
 
void generate_configuration_report (char *buffer, int buffer_size)
 Generates a report on the imager's internal settings. More...
 
float get_coeff_a ()
 Gets the first imager spectral calibration coefficient stored in camera memory. More...
 
float get_coeff_b ()
 Gets the second imager spectral calibration coefficient stored in camera memory. More...
 
float get_coeff_c ()
 Gets the third imager spectral calibration coefficient stored in camera memory. More...
 
double get_wavelength_at_band (const int band)
 Get the wavelength of the imager at the requested band number. More...
 
int get_frame_buffer_size_in_bytes ()
 Get the size of the buffer required to get a single frame from the imager, in bytes, according to current binning settings. More...
 
unsigned short * get_frame (unsigned short *buffer)
 Get a single frame from the imager and copy it to the provided buffer. More...
 
std::uint64_t get_last_timestamp ()
 Get the timestamp of the last image returned by PikaBasler::get_frame() in camera ticks (nanoseconds). More...
 
std::uint64_t ticks_per_second ()
 Get the number of camera ticks per second, for converting values returned by PikaBasler::get_last_timestamp() to seconds. More...
 
void set_spectral_bin (int new_spectral_bin)
 Set the binning in the spectral dimension. More...
 
int get_spectral_bin ()
 Get the current spectral binning setting. More...
 
int get_min_spectral_bin ()
 Get the minimum spectral binning setting. More...
 
int get_max_spectral_bin ()
 Get the maximum spectral binning setting. More...
 
int get_band_count ()
 Get the number of bands (spectral dimension) provided by the current binning settings. More...
 
int get_start_band ()
 Get the start of the user-defined spectral window. More...
 
void set_start_band (int band)
 Set the first band in the user-defined spectral window. More...
 
int get_min_start_band ()
 Get the minimum band number allowed for the start of the spectral window at current settings. More...
 
int get_max_start_band ()
 Get the maximum band number allowed for the start of the spectral window at current settings. More...
 
int get_inc_start_band ()
 Get the increment for valid value of the start of the spectral window at current settings. More...
 
int get_end_band ()
 Get the end of the user-defined spectral window. More...
 
void set_end_band (int band)
 Set the end of the user-defined spectral window. More...
 
int get_min_end_band ()
 Get the minimum band number allowed for the end of the user-defined spectral window at current settings. More...
 
int get_max_end_band ()
 Get the maximum band number allowed for the end of the user-defined spectral window at current settings. More...
 
int get_inc_end_band ()
 Get the increment for valid value of the end of the user-defined spectral window at current settings. More...
 
int get_sample_count ()
 Get the number of samples (spatial dimension) provided by the imager. More...
 
int get_start_sample ()
 Get the start of the user-defined spatial window. More...
 
void set_start_sample (int sample)
 Set the first sample in the user-defined spatial window. More...
 
int get_min_start_sample ()
 Get the minimum sample number allowed for the start of the spatial window at current settings. More...
 
int get_max_start_sample ()
 Get the maximum sample number allowed for the start of the spatial window at current settings. More...
 
int get_inc_start_sample ()
 Get the increment for valid value of the start of the spatial window at current settings. More...
 
int get_end_sample ()
 Get the end of the user-defined spatial window. More...
 
void set_end_sample (int sample)
 Set the end of the user-defined spatial window. More...
 
int get_min_end_sample ()
 Get the minimum sample number allowed for the end of the user-defined spatial window at current settings. More...
 
int get_max_end_sample ()
 Get the maximum sample number allowed for the end of the user-defined spatial window at current settings. More...
 
int get_inc_end_sample ()
 Get the increment for valid value of the end of the user-defined spatial window at current settings. More...
 
void set_framerate (const double frames_per_second)
 Get the current requested framerate in frames per second. More...
 
double get_framerate ()
 Get the current requested framerate in frames per second. More...
 
double get_min_framerate ()
 Get the minimum value that the framerate can be set to. More...
 
double get_max_framerate ()
 Get the maximum expected framerate achievable with the current integration time and binning settings. More...
 
double get_min_integration_time ()
 Get the minimum integration time supported by the camera. More...
 
double get_max_integration_time ()
 Get the maximum integration time supported by the camera. More...
 
void set_integration_time (const double milliseconds)
 Set the integration time in milliseconds. More...
 
double get_integration_time ()
 Get the current integration time in milliseconds. More...
 
void set_gain (const double gain)
 Set the current gain setting in dB. More...
 
double get_gain ()
 Get the current gain setting in dB. More...
 
double get_min_gain ()
 Get the minimum valid gain setting in dB. More...
 
double get_max_gain ()
 Get the maximum valid gain setting in dB. More...
 
void set_internal_trigger ()
 Set the camera to internally triggered mode. More...
 
void set_external_trigger (unsigned int signal_line, bool rising_edge=true)
 Set the camera to externally triggered mode. More...
 
bool is_trigger_external ()
 Return true if the camera is in external trigger mode, false if the camera is in internal trigger mode. More...
 
- Public Member Functions inherited from Resonon::ResononImagerBase
 ResononImagerBase ()
 
virtual ~ResononImagerBase ()
 
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...
 

Detailed Description

Interface to Pika L and Pika XC2 hyperspectral imagers with USB3 connectivity.

Examples:
flat_field_correction.cpp, and record_pika_basler_datacube.cpp.

Constructor & Destructor Documentation

◆ PikaBasler()

PikaBasler::PikaBasler ( )

Constructor for Pika L and XC2 hyperspectral imagers based on Basler cameras.

PikaBasler::connect() must be called prior to setting or querying camera settings or acquiring camera data.

◆ ~PikaBasler()

PikaBasler::~PikaBasler ( )
virtual

Member Function Documentation

◆ connect()

void PikaBasler::connect ( const char *  camera_serial_number = NULL)
virtual

Connect to camera.

PikaBasler::connect() will attempt to connect to the first camera found on the system. Calibration and windowing parameters are read from factory settings stored on-camera and applied.

Parameters
[in]camera_serial_numberThe serial number of the camera to connect (this is not the imager serial number). If NULL connect to the first camera found.
Exceptions
std::runtime_errorif camera cannot be initialized. Use std::runtime_error.what() for more details.

Implements Resonon::ResononImagerBase.

Examples:
flat_field_correction.cpp, and record_pika_basler_datacube.cpp.

◆ disconnect()

void PikaBasler::disconnect ( )
virtual

Disconnect from the camera.

Does nothing if no camera is connected.

Implements Resonon::ResononImagerBase.

Examples:
flat_field_correction.cpp, and record_pika_basler_datacube.cpp.

◆ generate_configuration_report()

void PikaBasler::generate_configuration_report ( char *  buffer,
int  buffer_size 
)
virtual

Generates a report on the imager's internal settings.

Parameters
[in,out]bufferA character buffer to receive the report. Recommended size is 1,000 bytes.
[in]buffer_sizeThe size of the passed character buffer, to prevent overruns.
Exceptions
std::runtime_errorif no imager is connected.

Implements Resonon::ResononImagerBase.

◆ get_band_count()

int PikaBasler::get_band_count ( )
virtual

Get the number of bands (spectral dimension) provided by the current binning settings.

Returns
Current number of bands
Exceptions
std::runtime_errorif camera error occurs

Implements Resonon::ResononImagerBase.

Examples:
flat_field_correction.cpp, and record_pika_basler_datacube.cpp.

◆ get_camera_serial_number()

void PikaBasler::get_camera_serial_number ( char *  buffer,
int  buffer_size 
)
virtual

Get a string identifying the serial number of the camera embedded in the imager.

Parameters
[in,out]bufferA character buffer to receive the serial number cstring.
[in]buffer_sizeThe size of the passed character buffer, to prevent overruns.
Exceptions
std::runtime_errorif no imager is connected.

Implements Resonon::ResononImagerBase.

◆ get_coeff_a()

float PikaBasler::get_coeff_a ( )
virtual

Gets the first imager spectral calibration coefficient stored in camera memory.

Returns
the first imager spectral calibration coefficient
Exceptions
std::runtime_errorif the imager is not connected.

Implements Resonon::ResononImagerBase.

◆ get_coeff_b()

float PikaBasler::get_coeff_b ( )
virtual

Gets the second imager spectral calibration coefficient stored in camera memory.

Returns
the second imager spectral calibration coefficient
Exceptions
std::runtime_errorif the imager is not connected.

Implements Resonon::ResononImagerBase.

◆ get_coeff_c()

float PikaBasler::get_coeff_c ( )
virtual

Gets the third imager spectral calibration coefficient stored in camera memory.

Returns
the third imager spectral calibration coefficient
Exceptions
std::runtime_errorif the imager is not connected.

Implements Resonon::ResononImagerBase.

◆ get_end_band()

int PikaBasler::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

Reimplemented from Resonon::ResononImagerBase.

Examples:
flat_field_correction.cpp, and record_pika_basler_datacube.cpp.

◆ get_end_sample()

int PikaBasler::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

Reimplemented from Resonon::ResononImagerBase.

◆ get_frame()

unsigned short * PikaBasler::get_frame ( unsigned short *  buffer)
virtual

Get a single frame from the imager and copy it to the provided buffer.

Space for the data must be previously allocated. Use PikaBasler::get_frame_buffer_size_in_bytes() to get the required size of the buffer. Data type is unsigned short. This call retrieves the most recent frame received from the camera. If no frame has been received this call blocks until a frame becomes available. PikaBasler::start() must be called before retrieving frames.

Parameters
[in,out]bufferA pointer to the buffer to which frame data should be copied.
Returns
A pointer to the buffer containing the latest frame (the same pointer passed in as buffer).
Exceptions
std::runtime_errorIf camera has been improperly configured, frame capture has not been started, or a camera error occurs. Use std::runtime_error.what() to get details.

Implements Resonon::ResononImagerBase.

Examples:
flat_field_correction.cpp, and record_pika_basler_datacube.cpp.

◆ get_frame_buffer_size_in_bytes()

int PikaBasler::get_frame_buffer_size_in_bytes ( )
virtual

Get the size of the buffer required to get a single frame from the imager, in bytes, according to current binning settings.

Returns
Current frame size in bytes
Exceptions
std::runtime_errorif a camera error occurs.

Implements Resonon::ResononImagerBase.

Examples:
flat_field_correction.cpp, and record_pika_basler_datacube.cpp.

◆ get_framerate()

double PikaBasler::get_framerate ( )
virtual

Get the current requested framerate in frames per second.

See Framerate and Integration Time.

Returns
Current requested framerate in frames per second.
Exceptions
std::runtime_errorif a camera error occurs.

Implements Resonon::ResononImagerBase.

Examples:
flat_field_correction.cpp, and record_pika_basler_datacube.cpp.

◆ get_gain()

double PikaBasler::get_gain ( )
virtual

Get the current gain setting in dB.

Returns
Current gain.
Exceptions
std::runtime_errorif a camera error occurs.

Reimplemented from Resonon::ResononImagerBase.

Examples:
flat_field_correction.cpp, and record_pika_basler_datacube.cpp.

◆ get_imager_type()

void PikaBasler::get_imager_type ( char *  buffer,
int  buffer_size 
)
virtual

Get a string identifying the type of imager being controlled by this class, such as Pika L or Pika XC2.

Parameters
[in,out]bufferA character buffer to receive the imager type cstring.
[in]buffer_sizeThe size of the passed character buffer, to prevent overruns.
Exceptions
std::runtime_errorif no imager is connected.

Implements Resonon::ResononImagerBase.

Examples:
record_pika_basler_datacube.cpp.

◆ get_inc_end_band()

int PikaBasler::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

Reimplemented from Resonon::ResononImagerBase.

◆ get_inc_end_sample()

int PikaBasler::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

Reimplemented from Resonon::ResononImagerBase.

◆ get_inc_start_band()

int PikaBasler::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

Reimplemented from Resonon::ResononImagerBase.

◆ get_inc_start_sample()

int PikaBasler::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

Reimplemented from Resonon::ResononImagerBase.

◆ get_integration_time()

double PikaBasler::get_integration_time ( )
virtual

Get the current integration time in milliseconds.

See Framerate and Integration Time.

Returns
Current integration time in milliseconds.
Exceptions
std::runtime_errorif a camera error occurs.

Implements Resonon::ResononImagerBase.

Examples:
flat_field_correction.cpp, and record_pika_basler_datacube.cpp.

◆ get_last_timestamp()

std::uint64_t PikaBasler::get_last_timestamp ( )
virtual

Get the timestamp of the last image returned by PikaBasler::get_frame() in camera ticks (nanoseconds).

Returns
The timestamp of the last image.

Implements Resonon::ResononImagerBase.

◆ get_max_end_band()

int PikaBasler::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

Reimplemented from Resonon::ResononImagerBase.

◆ get_max_end_sample()

int PikaBasler::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

Reimplemented from Resonon::ResononImagerBase.

◆ get_max_framerate()

double PikaBasler::get_max_framerate ( )
virtual

Get the maximum expected framerate achievable with the current integration time and binning settings.

See Framerate and Integration Time.

Returns
Maximum achievable framerate at the current settings.
Exceptions
std::runtime_errorif a camera error occurs.

Implements Resonon::ResononImagerBase.

Examples:
record_pika_basler_datacube.cpp.

◆ get_max_gain()

double PikaBasler::get_max_gain ( )
virtual

Get the maximum valid gain setting in dB.

Returns
Maximum valid gain setting.
Exceptions
std::runtime_errorif a camera error occurs.

Reimplemented from Resonon::ResononImagerBase.

Examples:
record_pika_basler_datacube.cpp.

◆ get_max_integration_time()

double PikaBasler::get_max_integration_time ( )
virtual

Get the maximum integration time supported by the camera.

See Framerate and Integration Time.

Returns
maximum supported integration time in milliseconds.
Exceptions
std::runtime_errorif a camera error occurs.

Implements Resonon::ResononImagerBase.

Examples:
record_pika_basler_datacube.cpp.

◆ get_max_spectral_bin()

int PikaBasler::get_max_spectral_bin ( )
virtual

Get the maximum spectral binning setting.

Returns
Maximum spectral binning setting.
Exceptions
std::runtime_errorif a camera error occurs.

Reimplemented from Resonon::ResononImagerBase.

◆ get_max_start_band()

int PikaBasler::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

Reimplemented from Resonon::ResononImagerBase.

◆ get_max_start_sample()

int PikaBasler::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

Reimplemented from Resonon::ResononImagerBase.

◆ get_min_end_band()

int PikaBasler::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

Reimplemented from Resonon::ResononImagerBase.

◆ get_min_end_sample()

int PikaBasler::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

Reimplemented from Resonon::ResononImagerBase.

◆ get_min_framerate()

double PikaBasler::get_min_framerate ( )
virtual

Get the minimum value that the framerate can be set to.

See Framerate and Integration Time.

Returns
Minimum allowable framerate.
Exceptions
std::runtime_errorif a camera error occurs.

Implements Resonon::ResononImagerBase.

Examples:
record_pika_basler_datacube.cpp.

◆ get_min_gain()

double PikaBasler::get_min_gain ( )
virtual

Get the minimum valid gain setting in dB.

Returns
Minimum valid gain setting.
Exceptions
std::runtime_errorif a camera error occurs.

Reimplemented from Resonon::ResononImagerBase.

Examples:
record_pika_basler_datacube.cpp.

◆ get_min_integration_time()

double PikaBasler::get_min_integration_time ( )
virtual

Get the minimum integration time supported by the camera.

See Framerate and Integration Time.

Returns
Minimum supported integration time in milliseconds.
Exceptions
std::runtime_errorif a camera error occurs.

Implements Resonon::ResononImagerBase.

Examples:
record_pika_basler_datacube.cpp.

◆ get_min_spectral_bin()

int PikaBasler::get_min_spectral_bin ( )
virtual

Get the minimum spectral binning setting.

Returns
Minimum spectral binning setting.
Exceptions
std::runtime_errorif a camera error occurs.

Reimplemented from Resonon::ResononImagerBase.

Examples:
record_pika_basler_datacube.cpp.

◆ get_min_start_band()

int PikaBasler::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

Reimplemented from Resonon::ResononImagerBase.

◆ get_min_start_sample()

int PikaBasler::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

Reimplemented from Resonon::ResononImagerBase.

◆ get_sample_count()

int PikaBasler::get_sample_count ( )
virtual

Get the number of samples (spatial dimension) provided by the imager.

Returns
Current number of samples
Exceptions
std::runtime_errorif camera error occurs

Implements Resonon::ResononImagerBase.

Examples:
flat_field_correction.cpp, and record_pika_basler_datacube.cpp.

◆ get_serial_number()

void PikaBasler::get_serial_number ( char *  buffer,
int  buffer_size 
)
virtual

Get a string identifying the serial number of the connected imager.

Parameters
[in,out]bufferA character buffer to receive the serial number cstring.
[in]buffer_sizeThe size of the passed character buffer, to prevent overruns.
Exceptions
std::runtime_errorif no imager is connected.

Implements Resonon::ResononImagerBase.

Examples:
record_pika_basler_datacube.cpp.

◆ get_spectral_bin()

int PikaBasler::get_spectral_bin ( )
virtual

Get the current spectral binning setting.

Returns
Current spectral binning setting.
Exceptions
std::runtime_errorif a camera error occurs.

Reimplemented from Resonon::ResononImagerBase.

◆ get_start_band()

int PikaBasler::get_start_band ( )
virtual

Get the start of the user-defined spectral window.

Exceptions
std::runtime_erroron error

Reimplemented from Resonon::ResononImagerBase.

Examples:
flat_field_correction.cpp, and record_pika_basler_datacube.cpp.

◆ get_start_sample()

int PikaBasler::get_start_sample ( )
virtual

Get the start of the user-defined spatial window.

Exceptions
std::runtime_erroron error

Reimplemented from Resonon::ResononImagerBase.

◆ get_wavelength_at_band()

double PikaBasler::get_wavelength_at_band ( const int  band)
virtual

Get the wavelength of the imager at the requested band number.

Band numbers always start at 0 and end at the total number of bands available on the camera at the current spectral bin setting. To get the wavelengths of the bands available at the current binning setting, loop from 0 to PikaBasler::get_band_count() - 1.

Parameters
[in]bandThe band number for which to calculate wavelength.
Returns
The calculated wavelength(nm).
Exceptions
std::runtime_errorif a camera error occurs.
std::domain_errorif band is invalid (band < 0 or band >= number of bands)

Implements Resonon::ResononImagerBase.

Examples:
flat_field_correction.cpp, and record_pika_basler_datacube.cpp.

◆ is_trigger_external()

bool PikaBasler::is_trigger_external ( )
virtual

Return true if the camera is in external trigger mode, false if the camera is in internal trigger mode.

Exceptions
std::runtime_errorif camera error occurs

Reimplemented from Resonon::ResononImagerBase.

◆ set_end_band()

void PikaBasler::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

Reimplemented from Resonon::ResononImagerBase.

◆ set_end_sample()

void PikaBasler::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

Reimplemented from Resonon::ResononImagerBase.

◆ set_external_trigger()

void PikaBasler::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. Valid values are 1 for line 1 and 2 for line 2.
rising_edgeSet to true to trigger on the rising edge or false to trigger on the falling edge.
Exceptions
std::runtime_errorif camera error occurs or an invalid signal_line is specified.

Reimplemented from Resonon::ResononImagerBase.

◆ set_framerate()

void PikaBasler::set_framerate ( const double  frames_per_second)
virtual

Get the current requested framerate in frames per second.

For PikaBasler cameras, the exposure time is honored over the framerate. That is, if the exposure time is longer than 1/framerate, the achieved framerate will be less than the requested framerate. See Framerate and Integration Time for additional considerations.

Parameters
[in]frames_per_secondThe requested framerate in fps.
Returns
Current framerate in frames per second.
Exceptions
std::runtime_errorif a camera error occurs.

Implements Resonon::ResononImagerBase.

Examples:
flat_field_correction.cpp, and record_pika_basler_datacube.cpp.

◆ set_gain()

void PikaBasler::set_gain ( const double  gain)
virtual

Set the current gain setting in dB.

Parameters
[in]gainRequested gain.
Exceptions
std::runtime_errorif a camera error occurs.

Reimplemented from Resonon::ResononImagerBase.

Examples:
flat_field_correction.cpp, and record_pika_basler_datacube.cpp.

◆ set_integration_time()

void PikaBasler::set_integration_time ( const double  milliseconds)
virtual

Set the integration time in milliseconds.

For PikaBasler cameras, the integration time is honored over the framerate. That is, if the integration time is longer than 1/framerate, the achieved framerate will be less than the requested framerate. See Framerate and Integration Time for additional considerations.

Parameters
[in]millisecondsRequested integration time in milliseconds.
Exceptions
std::runtime_errorif a camera error occurs.

Implements Resonon::ResononImagerBase.

Examples:
flat_field_correction.cpp, and record_pika_basler_datacube.cpp.

◆ set_internal_trigger()

void PikaBasler::set_internal_trigger ( )
virtual

Set the camera to internally triggered mode.

Exceptions
std::runtime_errorif camera error occurs

Reimplemented from Resonon::ResononImagerBase.

◆ set_spectral_bin()

void PikaBasler::set_spectral_bin ( int  new_spectral_bin)
virtual

Set the binning in the spectral dimension.

Parameters
[in]new_spectral_binDesired binning in the spatial dimension. Valid values are commonly integers between 2 and 4, but may vary with imager model.
Exceptions
std::domain_errorif invalid binning settings are requested.
std::runtime_errorif a camera error occurs.

Reimplemented from Resonon::ResononImagerBase.

Examples:
record_pika_basler_datacube.cpp.

◆ set_start_band()

void PikaBasler::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 from Resonon::ResononImagerBase.

◆ set_start_sample()

void PikaBasler::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

Reimplemented from Resonon::ResononImagerBase.

◆ start()

void PikaBasler::start ( )
virtual

Begin grabbing frames from the imager.

This method must be called before calling PikaBasler::get_frame().

Exceptions
std::runtime_errorif a camera error occurs.

Implements Resonon::ResononImagerBase.

Examples:
flat_field_correction.cpp, and record_pika_basler_datacube.cpp.

◆ stop()

void PikaBasler::stop ( )
virtual

Stop grabbing frames from the imager.

This is safe to call even if the imager is not connected.

Implements Resonon::ResononImagerBase.

Examples:
flat_field_correction.cpp, and record_pika_basler_datacube.cpp.

◆ ticks_per_second()

std::uint64_t PikaBasler::ticks_per_second ( )
virtual

Get the number of camera ticks per second, for converting values returned by PikaBasler::get_last_timestamp() to seconds.

Implements Resonon::ResononImagerBase.