Save a single ROI as .roi file from macro

Posted by ben.s.carlson on
URL: http://imagej.273.s1.nabble.com/Save-a-single-ROI-as-roi-file-from-macro-tp5008183.html

Hello,

I'd like to save an ROI as a .roi file from a macro.  I see the functionality to save as a zip, however I only have one roi in the roi manager at a time, so it would be much better to save as a .roi file.

I'm using imageJ version 1.49b.

Here is a snippet of my code.

roiManager("Select", 0); //Only one roi in ROI manager, select it
roiManager("Save Selected", dir + "\\myfile.roi"); //dir is the working directory

I've also tried the "Save" command, but both require that I save the file as .zip.  Is it possible to save just the roi?

Thank you for the help!

Ben