I am using R2014a release. The script stopped reading dicom files and gives error message: undefined function dicomparse in reading 'char'
Show older comments
I am using R2014a release. The script stopped reading dicom files and gives error message: undefined function dicomparse in reading 'char' I will apprefciate help in fixing the issue. It was working fine until last night and did not make any changes.. Thanks.
3 Comments
Rajendra
on 20 Dec 2014
John
on 20 Dec 2014
Can you give us some more information Which command exactly is failing? Dicomread()? Could you show us the exact script that's failing?
If you are using dicomread() try the following example use of the command from the MATLAB documentation on dicomread() to see if it is working:
[X, map] = dicomread('US-PAL-8-10x-echo.dcm'); %Uses dicomparse
It would be better if you could: 1. open the script for the function you are using that eventually calls dicomparse and set a breakpoint at that line in the editor. In dicomread() for example:
edit dicomread
Then set a breakpoint at line 180 (in 2014a this is where dicomread calls dicomparse
Then run whatever code you used that called dicomread() or any other function that calls dicomparse. The debugger should break at the line that calls dicomparse(). Then go to the console and type in :
fileDetails
and give us the screen dump. I think there is very little other way to figure out what's going wrong because dicomparse is a compiled function that MATLAB uses privately.
Rajendra
on 20 Dec 2014
Answers (2)
Image Analyst
on 20 Dec 2014
Edited: Image Analyst
on 20 Dec 2014
Do "which", like this:
>> which -all dicomparse
C:\Program Files\MATLAB\R2014b\toolbox\images\iptformats\private\dicomparse.mexw64 % Private to iptformats
Do you see that? If not, type "ver" and see what toolboxes you have installed. Or, run this code:
% Check that user has the Image Processing Toolbox installed.
hasIPT = license('test', 'image_toolbox');
if ~hasIPT
% User does not have the toolbox installed.
message = sprintf('Sorry, but you do not seem to have the Image Processing Toolbox.\nDo you want to try to continue anyway?');
reply = questdlg(message, 'Toolbox missing', 'Yes', 'No', 'Yes');
if strcmpi(reply, 'No')
% User said No, so exit.
return;
end
end
4 Comments
Star Strider
on 20 Dec 2014
... and if all else fails, this is worth a go:
restoredefaultpath
rehash toolboxcache
Rajendra
on 20 Dec 2014
Image Analyst
on 20 Dec 2014
Well somehow it vanishes by the time you get to that line of code. Use the debugger and step into the functions and keep using "which" until you find where you get to the line of code when it causes it to say "undefined function dicomparse in reading 'char'"
Rajendra
on 20 Dec 2014
Nancy
on 20 Dec 2014
0 votes
This may sound silly, but if it was working last night, and isn't now but you haven't changed anything, have you tried closing and restarting MATLAB, or even closing everything and restarting your PC? I have had a couple of "errors" go away when I did that in situations like yours.
Categories
Find more on Environment and Settings 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!