How to add slider bar and make 'slice' figure into a GUI to scroll the slice?
2 次查看(过去 30 天)
显示 更早的评论
My question seems a repeat of this unanswered 2014 question. My goal seems very simple: Be able to scroll the slice back and forward. How do I make xslice, yslice, zslice a value changeable by a scroll bar to scroll the slices back and forward in each axis?
Code:
dose = double(squeeze(dicomread('dose.dcm')));
xslice = [100 140];
yslice = 50;
zslice = 80;
slice(dose,xslice,yslice,zslice)
colormap hsv
xlabel('x, rows')
ylabel('y, cols')
zlabel('z, frames')
I have returned to the App designer documentation and am trying to learn how to use this code in the App Designer.
I added the following code to three slider callbacks. This solution works, but does not allow me more than a single slice at a time, and there is an extraneous empty popup figure window.
xslice = event.Value;
yslice = [];
zslice = [];
dose = double(squeeze(dicomread('dose.dcm')));
slice(app.UIAxes,dose,xslice,yslice,zslice)
colormap hsv
The code is similar for the yslice and zslice callback functions.
I would provide the dose.dcm but it is 0.5 MB above the limit. I tried to attach the mlapp file but it is not an allowed file format.
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Graphics Object Properties 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!