[wrapper] add gain access functions
This commit is contained in:
parent
2b913b8133
commit
96d63e0a61
@ -82,6 +82,26 @@ bool PylonWrapper::exposureTime(double exposure_time) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
double PylonWrapper::gain() {
|
||||||
|
double gain = -1.;
|
||||||
|
if (valid) {
|
||||||
|
GenApi::INodeMap& nodemap = camera->GetNodeMap();
|
||||||
|
GenApi::INode* n = nodemap.GetNode( "Gain" );
|
||||||
|
Pylon::CFloatParameter detector_gain( n );
|
||||||
|
gain = detector_gain.GetValue();
|
||||||
|
}
|
||||||
|
return gain;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool PylonWrapper::gain(double gain_db) {
|
||||||
|
if (valid) {
|
||||||
|
GenAPI::INodeMap& nodemap = camera.GetNodeMap();
|
||||||
|
GenAPI::CFloatPtr(nodemap.GetNode("Gain"))->SetValue(gain_db);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
ImageSettings PylonWrapper::getImageSettings() {
|
ImageSettings PylonWrapper::getImageSettings() {
|
||||||
ImageSettings settings;
|
ImageSettings settings;
|
||||||
if (valid) {
|
if (valid) {
|
||||||
|
@ -29,6 +29,8 @@ public:
|
|||||||
double maxFrameRate();
|
double maxFrameRate();
|
||||||
double exposureTime();
|
double exposureTime();
|
||||||
bool exposureTime(double exposure_time);
|
bool exposureTime(double exposure_time);
|
||||||
|
double gain();
|
||||||
|
bool gain(double gain_db);
|
||||||
Pylon::CInstantCamera *getCamera();
|
Pylon::CInstantCamera *getCamera();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Loading…
Reference in New Issue
Block a user