Skip to content

Commit

Permalink
Fix making density images with ITK
Browse files Browse the repository at this point in the history
Fix getting the labels image spacing when loading the image through ITK rather than SimpleITK.
  • Loading branch information
yoda-vid committed Nov 18, 2023
1 parent ece22f3 commit 38e112e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion magmap/io/export_regions.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ def make_heat_map():
labels_img = sitk_io.convert_img(labels_img_sitk)

is_2d = labels_img.ndim == 2
labels_res = list(labels_img_sitk.GetSpacing()[::-1])
labels_res = list(labels_img_sitk.GetSpacing())[::-1]
if is_2d:
# temporarily convert 2D images to 3D
labels_img = labels_img[None]
Expand Down

0 comments on commit 38e112e

Please sign in to comment.