How to read and display first frame of 90 Dicom images and select one from the displayed frames for further processing?

 Accepted Answer

Did you try dicomread()?

4 Comments

In readdata.m file all the images read using : RGB1=dicomread('filename1'); RGB2=dicomread('filename2'); for all 90 dicom images. I want coding for displaying first frame of each 90 images and select or discard the image for further processing.my following coding is well for single selection.
close all; clear all; [filename,pathname]=uigetfile( ... {'*.m;*.fig;*.mat;*.mdl','MATLAB Files (*.m,*.fig,*.mat,*.mdl)'; '*.m', 'Code files (*.m)'; ... '*.fig','Figures (*.fig)'; ... '*.mat','MAT-files (*.mat)'; ... '*.mdl','Models (*.mdl)'; ... '*.*', 'All Files (*.*)'}, ... 'Pick a file','Select Files(s)','multiselect','on');
if isequal(filename,0) disp('User selected Cancel') else disp(['User selected', fullfile(filename, pathname)]) end filename = cellstr(filename); % RESULT=[]; for x = 1 : length(filename) RGB = dicomread( fullfile(pathname, filename{x}) ); % RESULT= main(img); % figure, imshow(img); end
ERROR MESSAGE FOR MULTIPLE SELECTION:
Undefined function 'eq' for input arguments of type 'cell'.
Error in fullfile (line 37) if (f(end)==fs) && (part(1)==fs),
That's not a user friendly way. I suggest you have them in a listbox and allow the user to select them via a listbox, like shown in this app: http://www.mathworks.com/matlabcentral/fileexchange/24224
yes, this is what i want.I downloaded this function and opened in MATLAB editor,but not able to run the above function.How to call/run this function????
Your code worked for me, but if it doesn't for you, you can try rid of this unnecessary line:
filename = cellstr(filename);

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!