Commit 996c38bc authored by Alejandro Homs Puron's avatar Alejandro Homs Puron Committed by operator for beamline
Browse files

Jungfrau: add getRawMode helper

parent c0fbd343
...@@ -326,6 +326,12 @@ class Jungfrau : public Model ...@@ -326,6 +326,12 @@ class Jungfrau : public Model
AutoPtr<ReaderHelper> m_reader; AutoPtr<ReaderHelper> m_reader;
}; };
bool getRawMode() {
bool raw;
getCamera()->getRawMode(raw);
return raw;
}
void addImgProc(ImgProcBase *img_proc); void addImgProc(ImgProcBase *img_proc);
void removeImgProc(ImgProcBase *img_proc); void removeImgProc(ImgProcBase *img_proc);
void removeAllImgProc(); void removeAllImgProc();
......
...@@ -69,7 +69,7 @@ Jungfrau::Recv::Recv(Jungfrau *jungfrau, int idx) ...@@ -69,7 +69,7 @@ Jungfrau::Recv::Recv(Jungfrau *jungfrau, int idx)
void Jungfrau::Recv::prepareAcq() void Jungfrau::Recv::prepareAcq()
{ {
DEB_MEMBER_FUNCT(); DEB_MEMBER_FUNCT();
m_jungfrau->getCamera()->getRawMode(m_raw); m_raw = m_jungfrau->getRawMode();
m_frame_dim = m_jungfrau->getModuleFrameDim(m_idx, m_raw); m_frame_dim = m_jungfrau->getModuleFrameDim(m_idx, m_raw);
m_data_offset = m_jungfrau->getModuleDataOffset(m_idx, m_raw); m_data_offset = m_jungfrau->getModuleDataOffset(m_idx, m_raw);
DEB_TRACE() << DEB_VAR3(m_idx, m_frame_dim, m_data_offset); DEB_TRACE() << DEB_VAR3(m_idx, m_frame_dim, m_data_offset);
...@@ -414,8 +414,7 @@ int Jungfrau::getModuleDataOffset(int idx, bool raw) ...@@ -414,8 +414,7 @@ int Jungfrau::getModuleDataOffset(int idx, bool raw)
void Jungfrau::getDetMap(Data& det_map) void Jungfrau::getDetMap(Data& det_map)
{ {
DEB_MEMBER_FUNCT(); DEB_MEMBER_FUNCT();
bool raw; bool raw = getRawMode();
getCamera()->getRawMode(raw);
FrameDim frame_dim; FrameDim frame_dim;
getFrameDim(frame_dim, raw); getFrameDim(frame_dim, raw);
Buffer *b = new Buffer(frame_dim.getMemSize() * 2); Buffer *b = new Buffer(frame_dim.getMemSize() * 2);
...@@ -593,9 +592,7 @@ void Jungfrau::updateImageSize() ...@@ -593,9 +592,7 @@ void Jungfrau::updateImageSize()
{ {
DEB_MEMBER_FUNCT(); DEB_MEMBER_FUNCT();
Camera *cam = getCamera(); bool raw = getRawMode();
bool raw;
cam->getRawMode(raw);
FrameDim frame_dim; FrameDim frame_dim;
getFrameDim(frame_dim, raw); getFrameDim(frame_dim, raw);
DEB_TRACE() << DEB_VAR2(frame_dim, raw); DEB_TRACE() << DEB_VAR2(frame_dim, raw);
...@@ -829,8 +826,7 @@ void Jungfrau::addImgProc(ImgProcBase *img_proc) ...@@ -829,8 +826,7 @@ void Jungfrau::addImgProc(ImgProcBase *img_proc)
DEB_MEMBER_FUNCT(); DEB_MEMBER_FUNCT();
DEB_PARAM() << DEB_VAR1(img_proc); DEB_PARAM() << DEB_VAR1(img_proc);
m_img_proc_list.push_back(img_proc); m_img_proc_list.push_back(img_proc);
bool raw; bool raw = getRawMode();
getCamera()->getRawMode(raw);
FrameDim frame_dim; FrameDim frame_dim;
getFrameDim(frame_dim, raw); getFrameDim(frame_dim, raw);
img_proc->updateImageSize(frame_dim.getSize(), raw); img_proc->updateImageSize(frame_dim.getSize(), raw);
......
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