Assume i have a 3D matrix with dimesions 32x32x500.
How can i convert this matrix into 500 tif images with dimensions 32x32?

 Respuesta aceptada

DGM
DGM el 23 de Mzo. de 2021
Editada: DGM el 23 de Mzo. de 2021
I'm sure somebody has volumetric import/export tools to do this, but this is a basic approach:
numpages=size(inpict,3);
for p=1:numpages
imwrite(inpict(:,:,p),sprintf('image_slice_%03d.tiff',p))
end
This will give each filename a zero-padded number. Consider adding a destination directory to the specified path, otherwise everything is dumped into the current working directory.

Más respuestas (0)

Categorías

Más información sobre Convert Image Type en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 23 de Mzo. de 2021

Editada:

DGM
el 23 de Mzo. de 2021

Community Treasure Hunt

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

Start Hunting!

Translated by