Restore or copy IMROI / IMFREEHAND objects?
古いコメントを表示
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
採用された回答
その他の回答 (2 件)
Matthias
2012 年 10 月 15 日
0 投票
3 件のコメント
Sebastian
2012 年 11 月 15 日
Hello Matthias, I have the same problem with IMFREEHAND and I don't find any solution. So I'm very interested in your solution if you have one, did you?
Image Analyst
2012 年 11 月 16 日
Yes. See the FAQ: http://matlab.wikia.com/wiki/FAQ#How_can_I_share_data_between_callback_functions_in_my_GUI.28s.29.3F So just save the roi's and recall them later when needed.
Xingwang Yong
2022 年 9 月 30 日
@Matthias Did you find a solution? I had exactly the same question.
Tim Jackman
2018 年 9 月 27 日
0 投票
The new drawfreehand ROI supports save/load. You can save the entire figure and reload it, or you can save the ROI into a mat file and reload the ROI later.
When reloading the ROI, you need to set the Parent property of the ROI to the new axes.
https://www.mathworks.com/help/images/ref/drawfreehand.html
カテゴリ
ヘルプ センター および File Exchange で ROI-Based Processing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!