#ifndef IRISXIMEAIMAGER_H #define IRISXIMEAIMAGER_H #include #include #include #include "irisximeaimager_global.h" #include "imager_base.h" #ifdef WIN32 #include // Windows #else #include // Linux, OSX #endif #define CE(func) {XI_RETURN stat = (func); if (XI_OK!=stat) {printf("Error:%d returned from function:"#func"\n",stat);throw stat;}} #define HandleResult(res,place) if (res!=XI_OK) {printf("Error after %s (%d)\n",place,res);} namespace Iris { class IRISXIMEAIMAGERSHARED_EXPORT IrisXimeaImager:public ImagerBase { public: HANDLE m_xiH; void setGainOffset(float gain, float offset); bool setSpectralBin(int spectralBin); bool setSpatialBin(int spatialBin); int getSpectralBin(); int getSpatialBin(); void setRoi(int OffsetX, int width, int OffsetY, int height); int getBufferSizeOfOneFrame(); public: float m_fGain; float m_fOffset; //继承基类的 IrisXimeaImager();//11111111111111111111 virtual ~IrisXimeaImager(); void connect(const char * camera_serial_number=NULL);//111111111111111111111111111111111 void disconnect();//111111111111111111111111111111 void start();//111111111111111111111 void stop();//1111111111111111111111 void get_imager_type(char *buffer, int buffer_size); void get_serial_number(char *buffer, int buffer_size); void get_camera_serial_number(char *buffer, int buffer_size); void generate_configuration_report(char *buffer, int buffer_size); float get_coeff_a(); float get_coeff_b(); float get_coeff_c(); double get_wavelength_at_band(const int band);//11111111111111111111 int get_frame_buffer_size_in_bytes(); unsigned short* get_frame(unsigned short* buffer);//11111111111111111111111 std::uint64_t get_last_timestamp(); std::uint64_t ticks_per_second(); void set_spectral_bin(int new_spectral_bin);//11111111111111111111111111111111 int get_spectral_bin(); int get_min_spectral_bin(); int get_max_spectral_bin(); int get_band_count();//11111111111111111111 int get_start_band();//对应上一版本api的函数:get_window_start_band void set_start_band(int band); int get_min_start_band(); int get_max_start_band(); int get_inc_start_band(); int get_end_band();//对应上一版本api的函数:get_window_end_band void set_end_band(int band); int get_min_end_band(); int get_max_end_band(); int get_inc_end_band(); int get_sample_count();//11111111111111111 int get_start_sample(); void set_start_sample(int sample); int get_min_start_sample(); int get_max_start_sample(); int get_inc_start_sample(); int get_end_sample(); void set_end_sample(int sample); int get_min_end_sample(); int get_max_end_sample(); int get_inc_end_sample(); void set_framerate(const double frames_per_second);//11111111111111111111111111111111 double get_framerate();//1111111111111111111111 double get_min_framerate(); double get_max_framerate(); double get_min_integration_time(); double get_max_integration_time(); void set_integration_time(const double microsecond);//111111111111111111111 double get_integration_time();//1111111111111111111111111111111 void set_gain(const double gain);//111111111111 double get_gain();//111111111111 double get_min_gain(); double get_max_gain(); void set_internal_trigger(); void set_external_trigger(unsigned int signal_line, bool rising_edge=true); bool is_trigger_external(); protected: private: XI_IMG m_image; // image buffer uint64_t m_timestampOfCamera; }; } #endif // IRISXIMEAIMAGER_H