Skip to content

Commit

Permalink
mrpeek: focus: round instead of truncate to integer
Browse files Browse the repository at this point in the history
  • Loading branch information
maxpietsch committed Oct 30, 2020
1 parent 0b73d2d commit c3fddd2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cmd/mrpeek.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -941,6 +941,7 @@ void run ()
throw Exception ("number of indices passed to -focus option exceeds image dimensions");
for (unsigned int n = 0; n < p.size(); ++n) {
if (std::isfinite (p[n])) {
p[n] = Math::round<default_type>(p[n]);
if (p[n] < 0 || p[n] > image.size(n)-1)
throw Exception ("position passed to -focus option is out of bounds for axis "+str(n));
if (n < 3)
Expand Down

0 comments on commit c3fddd2

Please sign in to comment.