Is there a possibility to recognize right clicks in image objects?
2 次查看(过去 30 天)
显示 更早的评论
I am trying to dispay a DICOM stack so that the user can go through the stack one by one. My problem is, I cant figure out how I get information about the user using right or left clicks, mouse wheel up and down or arrow keys. The program is supposed to pull the user input in a while loop and either increments or decrements the current_slice variable.
while 1
for current_slice = 1:slices
current_figure = imshow(squeezed_data(:,:,current_slice), [0 global_max]);
while 1
% magic happens here
break;
end
end
close all;
break;
end
I know there is the implay() function, but it does not display the slices as good as imshow() or imtool(). Unfortunately, as far as I know, imtool() has no properties I clould access while imshow() just offers 'ButtonDownFcn' what causes a leftclick callback. Since using imshow() it changes my figure properties to image properties, so I can't use the Keyboard or Mouse Controll functions. Otherwise I could use set() to get key presses etc. Is there a a possibillity to get user input or something similar?
0 个评论
回答(1 个)
Walter Roberson
2016-11-27
Unfortunately you will need to go right back to the figure callbacks.
My tests indicate that WindowButtonMotionFcn and WindowScrollWheelFcn continue to work with imshow()
2 个评论
Walter Roberson
2016-11-27
Your current_figure is an array so it thinks the handle reference is a subscript attempt.
I do not recognize what "current_figure" is intended to do?
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Image Processing Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!