Commit 49e6e4b9 authored by Yuelong Yu's avatar Yuelong Yu
Browse files

implemented binning for pco edge clhs

parent fbfec4a8
......@@ -24,5 +24,5 @@
namespace PcoNS
{
const std::string PCOSDK_VERSION="0.5";
const std::string PCOSDK_VERSION="0.6";
}
......@@ -79,6 +79,41 @@ namespace PcoNS
return SET_ERROR;
return ArmCamera();
}
int PcoEdgeCLHS::GetBinning(short& shBinHorz,short& shBinVert)
{
unsigned short ushBinX,ushBinY;
if(m_sptrCamera->PCO_GetBinning(&ushBinX,&ushBinY) != OK)
return GET_ERROR;
shBinHorz = static_cast<short>(ushBinX);
shBinVert = static_cast<short>(ushBinY);
return OK;
}
int PcoEdgeCLHS::SetBinning(short shBinHorz,short shBinVert)
{
// if(m_sptrCamera->PCO_SetBinning(static_cast<unsigned short>(shBinHorz),
// static_cast<unsigned short>(shBinVert)) != OK)
// return SET_ERROR;
unsigned short binh = static_cast<unsigned short>(shBinHorz);
unsigned short binv = static_cast<unsigned short>(shBinVert);
if(m_sptrCamera->PCO_SetBinning(binh,binv) != OK)
return GET_ERROR;
int max_x,max_y;
if(GetCameraMaxSize(max_x,max_y) != OK)
return GET_ERROR;
short x1 = max_x/binh;
short y1 = max_y/binv;
if(SetROI(1,1,x1,y1) != OK)
return SET_ERROR;
return ArmCamera();
//return OK;
}
int PcoEdgeCLHS::PreAcq()
{
......
......@@ -31,6 +31,9 @@ namespace PcoNS
bool SetCamera(shared_ptr<CPco_com>& sptrCamera);
int GetLUT(short& shIdentifier,short& shParam);
int SetLUT(short shIdentifier,short shParam);
int GetBinning(short& shBinHorz,short& shBinVert);
int SetBinning(short shBinHorz,short shBinVert);
int StartAcq(int nFrameNumbers);
int StopAcq();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment