Convex Hull in a multipolygonal roi

How can I get a convex hull in a multipolygonal roi?
I mean a 2D image with multiple unconnected polygons defined as different rois. I need the convex hull that envelops all polygons.
Current roi.getConvexHull(); works only in a single polygon. If I force it to use multiple polygons it return null.


Hi Alex,

To get the behavior you want, you can create a new polygon ROI that contains all the points from the unconnected poly-ROIs you are interested in, then call getConvexHull() on that one (big) ROI.

Good luck,

1 Like

Indeed, thanks bogovicj, It seems a new feature starting from ij 1.51 and I already implemented that behaviour in