Print oriented bounding boxes(OBB in ras) and obb diameters data for 600 patients

Operating system: mac os python 3.12
Slicer version: 4.8.1
Expected behavior:
I’ve labeled and converted over 600 patients’ labels into NRRD files. I want to apply the “obb in ras” and “obb diameter” for label (only one segmentation in each patient) using the “Segment Statistics” tool from “Quantification” in 3D Slicer. However, applying this operation to each patient individually would be too time-consuming. Do you have any suggestions?
Actual behavior: I try tp apply this operation to each patient individually but it’s too time-consuming. Do you have any suggestions?

You can do this fairly easily with a python script. You might also take a look at Slicer Case Iterator (GitHub - JoostJM/SlicerCaseIterator: Simple Scripted Module to batch process patients in 3D Slicer), which is oriented around looping over cases. The Slicer script repository will also be very helpful for you, here is a link to an example script which gathers obb data using the Segment Statistics module from python. Combining those two pieces (looping over cases and finding obb data on each) should get you everything you need.

Thank you so much! I have solved my problem.

1 Like