- The mouse cursor does not update when you hover over the ROI. The cursor is always an arrow.
- The ROI does not change color when you hover over it.
- The ROI right-click menu (UIContextMenu) is not supported.
Using 'getrect' on the main design window - App Designer
4 ビュー (過去 30 日間)
古いコメントを表示
Hi
Below is my main design window. As you can see, within the blue box it is an Image Object, not an Axes Object. There is no axes objects used in this design.
When I press the top button 'load your image', a single colour image will appear on the left as below.
What I would like to achieve:
At this stage I would like the mouse to change to a little cross automatically and ready to grab an area within this design window (not to open a new figure).
How to apply 'get rect' this this case and where to put the code?
At the moment, below is where and how I try to write the 'getrect'. Clearly something went wrong there which I don't fully understand. :(
Also, the image has its ImageClick Callback. But guess I never want to click on the image so guess this shouldn't apply?
Can anyone please advise?
Many thanks.:)
0 件のコメント
回答 (1 件)
Cris LaPierre
2021 年 12 月 29 日
The getrect and recommended drawrectangle function only work with axes objects. The workaround may be to add an axes, and then display the image using imshow (or other appropriate image display function) after loading it using imread.
Using ROIs in Apps Created with App Designer
You can use ROIs in apps created with App Designer, parenting an ROI in a UIAxes. You must explicitly specify the UIAxes when calling the ROI creation function, as an input argument or using the 'Parent' name/value pair. There are a few limitations when using ROIs in apps in this way:
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!