How to add slider bar and make 'slice' figure into a GUI to scroll the slice?

5 views (last 30 days)
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.

Answers (0)

Categories

Find more on DICOM Format in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!