How to read multiple dicom image files from a folder ? This is the code. I am trying to calculate psnr and store it in excel, but i am getting blank sheet. Thanks in advance

1 vue (au cours des 30 derniers jours)
clc;
clear all;
img_folder = 'C:\Users\COMSOL\Documents\MATLAB\2XXX00';
dicomlist = dir(fullfile(img_folder,'Images','*.dcm'));
a = zeros(100, 'int8');
for I = 1 : numel(dicomlist)
f = dicomread(fullfile(img_folder,'Images',dicomlist(cnt).name));
gray = rgb2gray(f);
M = medfilt2(gray, [3,3]);
nr = psnr(gray,M);
a(1i,:) = nr;
end
xlswrite('psnr.xlsx',a);

Réponses (0)

Catégories

En savoir plus sur DICOM Format dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by