Skip to content

Commit

Permalink
Added support for IDS developed pixelformats
Browse files Browse the repository at this point in the history
  • Loading branch information
Lars-Kool committed Dec 10, 2024
1 parent 4d9437d commit 2d2ccfb
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 5 deletions.
37 changes: 36 additions & 1 deletion DeviceAdapters/IDSPeak/IDSPeak.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
#include <future>
#include <unordered_map>

#include <ids_peak_comfort_c/ids_peak_comfort_c.h>

using namespace std;
const double CIDSPeak::nominalPixelSizeUm_ = 1.0;
double g_IntensityFactor_ = 1.0;
Expand Down Expand Up @@ -133,6 +135,27 @@ string pixelFormatToString(peak_pixel_format pixelFormat) {
return "RGB10P32";
case PEAK_PIXEL_FORMAT_BGR10P32:
return "BGR10P32";
case PEAK_PIXEL_FORMAT_BAYER_GR10G40_IDS:
return "BAYER_GR10G40_IDS";
case PEAK_PIXEL_FORMAT_BAYER_RG10G40_IDS:
return "BAYER_RG10G40_IDS";
case PEAK_PIXEL_FORMAT_BAYER_GB10G40_IDS:
return "BAYER_GB10G40_IDS";
case PEAK_PIXEL_FORMAT_BAYER_BG10G40_IDS:
return "BAYER_BG10G40_IDS";
case PEAK_PIXEL_FORMAT_BAYER_GR12G24_IDS:
return "BAYER_GR12G24_IDS";
case PEAK_PIXEL_FORMAT_BAYER_RG12G24_IDS:
return "BAYER_RG12G24_IDS";
case PEAK_PIXEL_FORMAT_BAYER_GB12G24_IDS:
return "BAYER_GB12G24_IDS";
case PEAK_PIXEL_FORMAT_BAYER_BG12G24_IDS:
return "BAYER_BG12G24_IDS";
case PEAK_PIXEL_FORMAT_MONO10G40_IDS:
return "MONO10G40_IDS";
case PEAK_PIXEL_FORMAT_MONO12G24_IDS:
return "MONO12G24_IDS";

default:
return "";
}
Expand Down Expand Up @@ -176,7 +199,19 @@ unordered_map<string, peak_pixel_format> stringPixelFormat = {
{ "MONO10P", PEAK_PIXEL_FORMAT_MONO10P },
{ "MONO12P", PEAK_PIXEL_FORMAT_MONO12P },
{ "RGB10P32", PEAK_PIXEL_FORMAT_RGB10P32 },
{ "BGR10P32", PEAK_PIXEL_FORMAT_BGR10P32 }
{ "BGR10P32", PEAK_PIXEL_FORMAT_BGR10P32 },
{ "BAYER_GR10G40_IDS", PEAK_PIXEL_FORMAT_BAYER_GR10G40_IDS },
{ "BAYER_RG10G40_IDS", PEAK_PIXEL_FORMAT_BAYER_RG10G40_IDS },
{ "BAYER_GB10G40_IDS", PEAK_PIXEL_FORMAT_BAYER_GB10G40_IDS },
{ "BAYER_BG10G40_IDS", PEAK_PIXEL_FORMAT_BAYER_BG10G40_IDS },
{ "BAYER_GR12G24_IDS", PEAK_PIXEL_FORMAT_BAYER_GR12G24_IDS },
{ "BAYER_RG12G24_IDS", PEAK_PIXEL_FORMAT_BAYER_RG12G24_IDS },
{ "BAYER_GB12G24_IDS", PEAK_PIXEL_FORMAT_BAYER_GB12G24_IDS },
{ "BAYER_BG12G24_IDS", PEAK_PIXEL_FORMAT_BAYER_BG12G24_IDS },
{ "MONO10G40_IDS", PEAK_PIXEL_FORMAT_MONO10G40_IDS },
{ "MONO12G24_IDS", PEAK_PIXEL_FORMAT_MONO12G24_IDS },


};
peak_pixel_format stringToPixelFormat(string PixelFormat) {
return stringPixelFormat[PixelFormat];
Expand Down
5 changes: 1 addition & 4 deletions DeviceAdapters/IDSPeak/IDSPeak.h
Original file line number Diff line number Diff line change
Expand Up @@ -261,8 +261,6 @@ class CIDSPeak : public CCameraBase<CIDSPeak>
long cameraCCDYSize_;
double ccdT_;
std::string triggerDevice_;
map<int, string> peakTypeToString;
map<string, int> stringToPeakType;

peak_auto_feature_mode peakAutoWhiteBalance_;
map<int, string> peakAutoToString;
Expand Down Expand Up @@ -330,5 +328,4 @@ class MySequenceThread : public MMDeviceThreadBase
MMThreadLock suspendLock_;
};


#endif //_IDSPeak_H_
#endif //_IDSPeak_H_

0 comments on commit 2d2ccfb

Please sign in to comment.