Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
LimaGroup
Lima-camera-slsdetector
Commits
f7250456
Commit
f7250456
authored
Apr 07, 2020
by
Alejandro Homs Puron
Committed by
operator for beamline
Apr 07, 2020
Browse files
Fix test_slsdetector_control: check Roi size and adapt for Eiger-500k
parent
e9d0bb19
Pipeline
#24244
passed with stages
in 8 minutes and 59 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
test/test_slsdetector_control.cpp
View file @
f7250456
...
...
@@ -301,6 +301,22 @@ void SlsDetectorAcq::setRoi(Roi& roi)
DEB_MEMBER_FUNCT
();
DEB_PARAM
()
<<
DEB_VAR1
(
roi
);
Size
max_size
;
m_ct_image
->
getMaxImageSize
(
max_size
);
Bin
bin
;
m_ct_image
->
getBin
(
bin
);
max_size
/=
bin
;
Roi
max_roi
(
Point
(
0
,
0
),
max_size
);
DEB_TRACE
()
<<
DEB_VAR2
(
roi
,
max_roi
);
if
(
!
max_roi
.
containsRoi
(
roi
))
{
Point
tl
=
roi
.
getTopLeft
();
if
(
!
max_roi
.
containsPoint
(
tl
))
THROW_HW_ERROR
(
InvalidValue
)
<<
DEB_VAR2
(
roi
,
max_roi
);
Point
br
=
max_roi
.
getBottomRight
();
roi
.
setCorners
(
tl
,
br
);
DEB_WARNING
()
<<
"Restricting roi: "
<<
DEB_VAR2
(
roi
,
max_roi
);
}
m_ct_image
->
setRoi
(
roi
);
}
...
...
@@ -350,7 +366,7 @@ void test_slsdetector_control(string config_fname, bool enable_debug = false)
acq
.
run
();
DEB_ALWAYS
()
<<
"Done!"
;
Roi
roi
=
Roi
(
Point
(
256
,
5
12
),
Size
(
256
,
512
));
Roi
roi
=
Roi
(
Point
(
256
,
12
8
),
Size
(
256
,
512
));
acq
.
setRoi
(
roi
);
DEB_ALWAYS
()
<<
"Run "
<<
DEB_VAR1
(
roi
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment