# Compute volume in image

**URL:** <https://discourse.slicer.org/t/compute-volume-in-image/23288>\
**Category:** Support\
**Created:** [May 5, 2022, 3:28pm UTC](https://discourse.slicer.org/t/compute-volume-in-image/23288 "2022-05-05T15:28:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Qazi](https://avatars.discourse-cdn.com/v4/letter/q/a4c791/32.png) [@Qazi](https://discourse.slicer.org/u/Qazi)\
**Post date:** [May 5, 2022, 3:28pm UTC](https://discourse.slicer.org/t/compute-volume-in-image/23288/1 "2022-05-05T15:28:46Z")

</div>

Hi @lassoan  
I have converted my dataset from 16bit to 8 bit and then used the data to calculate volume but the values (for volume) I get are quite unrealistic rather very far from being realistic. Like I expect values of ~50microlitres whereas I get 50000ml. My other colleague tried on unaltered dataset from same project and she got the values in the right range. Problem for me is that it will be a lot of work to go back and keeping the 16bit size from the raw data since I processed the raw data (scaled down) to take it to give me 3D image. I was wondering if reducing the bit size would impact on the quantification (segment statistics) in 3D slicer? If so, Is there a way to get the segment (heart ventricle) in its true shape so I get its correct quantification measurements (ventricular volume in my case) without going back to raw data?  
Many thanks,  
Qazi

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [May 5, 2022, 4:32pm UTC](https://discourse.slicer.org/t/compute-volume-in-image/23288/2 "2022-05-05T16:32:24Z")

</div>

Bit depth (storing an image on 8 or 16 bits) does not affect physical size or volume.

Have you segmented the structure that you want to measure the volume of?  
Have you or your colleague has changed units settings in application settings?  
Where your input image comes from? Is it a human cardiac CT, MRI, or US?  
Why are you considering converting your data set from 16 to 8 bits per voxel?

---

<div class="post-metadata">

**Author:** ![Qazi](https://avatars.discourse-cdn.com/v4/letter/q/a4c791/32.png) [@Qazi](https://discourse.slicer.org/u/Qazi)\
**Post date:** [May 5, 2022, 4:55pm UTC](https://discourse.slicer.org/t/compute-volume-in-image/23288/3 "2022-05-05T16:55:02Z")

</div>

Yes I segmented the volume.  
My collegaue and I didnt change any unit settings.  
My input images are axial sections datastack, just like CT scan but from episcopic microscope (after each 2 micron section, camera takes an image). Being quite bif data and heavy on Mac as well as osirix, we scale it down.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [May 5, 2022, 5:18pm UTC](https://discourse.slicer.org/t/compute-volume-in-image/23288/4 "2022-05-05T17:18:38Z")

</div>

Most likely by rescaling the image in OsiriX you ended up with a file that has undefined or incorrect pixel spacing. You can fix that when you load that into Slicer or after you loaded it into Slicer, but it is better to avoid creating such corrupted file.

For example, you can load the original image into Slicer and use `Crop volume` module to crop and resample the image. It will have correct spacing. If you load a TIFF/JPG/PNG stack then you can use [ImageStacks module of SlicerMorph extension](https://github.com/SlicerMorph/SlicerMorph/tree/master/Docs/ImageStacks) to reduce file size during import.
