MATLAB: Dicominfo command “.dcm not found”

image processing

I am trying to read some dicom images in .dcm extension .. Following codes i used.. I dont know what is the problem.. Till yesterday same codes worke fine
[name, pathname] = uigetfile('*.dcm', 'Select a reference DICOM file...') ;
info=dicominfo(name); % obtain the information of the dicom
Y = dicomread(info);
figure,imshow(uint8(Y)),
Once i am selecting an image i am getting following error
Error using dicominfo>getFileDetails (line 390)
File "dess_060.dcm" not found.
Error in dicominfo (line 36)
fileDetails = getFileDetails(filename);
Error in main_code1 (line 18)
info=dicominfo(name)

Best Answer

You need to specify the full path of the file returned by uigetfile to dicominfo:
info = dicominfo(fullfile(pathname, name));