Unable to perform assignment
Show older comments
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 Comment
Eisa Alyaqoub
on 28 Feb 2020
Accepted Answer
More Answers (0)
Categories
Find more on Image Processing Toolbox 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!