Can't open files

3 views (last 30 days)
Nora A
Nora A on 9 Jul 2019
Answered: Image Analyst on 4 Feb 2023
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)
Error in CGITA_GUI (line 42)
gui_mainfcn(gui_State, varargin{:});
Error in>@(hObject,eventdata)CGITA_GUI('load_Primary_btn_Callback',hObject,eventdata,guidata(hObject))
Error while evaluating UIControl Callback.
Appreciate your help.
mahmoud hafez
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.

Sign in to comment.

Answers (1)

Image Analyst
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, {})


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!

Translated by