Can't open files
3 views (last 30 days)
Show older comments
Hi,
I'm not really familiar with MATLAB, but I need it to extract some information for my project.
I'm using a code (CGITA) that aimes to open and analys medical images (DICOM).
But I'm not able to open these images as I got the following error:
Unable to perform assignment because dot indexing is not supported for variables of this type.
Error in parse_directory_for_dicom (line 97)
fileinfo.PatientName.GivenName = 'N/A';
Error in CGITA_GUI>load_Primary_btn_Callback (line 450)
[filelist fusion_filelist] = parse_directory_for_dicom(Primary_dir);
Error in gui_mainfcn (line 95)
feval(varargin{:});
Error in CGITA_GUI (line 42)
gui_mainfcn(gui_State, varargin{:});
Error in
matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)CGITA_GUI('load_Primary_btn_Callback',hObject,eventdata,guidata(hObject))
Error while evaluating UIControl Callback.
Appreciate your help.
4 Comments
mahmoud hafez
on 4 Feb 2023
This code old work and agree with old Matlab version, so, you can use an older version of MATLAB to avoid this error.
Answers (1)
Image Analyst
on 4 Feb 2023
Try changing the first few lines of the function to this
function varargout = parse_directory_for_dicom(dirname)
dirListing = dir(fullfile(dirname, '*.dcm'));
all_files_list = fullfile(dirname, {dirListing.name})
0 Comments
See Also
Categories
Find more on Convert Image Type 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!