Filter löschen
Filter löschen

Hi; Someone please help me, how to do the same code with a set of images with a loop, and save only the first slice of each image?

1 Ansicht (letzte 30 Tage)
for sliceIndex = 1 : size(image3d, 3)
thisSlice = image3d(:,:,sliceIndex);
filename = sprintf('Slice #%d.png', sliceIndex);
imwrite(thisSlice, filename);
end

Antworten (1)

Jan
Jan am 10 Jun. 2021

Kategorien

Mehr zu Convert Image Type finden Sie in Help Center und File Exchange

Produkte


Version

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by