From 0a3783e776c2d6c7f85f9bace3c15dfd5ff03322 Mon Sep 17 00:00:00 2001 From: David Young Date: Fri, 17 Nov 2023 11:34:40 -0800 Subject: [PATCH] Fix making density images with ITK Fix getting the labels image spacing when loading the image through ITK rather than SimpleITK. --- magmap/io/export_regions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/magmap/io/export_regions.py b/magmap/io/export_regions.py index 0bedf41a..e1ebe2c1 100644 --- a/magmap/io/export_regions.py +++ b/magmap/io/export_regions.py @@ -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]