moving two roi’s together
trying to move a circle roi and a crosshair roi together. when I move the circle I can move the the crosshair by having the drawcrosshair in the addlistener callback. however the previous one remains. Is there any way to make a group from two roi’s so both are moved together?
here is what I have:
hROI = drawcircle(‘Center’,[x, y],’Radius’,radius);
l = addlistener(hROI, ‘MovingROI’, @allevents);
function allevents(src,evt)
evname = evt.EventName;
switch(evname)
case {‘MovingROI’}
roiCH = drawcrosshair(‘Position’, evt.CurrentCenter, ‘StripeColor’,’r’, InteractionsAllowed = ‘none’);
end
endtrying to move a circle roi and a crosshair roi together. when I move the circle I can move the the crosshair by having the drawcrosshair in the addlistener callback. however the previous one remains. Is there any way to make a group from two roi’s so both are moved together?
here is what I have:
hROI = drawcircle(‘Center’,[x, y],’Radius’,radius);
l = addlistener(hROI, ‘MovingROI’, @allevents);
function allevents(src,evt)
evname = evt.EventName;
switch(evname)
case {‘MovingROI’}
roiCH = drawcrosshair(‘Position’, evt.CurrentCenter, ‘StripeColor’,’r’, InteractionsAllowed = ‘none’);
end
end trying to move a circle roi and a crosshair roi together. when I move the circle I can move the the crosshair by having the drawcrosshair in the addlistener callback. however the previous one remains. Is there any way to make a group from two roi’s so both are moved together?
here is what I have:
hROI = drawcircle(‘Center’,[x, y],’Radius’,radius);
l = addlistener(hROI, ‘MovingROI’, @allevents);
function allevents(src,evt)
evname = evt.EventName;
switch(evname)
case {‘MovingROI’}
roiCH = drawcrosshair(‘Position’, evt.CurrentCenter, ‘StripeColor’,’r’, InteractionsAllowed = ‘none’);
end
end roi, addlistener MATLAB Answers — New Questions