Unable to perform assignment
古いコメントを表示
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.
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Image Processing Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!