Saving 3D image
Mostrar comentarios más antiguos
Hi,
I have a series of CT image slices that I've uploaded into MATLAB and are stacked in one variable. How do I save it out as a 3D image?
Respuestas (2)
Sean de Wolski
el 7 de Dic. de 2011
Does it need to be accessible from another program?
doc save
I would just use save and save it as a matfile. If it has to be readable from another program (or someone without MATLAB) use fopen/fwrite
doc fopen
doc fwrite
11 comentarios
Ka Zhang
el 7 de Dic. de 2011
Sean de Wolski
el 7 de Dic. de 2011
fopen/fwrite will write it to binary. What format does elastix require? You're going to have to write to that format if elastix doesn't except raw binary.
Ka Zhang
el 12 de Dic. de 2011
Walter Roberson
el 12 de Dic. de 2011
DICOM could do that for sure, in a format that elastix would be likely to understand.
The TIFF format does allow multiple images per file, but you would have to know exactly how elastix wanted the images named (or numbered)... and considering that JPEG and PNG and BMP files cannot handle multiple images per file, I would think it likely that elastix is not designed to look for the possibility of all of the slices being stored in the one TIFF file.
Ka Zhang
el 12 de Dic. de 2011
Sean de Wolski
el 12 de Dic. de 2011
How are you calling dicomwrite and what are the _full_ error messages?
Ka Zhang
el 12 de Dic. de 2011
Sean de Wolski
el 12 de Dic. de 2011
You're calling dicomwrite with 'images' which is a 1x6 string (typo, probably).
dicomwrite(images,'027_3D.dcm');
Ka Zhang
el 12 de Dic. de 2011
Sean de Wolski
el 12 de Dic. de 2011
what does
whos images
return?
Ka Zhang
el 12 de Dic. de 2011
Walter Roberson
el 12 de Dic. de 2011
0 votos
1 comentario
Ka Zhang
el 12 de Dic. de 2011
Categorías
Más información sobre Convert Image Type en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!