MATLAB: Restore or copy IMROI / IMFREEHAND objects

image processingImage Processing Toolboximfreehandimroirois

Hello!
I have a question regarding IMFREEHAND:
I need to create similar ROIs in several similar images and therefore would like to be able to save the ROI objects and reload them onto new figure objects. The ROIs must remain editable after copying because their exact position might have to be readjusted. However, whenever I close the figure in which the ROIs were created, the IMROI objects are automatically deleted.
Is there a way to achieve what I want?
With IMRECT, you can specify an initial size and position for the ROI and use this feature to save and load ROIs, but this does not seem to be possible with IMFREEHAND.
Thanks, Matthias

Best Answer

I believe that is not an option for imfreehand. Let's say you did have handles like imrect or impoly - they would be practically every pixel. Then what would happen if you tried to grab a handle and move it? Just one pixel would move and the rest of the outline would stay put because you didn't grab their handles. So your new outline would look like the old one with a sharp spike sticking out of it. That doesn't seem very useful.