3d image of a computed tomography
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
I have many shots from a computed tomography. I have used the matlab patch function to plot a 3d image. Here is the code:
data = smooth3(data);
p = patch(isosurface(data),'FaceColor','yellow', 'EdgeColor', 'none');
isonormals(data,p)
view(3); axis vis3d tight
camlight; lighting phong
There is a spacing of 2mm between each plane of the tomography. The spacing of x and y axis is 1mm. I think the voxel must be rectangular. How can i do it?
0 Kommentare
Antworten (2)
Sven
am 7 Feb. 2012
The isosurface function can take in an x, y and z vector specifying the location of each voxel. So try this:
xVec = 1:size(data,2); % "X" is the 2nd dimension of the matrix
yVec = 1:size(data,1); % "Y" is the 1st dimension
zVec = (1:size(data,3))*2; % Multiply by 2 for 2mm spacing
p = patch(isosurface(xVec,yVec,zVec,data),'FaceColor','yellow', 'EdgeColor', 'none');
Does this work for you?
You may also have your exact X, Y, and Z spacing defined in mm, embedded in the .PixelSpacing (for x,y) and .ImagePositionPatient (for each slice of z) fields of the original DICOM files.
0 Kommentare
SoyLeyenda
am 9 Feb. 2012
1 Kommentar
Sven
am 17 Feb. 2012
As long as your actual pixel (well, "voxel", because it's 3d) dimensions are true to the original voxel space, then I'm afraid that you didn't _lose_ precision at all... it's just that your Z precision was *always* lower than your X-Y-precision. Is the question answered or are there still any issues you're having?
Siehe auch
Kategorien
Mehr zu 3-D Volumetric Image Processing finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!