hk_y
(hk y)
August 14, 2024, 4:08pm
1
Operating system: mac
Slicer version: 5.2.1
Expected behavior: I have an NRRD file and I can calculate its OBB and RAS diameter using Segment Statistics, but I want to display its bounding box. How can I do that?
lassoan
(Andras Lasso)
August 15, 2024, 9:44am
2
See code snippet that you can copy-paste into the Slicer Python console in the script repository .
hk_y
(hk y)
August 15, 2024, 1:07pm
3
Thank you so much! Can you give me the code snippet that could display the AABB (axis-aligned bounding box) of the label. Thanks.
lassoan
(Andras Lasso)
August 15, 2024, 1:27pm
4
The topic of getting axis-aligned bounding boxes is discussed here:
I created a segmentation with some segments and want to get an axis-aligned bounding box for each segment. As far as i know, with the segment statistics module we can compute oriented bounding boxes, but i couldn’t find an option to get axis-aligned bounding boxes. I tried to get the segments as numpy arrays and use numpy functions to find the required values as suggested here . But since i rotated the segments before, the segments do not match with the original scalar volume anymore. Do I need t…