필터 지우기
필터 지우기

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

조회 수: 25 (최근 30일)
Dennis Nyanyo
Dennis Nyanyo 2015년 6월 3일
댓글: Walter Roberson 2016년 8월 24일
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
Walter Roberson
Walter Roberson 2015년 6월 3일
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 2015년 6월 8일
I have a tiff file that has multiple RGB images arranged in a Z stack using ImageJ

댓글을 달려면 로그인하십시오.

답변 (1개)

Walter Roberson
Walter Roberson 2015년 6월 8일
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
SP
SP 2016년 8월 24일
편집: SP 2016년 8월 24일
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 2016년 8월 24일
?? 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.)

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 DICOM Format에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by