Unable to perform assignment
Afficher commentaires plus anciens
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 commentaire
Eisa Alyaqoub
le 28 Fév 2020
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Lighting, Transparency, and Shading dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!