Borrar filtros
Borrar filtros

How do I load a 3D image(.tiff) into a 3D plot?

32 visualizaciones (últimos 30 días)
Dennis Nyanyo
Dennis Nyanyo el 3 de Jun. de 2015
Comentada: Walter Roberson el 24 de Ag. de 2016
I'm a new MATLAB user and I'm trying to load a 3d image(.tiff) into a 3d plot and be able to generate different projections in different planes. Can anyone recommend sample commands that would be useful or even how to go about this? Thanks
  2 comentarios
Walter Roberson
Walter Roberson el 3 de Jun. de 2015
Do you mean that you have a TIFF that has Samples Per Pixel set to 3 times the number of color planes and the ExtraSamples is set to Unspecified Data for each sample beyond the usual 3?
Or do you mean that you have a TIFF file that has multiple IFD (file directories entries), each specifying an RGB image, and there is some kind of explicit or implicit Z stacking order for them?
3D images are usually saved in DICOM format, not in TIFF format.
Dennis Nyanyo
Dennis Nyanyo el 8 de Jun. de 2015
I have a tiff file that has multiple RGB images arranged in a Z stack using ImageJ

Iniciar sesión para comentar.

Respuestas (1)

Walter Roberson
Walter Roberson el 8 de Jun. de 2015
Basically, open the TIFF file, use the read() method to get the current image, use nextDirectory to position to the second image, read() its contents, and so on. Use lastDirectory to determine whether you have reached the end of the series.
  2 comentarios
SP
SP el 24 de Ag. de 2016
Editada: SP el 24 de Ag. de 2016
Hello Walter, You are correct that DICOM is one of the standard formats for viewing such images. I used the methods you mentioned and DICOM library in MATLAB to convert my TIFF image stack into DICOM. However, I am still unable to view the DICOM in 3D in MATLAB-2015. How should I go about viewing this DICOM (X in the code below)?
% DICOM Example Script
clear all; close all; clc
% Read all Tiff images
obj = Tiff('Mouse1-Day1.tiff','r');
i = 1;
while 1
subimage = obj.read();
subimages(:,:,:,i) = subimage(:,:,1:3);
if (obj.lastDirectory())
break;
end
obj.nextDirectory()
i = i+1;
end
dicomwrite( subimages, 'output_image.dcm');
dicomanon('output_image.dcm', 'output_anon.dcm');
X = dicomread('output_image.dcm');
Walter Roberson
Walter Roberson el 24 de Ag. de 2016
?? DICOM is not a standard for viewing images. DICOM is a multipart standard for storing images, transmitting images, and various other things, but not for viewing them. There is no advantage to converting the TIFF images to DICOM for viewing in MATLAB (though it could potentially be a useful step for third-party DICOM volume visualizers, some of which are quite good.)

Iniciar sesión para comentar.

Categorías

Más información sobre DICOM Format en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by