Skip to content
Snippets Groups Projects
Commit 0869a2fa authored by Tamino Huxohl's avatar Tamino Huxohl
Browse files

prepare script selects shape with fewest slices for meta.csv

parent d6081a86
No related branches found
No related tags found
No related merge requests found
......@@ -406,7 +406,7 @@ if __name__ == "__main__":
), f"Not all pixel spacings of the reconstructions are equal: {pixel_spacings}"
pixel_spacing = pixel_spacings[0]
# extract shapes and assert that they are equal for all reconstruction images
# use the shape with the fewest slices, all other images will be aligned to that
_map_lists = map(
lambda image: [image.Rows, image.Columns, image.NumberOfSlices],
recon_images,
......@@ -414,9 +414,7 @@ if __name__ == "__main__":
_map_lists = map(lambda shape: list(map(int, shape)), _map_lists)
_map_ndarrays = map(lambda shape: np.array(shape), _map_lists)
shapes = list(_map_ndarrays)
_equal = all(map(lambda shape: (shape == shapes[0]).all(), shapes))
# assert _equal, f"Not all shapes of the reconstructions are equal: {shapes}"
# print(shapes)
shapes.sort(key=lambda shape: shape[2])
shape = shapes[0]
# exctract and sort energy windows
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment