How to define, edit and delete ROI in a (scatter) plot?
6 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I have a plot of data of some measurement. I want to define several ROIs in the plot, in order to make fitting, or determine the baseline or whatever reason, and I need these ROIs in a variable (or variables). Is it possible to make it grafically? All the methods I tried (imline, brush, datacursor) are for different task and does not allow editing, deleting the ROIs both from the picture and from the variable, I was not able to follow the changes I have made when tried i.e. change the limits of the ROI.
I think there should be something but I could not find it. It is so essential when someone wants to evaluate the data.
Thanks for any suggestions.
Csaba
0 Kommentare
Antworten (2)
Debarati Banerjee
am 12 Apr. 2016
For the function 'imline', you can use the method 'delete' to delete the the ROI object from figure. You may edit the position of the ROI using the method 'setPosition'.
Please refer to the section 'Methods' of the following link for more details: http://in.mathworks.com/help/images/ref/imline.html
Hope this helps!
Cheers, Debarati
Debarati Banerjee
am 13 Apr. 2016
You may use the 'DeleteFcn' property to call a function when an 'imfill' object is being deleted.
>> set(h,'DeleteFcn',{@fcn}) % where h is an imfill object
In the 'fcn' function you can pass aapropriate display commands which will display messages in Command Window and help you in understanding which object is deleted/ position is changed.
3 Kommentare
Debarati Banerjee
am 14 Apr. 2016
Hello Csaba,
Please find the scripts 'mainfcn.m' and 'test.m'. In the mainfcn script I have created a ROI (h) and have added the DeleteFcn callback with the function test. Once the ROI is deleted, the test function is executed. In the test script, I am displaying a message in Command Window. Additionally I am setting the value of h to 0 for understanding purpose.
Its just an idea and I hope this helps!
Cheers Debarati
Siehe auch
Kategorien
Mehr zu Matrix Indexing finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!