Apparent bug when images.ROI is placed within an hggroup

조회 수: 1 (최근 30일)
royk
royk 2020년 1월 23일
편집: Vimal Rathod 2020년 2월 4일
I need to place an ROI within a Graphic Group:
clf
axis([0 10 0 10])
g = hggroup(gca);
images.roi.Circle(g,'Center',[4 5],'Radius',3)
The ROI appears fine on the figure. It can also be dragged just fine.
However, upon trying to resize the ROI with the mouse, I am getting:
Warning: Error occurred while executing the listener callback for event WindowMouseMotion
defined for class matlab.ui.Figure:
Unrecognized method, property, or field 'XDir' for class 'matlab.graphics.primitive.Group'.
Error in images.roi.Circle/setPointerEnterFcn
Error in images.roi.internal.IPTROIPointerManager/motionCallback
Error in images.roi.internal.IPTROIPointerManager>@(src,evt)self.motionCallback(src,evt)
This seems like a bug.
Any thoughts for a work around that will allow placing ROIs within graphic groups?

채택된 답변

Vimal Rathod
Vimal Rathod 2020년 2월 4일
편집: Vimal Rathod 2020년 2월 4일
I have heard that this issue is known to the concerned developers and the issue will be resolved in 2020a release. As a work around for your usecase or for any generic ROI grouping cases, you could parent the ROIs directly to the axes and "group" them by using the ROI's "Tag" property. You can then find the grouped ROIs by using findobj with that specific tag.
Refer the following link to know more about how to use findobj function.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Graphics Object Programming에 대해 자세히 알아보기

제품


릴리스

R2019a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by