3d image of a computed tomography
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (2)
Sven
le 7 Fév 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 commentaires
SoyLeyenda
le 9 Fév 2012
1 commentaire
Sven
le 17 Fév 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?
Voir également
Catégories
En savoir plus sur 3-D Volumetric Image Processing dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!