From: Varun on
Hi there,

I am making a matlab gui with dicom images. I am stuck on the problem where I need to display multiple dicom images in a single Axes i.e. multiple images loaded as frames and can be viewed as a slideshow. Like a 'Next' n 'Previous' push buttons or image changing using a the scroller on the mouse.
I have tried implay but it does not integrate with the gui and opens in a separate window.

Can anyone help with this ?

Thanks you.

Regards

From: Paul on
"Varun " <var3161(a)yahoo.co.in> wrote in message <ht0bac$nh8$1(a)fred.mathworks.com>...
> Hi there,
>
> I am making a matlab gui with dicom images. I am stuck on the problem where I need to display multiple dicom images in a single Axes i.e. multiple images loaded as frames and can be viewed as a slideshow. Like a 'Next' n 'Previous' push buttons or image changing using a the scroller on the mouse.
> I have tried implay but it does not integrate with the gui and opens in a separate window.
>
> Can anyone help with this ?
>
> Thanks you.
>
> Regards
>

Hi,

Create a blank GUI and add Axes (you can find them in the right toolbar).
Select these Axes (it is not necessary if you have only one) and use the image() function. Probably you will also need the colormap() function for defining the color range.

For making a slide-show you have to add two buttons, and for Previous button use image(frame(n-1)) and for next image(frame(n+1)).

Paul
From: Varun on
> Hi,
>
> Create a blank GUI and add Axes (you can find them in the right toolbar).
> Select these Axes (it is not necessary if you have only one) and use the image() function. Probably you will also need the colormap() function for defining the color range.
>
> For making a slide-show you have to add two buttons, and for Previous button use image(frame(n-1)) and for next image(frame(n+1)).
>
> Paul

Hey Paul,

Thanks a lot for replying.....well, i am working on it but the problem is, I have to save the dicom image data in a 3-D matrix and then display from that....so my code looks like this actually, this is just in the OpeningFcn :

% Update handles structure
guidata(hObject, handles);
movegui(hObject,'onscreen')% To display application onscreen
movegui(hObject,'center') % To display application in the center of screen

% saving the file names in dirOutput
dirOutput = dir('*.dcm');
row = size(dirOutput,1);

% creating a 3D array with each element of the array is a single DICOM
% image and then displaying the images as a movie
for i = 1:row
info = dicominfo(dirOutput(i).name);
dicom_images(:,:,i) = dicomread(info);
end
dicom_images = mat2gray(dicom_images);
implay(dicom_images);

for i = 1:row
info = dicominfo(dirOutput(i).name);
dicom_images(i,:,:) = dicomread(info);
end
dicom_images = mat2gray(dicom_images);

image(dicom_images(1,:,:));

Regards,
Varun
 | 
Pages: 1
Prev: hessian help!
Next: write output to excel