Unable to perform assignment
Ältere Kommentare anzeigen
Hello Helpers,
I am not seeing the error that I have. Could any one please help.
close all;
clc;
% locate the file
my_path = uigetdir();
files = dir(fullfile(my_path, '*.dcm'));
f_names = {files.name};
info = dicominfo(fullfile(my_path, f_names{1}));
%% read all slices and write them to 3D matrix
ct_scans = zeros(512, 512, length(f_names)); % here where I got the error
for scan = 1:length(f_names)
slices = fullfile(my_path, f_names{scan});
ct_scans(:,:,scan) = uint16(dicomread(slices));
end
The eroor:
Unable to perform assignment because the size of the left side is 512-by-512 and the size of the right side is
917-by-888.
I tride to change the inizilation, but still get the same error
ct_scans = zeros(917, 888, length(f_names));
The error:
Unable to perform assignment because the size of the left side is 917-by-888 and the size of the right side is
512-by-512.
1 Kommentar
Eisa Alyaqoub
am 28 Feb. 2020
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Image Processing Toolbox finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!