Skip to content

Commit

Permalink
fix to update geometry with roi
Browse files Browse the repository at this point in the history
  • Loading branch information
erikfrojdh committed Feb 5, 2025
1 parent e96fe31 commit 9873041
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/RawFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ void RawFile::update_geometry_with_roi() {
if (roi.xmin > m.x) {
m.width -= roi.xmin - m.x;
}
if (roi.xmax < m.x + m.width) {
if (roi.xmax < m.x + original_width) {
m.width -= m.x + original_width - roi.xmax;
}
m.x = pos_x;
Expand All @@ -226,7 +226,7 @@ void RawFile::update_geometry_with_roi() {
m.height -= roi.ymin - m.y;

}
if (roi.ymax < m.y + m.height) {
if (roi.ymax < m.y + original_height) {
m.height -= m.y + original_height - roi.ymax;
}
m.y = pos_y;
Expand Down

0 comments on commit 9873041

Please sign in to comment.