Hi all ,
I need a way to read the (x,y,z,colors) of a 3D image .
Thanks

댓글 수: 7

Walter Roberson
Walter Roberson 2012년 6월 8일
What format is your 3D image in? For example is a volumetric slice that you are using DICOM for? Or do you mean that you have a 2D image that represents a 3D scene and you wish to calculate the 3D position of each object? Or do you have a stereo pair?
Yassmin Abdallah
Yassmin Abdallah 2012년 6월 8일
it's a slices of DICOM i use the CAT function to convert them to 3D .
Image Analyst
Image Analyst 2012년 6월 8일
So then it's a monochrome, volumetric image? Not a color volumetric image? So why can't you just do
intensity = image3D(row, column, slice)?
Yassmin Abdallah
Yassmin Abdallah 2012년 6월 8일
yes it's monochrome , i need a away to read the X of the image in a variable similarly Y , Z ,colors
Walter Roberson
Walter Roberson 2012년 6월 8일
We do not understand? Monochrome images are not usually spoken of as having "colors" ?
The X, Y, Z that you want: do you want pixel indices, or do you want them translated into space coordinates by examining the DICOM headers for the spacing information?
Yassmin Abdallah
Yassmin Abdallah 2012년 6월 8일
function [F,V,col] = MarchingCubes(x,y,z,c,iso,colors)
im = dicomread('IM-0001-0001.dcm');
im2 = dicomread('IM-0001-0012.dcm');
im3= dicomread('IM-0001-0079.dcm');
im = im2double(im); % this line to convert from uint16 to double
im2 = im2double(im2);
im3 = im2double(im3);
im = mat2gray(im); % this line to put the data in range [0,1]
im2 = mat2gray(im2);
im3 = mat2gray(im3);
);
c = cat(3,im,im2,im3 );
x
y
z
colors
this is the code i try to run ,sorry if i presented the question the wrong way :(
Image Analyst
Image Analyst 2012년 6월 8일
All that code does is to stack your slices into a volumetric gray scale image, and type out your inputs to the command window. It doesn't do anything like marching cubes.

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

 채택된 답변

Walter Roberson
Walter Roberson 2012년 6월 8일

0 개 추천

x, y, z, and colors are inputs to the MarchingCubes routine.
You should be reading the data before you call MarchingCubes.
If your x, y, and z are equally spaced then
[x, y, z] = ndgrid( 1:size(c,1), 1:size(c,2), 1:size(c,3) );

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 DICOM Format에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by