Calculating area surface

Hi all,

I created a 3D volume by stacking histological slices and I’m trying to calculate the area of different organs within the sample. I have created a segment outlining one of the organs but the surface value that I get is incredibly large as seen in the picture. The dimensions of the sample are 15mm long, 1mm tall and each slice is 7um thick (85 slices total). However I don’t know where to input these data to calibrate the surface area calculation. Any tips are appreciated.

Screenshot

You can enter the pixel spacing in the Volumes module (or load with ImageStacks)

https://slicer.readthedocs.io/en/latest/user_guide/modules/volumes.html#load-a-series-of-png-jpeg-or-tiff-images-as-volume

What is the pixel to mm relation? Is 1 pixel 1 mm?

That depends on how the images were acquired. If they came from a calibrated device like a pathology whole slide imaging scanner then the values would be in the header and you need to use some tool to extract them. Otherwise maybe there’s a reference structure (ruler) in the image that you can use to calculate.

1 Like

What I found in the files is:

Scaling (per pixel): 0.220m x 0.22um

Would that mean that 1 pixel = 0.22um?

Thank you for all your help!

That’s almost surely not correct notation, since it indicates meters by micrometers (very anisotropic). Most likely it means .22 millimeters but I would suggest you do more research before relying on it.

Apologies that was a typo, I meant 0.220um x 0.220um

I tried using those values and, although I cannot see the 3D render since it’s so small, I can still see the segments in the green and yellow windows and the resulting area was 0.33 mm2 which I believe is more reasonable. Thank you again.

Sorry to bump this up again @pieper . I double checked the numbers and the calculation still doesn’t seem right. The original data in the slice files is in the picture below, however when I extracted the images I reduced them to 10% of the original size due to the large files, and edited them on Photoshop to remove the messy background (but without changing anything else). I still don’t know how to properly set the image size, the default values are all 1mm but when I change them to either the pixel data (0.220um) or the size of the sample (15 mm long, 1 mm tall, 0.007 mm thick per slice (or 0,595 mm total since there are 85 slices), the 3D volume either disappears because of the small size or it creates a weird shape. Does anyone have any more tips? Thanks in advance

Also maybe worth noting, when I create the 3D volume I leave the default values on the Image Spacing section for the X and Y (1 mm) but change the Z since otherwise the reconstruction is too thin. I have found that setting the Z value to a value between 5 and 10 mm recovers a better shape but I’m not sure what would be the appropriate value with the settings I mentioned. The width should be 0,595 mm but if I use that number while leaving X and Y as 1 mm it just makes the object even thinner. And again, changing it to either 15mm/1mm/0.595mm or 0.00022/0.00022/0.007 recovers wrong shapes.

1ce18205bb323e50826384fc8573c3e2
a410788b0965123424d89417c8df9fa6

Since Slicer uses mm as the default unit, something that really is .22um pixel spacing can run into numerical issues (multiplying two very small numbers can lose precision). A common workaround is to pretend that um are mm and then convert the final measurements back to um.

Custom unit support is partially implemented (see Fix custom unit management · Issue #5040 · Slicer/Slicer · GitHub for details). For example you can select length unit to micrometer in the application settings and it is used in Markups measurements, but it is barely used anywhere else yet. If you often work with microscopy images and figure out a quantification workflow that you want to use then we can probably add unit support for those tools.