How to calculate the volume of objects in millimeter cube?

243 views Asked by At

I have two methods for calculating the volume of objects in a millimeter cube; please tell me which of them is correct or any other method for volume calculation.

%first method
[xx,yy,zz]=size(bw);%dicom images with x=320,y=270,z=28
mmm = voxel_count*(xx*yy*zz);

or

%second method 
vol_liters = voxel_count*prod(voxel_size)/1e6;% calculating in liters 
mmm = vol_liters*1000000;%   1 liter = 1000000 mm3
1

There are 1 answers

1
Daniel On

Volume depends on the geometric shape (ie sphere : 4/3.π.r³)

if rectangle paralelepipede and sizes in milimeters yes, x * y * z gives you the volume mm3 (= mm * mm * mm)