Commit d76955fa authored by Yuelong Yu's avatar Yuelong Yu
Browse files

changed image data type to unsigned short

parent 8e5fe020
......@@ -330,6 +330,6 @@ namespace PcoNS
* @param image height
* @return error code. 0 is OK. see @ERROR
*/
virtual int GetImageData(vector<short>& vImg,int& nX,int& nY) = 0;
virtual int GetImageData(vector<unsigned short>& vImg,int& nX,int& nY) = 0;
};
}
\ No newline at end of file
......@@ -283,7 +283,7 @@ namespace PcoNS
return m_uptrPcoCamera->StopAcq();
}
int PcoCLHSImpl::GetImageData(vector<short>& vImg,int& nX,int& nY)
int PcoCLHSImpl::GetImageData(vector<unsigned short>& vImg,int& nX,int& nY)
{
return m_uptrPcoCamera->GetImageData(vImg,nX,nY);
}
......
......@@ -98,7 +98,7 @@ namespace PcoNS
int StopAcq();
int GetImageData(vector<short>& vImg,int& nX,int& nY);
int GetImageData(vector<unsigned short>& vImg,int& nX,int& nY);
private:
shared_ptr<CPco_com> m_sptrCamera;
......
......@@ -165,7 +165,7 @@ namespace PcoNS
return OK;
}
int PcoEdgeCLHS::GetImageData(vector<short>& vImg,int& /* nX */,int& /* nY */)
int PcoEdgeCLHS::GetImageData(vector<unsigned short>& vImg,int& /* nX */,int& /* nY */)
{
//cout<<"getdata"<<endl;
......
......@@ -34,13 +34,13 @@ namespace PcoNS
int StartAcq(int nFrameNumbers);
int StopAcq();
int GetImageData(vector<short>& vImg,int& nX,int& nY);
int GetImageData(vector<unsigned short>& vImg,int& nX,int& nY);
private:
int PreAcq();
private:
vector<short> m_vImg;
vector<unsigned short> m_vImg;
};
}
......
......@@ -351,7 +351,7 @@ namespace PcoNS
return DOES_NOT_SUPPORT;
}
int PcoProduct::GetImageData(vector<short>& /* vImg */,
int PcoProduct::GetImageData(vector<unsigned short>& /* vImg */,
int& /* nX */,int& /* nY */)
{
return DOES_NOT_SUPPORT;
......
......@@ -93,7 +93,7 @@ namespace PcoNS
virtual int StartAcq(int nFrameNumbers);
virtual int StopAcq();
virtual int GetImageData(vector<short>& vImg,int& nX,int& nY);
virtual int GetImageData(vector<unsigned short>& vImg,int& nX,int& nY);
virtual ~PcoProduct();
......
......@@ -220,7 +220,7 @@ namespace PcoNS
return OK;
}
int Pco4000::GetImageData(vector<short>& vImg,int& nX,int& nY)
int Pco4000::GetImageData(vector<unsigned short>& vImg,int& nX,int& nY)
{
int nPicNum = 1;
void* ptrAddr;
......
......@@ -50,11 +50,11 @@ namespace PcoNS
int StartAcq(int nFrameNumbers);
int StopAcq() override;
int GetImageData(vector<short>& vImg,int& nX,int& nY);
int GetImageData(vector<unsigned short>& vImg,int& nX,int& nY);
private:
int PreAcq();
vector<short> m_vImg;
vector<unsigned short> m_vImg;
};
}
......
......@@ -267,7 +267,7 @@ namespace PcoNS
}
int PcoDimaxHS4::GetImageData(vector<short>& vImg,int& nX,int& nY)
int PcoDimaxHS4::GetImageData(vector<unsigned short>& vImg,int& nX,int& nY)
{
//cout<<"get image data"<<endl;
......@@ -316,15 +316,15 @@ namespace PcoNS
}
// recorder mode + sequence buffer
int PcoDimaxHS4::GetImageDataInRecMode0(vector<short>& vImg,int& nX,int& nY)
int PcoDimaxHS4::GetImageDataInRecMode0(vector<unsigned short>& vImg,int& nX,int& nY)
{
return GetImageDataInRecMode1(vImg,nX,nY);
}
// recorder mode + ring buffer
int PcoDimaxHS4::GetImageDataInRecMode1(vector<short>& vImg,int& nX,int& nY)
int PcoDimaxHS4::GetImageDataInRecMode1(vector<unsigned short>& vImg,int& nX,int& nY)
{
short* ptrAddr = m_vImg.data();
unsigned short* ptrAddr = m_vImg.data();
unsigned int valid = 0;
unsigned int max = 0;
......@@ -375,9 +375,9 @@ namespace PcoNS
}
// fifo mode
int PcoDimaxHS4::GetImageDataInRecMode2(vector<short>& vImg,int& nX,int& nY)
int PcoDimaxHS4::GetImageDataInRecMode2(vector<unsigned short>& vImg,int& nX,int& nY)
{
short* ptrAddr = m_vImg.data();
unsigned short* ptrAddr = m_vImg.data();
unsigned int valid = 0;
unsigned int max = 0;
......
......@@ -36,17 +36,17 @@ namespace PcoNS
int SetRecorderMode(short shRecorderMode) override;
int StartAcq(int nFrameNumbers) override;
int StopAcq() override;
int GetImageData(vector<short>& vImg,int& nX,int& nY) override;
int GetImageData(vector<unsigned short>& vImg,int& nX,int& nY) override;
private:
int PreAcq() override;
int GetImgNumberFromTimeStamp(short* buf,int shift);
int GetImageDataInRecMode0(vector<short>& vImg,int& nX,int& nY);
int GetImageDataInRecMode1(vector<short>& vImg,int& nX,int& nY);
int GetImageDataInRecMode2(vector<short>& vImg,int& nX,int& nY);
int GetImageDataInRecMode0(vector<unsigned short>& vImg,int& nX,int& nY);
int GetImageDataInRecMode1(vector<unsigned short>& vImg,int& nX,int& nY);
int GetImageDataInRecMode2(vector<unsigned short>& vImg,int& nX,int& nY);
vector<short> m_vImg;
vector<unsigned short> m_vImg;
int m_framereq,m_currentframe;
short m_rec_mode;
......
......@@ -416,7 +416,7 @@ namespace PcoNS
return OK;
}
int PcoEdgeProduct::GetImageData(vector<short>& vImg,int& nX,int& nY)
int PcoEdgeProduct::GetImageData(vector<unsigned short>& vImg,int& nX,int& nY)
{
//cout<<__func__<<endl;
......
......@@ -64,7 +64,7 @@ namespace PcoNS
int ForceTrigger(short& shTrigger);
int StartAcq(int nFrameNumbers);
int StopAcq();
int GetImageData(vector<short>& vImg,int& nX,int& nY);
int GetImageData(vector<unsigned short>& vImg,int& nX,int& nY);
protected:
int GetTransferParameter(stTransferParams& stTP);
......@@ -76,7 +76,7 @@ namespace PcoNS
double ConvertSecondToNanoSecond(double dTimeInSecond){ return dTimeInSecond*pow(10,9); }
int PreAcq();
vector<short> m_vImg;
vector<unsigned short> m_vImg;
};
......
......@@ -313,7 +313,7 @@ namespace PcoNS
return m_uptrPcoCamera->StopAcq();
}
int PcoMe4Impl::GetImageData(vector<short>& vImg,int& nX,int& nY)
int PcoMe4Impl::GetImageData(vector<unsigned short>& vImg,int& nX,int& nY)
{
return m_uptrPcoCamera->GetImageData(vImg,nX,nY);
}
......
......@@ -99,7 +99,7 @@ namespace PcoNS
int StartAcq(int nFrameNumbers);
int StopAcq();
int GetImageData(vector<short>& vImg,int& nX,int& nY);
int GetImageData(vector<unsigned short>& vImg,int& nX,int& nY);
private:
shared_ptr<CPco_com> m_sptrCamera;
......
......@@ -339,7 +339,7 @@ namespace PcoNS
return DOES_NOT_SUPPORT;
}
int PcoProduct::GetImageData(vector<short>& /* vImg */,
int PcoProduct::GetImageData(vector<unsigned short>& /* vImg */,
int& /* nX */,int& /* nY */)
{
return DOES_NOT_SUPPORT;
......
......@@ -97,7 +97,7 @@ namespace PcoNS
virtual int StartAcq(int nFrameNumbers);
virtual int StopAcq();
virtual int GetImageData(vector<short>& vImg,int& nX,int& nY);
virtual int GetImageData(vector<unsigned short>& vImg,int& nX,int& nY);
virtual ~PcoProduct();
......
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