What variable value should I change here?

for num_image = 1 : 1 : 313
ct1 = dicomread(sprintf('1-%03d.dcm', num_image));
ct_8 = (ct1)/16;
c9 = imresize(ct_8, 2);
ct_fin = uint8(c9);
%figure, imshow(ct_fin);
eval(['imwrite(ct_fin,''' 'test_' num2str([1+(num_image-1)]', '%03i') '.jpg'');']);
end

Antworten (1)

KSSV
KSSV am 1 Nov. 2021
Bearbeitet: KSSV am 1 Nov. 2021

0 Stimmen

for num_image = 1 : 1 : 313
ct1 = dicomread(sprintf('1-%03d.dcm', num_image));
ct_8 = (ct1)/16;
c9 = imresize(ct_8, 2);
ct_fin = uint8(c9);
%figure, imshow(ct_fin);
imgName = ['test_',num2str(1+(num_image-1)),'.jpg']
imwrite(ct_fin,imgName);
end

Kategorien

Mehr zu Startup and Shutdown finden Sie in Hilfe-Center und File Exchange

Produkte

Version

R2021a

Gefragt:

am 1 Nov. 2021

Bearbeitet:

am 1 Nov. 2021

Community Treasure Hunt

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

Start Hunting!

Translated by