How to compute oriented bounding box for a model and display it using annotation ROI?

In Get size, position, and orientation of each segment, I learned how to compute oriented bounding box for each segment and displays them using annotation ROI.
I want to know how to compute oriented bounding box for a model and display it using annotation ROI .

or how to convert model to segmentation node with python?

You can load a surface mesh file as segmentation or import a model into a segmentation node by calling slicer.modules.segmentations.logic().ImportModelToSegmentationNode(modelNode, segmentationNode).

1 Like

Thanks,谢谢老师! :slightly_smiling_face: