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?

3 vues (au cours des 30 derniers jours)
for sliceIndex = 1 : size(image3d, 3)
thisSlice = image3d(:,:,sliceIndex);
filename = sprintf('Slice #%d.png', sliceIndex);
imwrite(thisSlice, filename);
end

Réponses (1)

Jan
Jan le 10 Juin 2021

Catégories

En savoir plus sur Get Started with MATLAB dans Help Center et File Exchange

Produits


Version

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by