Skip to content

Commit

Permalink
Use image position patient instead of slice location
Browse files Browse the repository at this point in the history
  • Loading branch information
gacou54 committed Apr 22, 2024
1 parent e0be562 commit 0eab595
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rt_utils/ds_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,4 +258,4 @@ def get_contour_sequence_by_roi_number(ds, roi_number):


def _find_closest_slice(series_slices: List[Dataset], z_coord: float) -> Dataset:
return min(series_slices, key=lambda series_slice: abs(series_slice.SliceLocation - z_coord))
return min(series_slices, key=lambda series_slice: abs(series_slice.ImagePositionPatient[2] - z_coord))

0 comments on commit 0eab595

Please sign in to comment.