Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rounding issues in reconstruction #135

Merged
merged 1 commit into from
May 25, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -421,12 +421,12 @@ def compute_image_dimensions(detection_geometry: DetectionGeometryBase, spacing_
field_of_view = detection_geometry.field_of_view_extent_mm
logger.debug(f"Field of view: {field_of_view}")

xdim_start = int(field_of_view[0] / spacing_in_mm)
xdim_end = int(field_of_view[1] / spacing_in_mm)
zdim_start = int(field_of_view[2] / spacing_in_mm)
zdim_end = int(field_of_view[3] / spacing_in_mm)
ydim_start = int(field_of_view[4] / spacing_in_mm)
ydim_end = int(field_of_view[5] / spacing_in_mm)
xdim_start = int(np.round(field_of_view[0] / spacing_in_mm))
xdim_end = int(np.round(field_of_view[1] / spacing_in_mm))
zdim_start = int(np.round(field_of_view[2] / spacing_in_mm))
zdim_end = int(np.round(field_of_view[3] / spacing_in_mm))
ydim_start = int(np.round(field_of_view[4] / spacing_in_mm))
ydim_end = int(np.round(field_of_view[5] / spacing_in_mm))

xdim = (xdim_end - xdim_start)
ydim = (ydim_end - ydim_start)
Expand Down