Skip to content

Commit

Permalink
solving rounding issue
Browse files Browse the repository at this point in the history
  • Loading branch information
smichi23 committed Oct 21, 2022
1 parent 1877bcc commit d7ed60d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dicompylercore/dvhcalc.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -497,8 +497,8 @@ def get_resampled_lut(index_extents,
num_cols = abs(index_extents[0] - index_extents[2])
num_rows = abs(index_extents[1] - index_extents[3])

col_samples = num_cols * min_pixel_spacing[1] / new_pixel_spacing[1]
row_samples = num_rows * min_pixel_spacing[0] / new_pixel_spacing[0]
col_samples = round(num_cols * min_pixel_spacing[1] / new_pixel_spacing[1])
row_samples = round(num_rows * min_pixel_spacing[0] / new_pixel_spacing[0])

col_lut = np.linspace(
extents[0], extents[2], int(col_samples), dtype=np.float
Expand Down

0 comments on commit d7ed60d

Please sign in to comment.