How to export matlab ConvexHull set as ImageJ .roi file?

Hello, i am new to imagej, and i’ve been trying to export the ConvexHull data in matlab out as imagej .roi file. but i can’t find some toolkit availabe.

I’ve download the MIJ toolbox for matlab. But there seems no manual for it. I don’t know whether I can and how to use mij export ROIs I extract in matlab out as .roi for imagej further processing.?

Hi @sharmonicak,
You can create ImageJ ROIs directly from the list of points that makes your polygon (whether it is the convex hull or not). Check the ImageJ ROI API:
http://rsb.info.nih.gov/ij/developer/api/ij/gui/PolygonRoi.html

With Miji, you can call this directly from MATLAB.

1 Like

Hi Tinevez,

Thank you very much! Could you please give me an example for matlab commands?

say: xy = [0, 0; 10, 0; 20, 15; 10, 20; 0, 20];

How to use MIJ to convert the points in xy into ImageJ ROI?