'drawcircle' and 'roi.cricle' do not respect preset Radius
조회 수: 2 (최근 30일)
이전 댓글 표시
I am trying to make a circular roi with a specified R,but allowing to set the center and the position. I first thought of doing it with 'ginput' and later drawing the circle, but since I need to allow for interactive reposition, I switched to 'roi' creation (image.roi.circle).
However, for some reason, something happens with the Radius and it's never set as defined, or it allows interactive setting of the radius... I tried both with 'drawcircle' and 'draw' (predefining the roi), but none works for me as I want to. This is the code for 'drawcircle':
figure
imagesc(background);
drawncircle = drawcircle('InteractionsAllowed', 'translate','Radius',6, 'LineWidth',1.5);
Warning: The ROI was not fully defined. 'Radius' will be ignored and interactive placement will begin.
> In drawcircle (line 187)
And here the code for roi definition + draw():
figure
imagesc(background);
drawnroi = images.roi.Circle('InteractionsAllowed', 'translate','Radius',6, 'LineWidth',1.5);
draw(drawnroi);
In both cases, the first time I run it, it yields the warning, sets the Radius to the minimum, and the field 'Radius' of the roi is set to zero. However, if I run it again once the object has been created, what it does is to interactively allow the radius definition. (while in the permisions I only allow for moving it!).
Does anyone know what am I doing wrong or how can I get what I need? (thanks in advance)
댓글 수: 0
답변 (1개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!