# Measuring pore diameter automatically

**URL:** <https://discourse.slicer.org/t/measuring-pore-diameter-automatically/35458>\
**Category:** Support\
**Tags:** segmentation, python\
**Created:** [April 12, 2024, 1:40pm UTC](https://discourse.slicer.org/t/measuring-pore-diameter-automatically/35458 "2024-04-12T13:40:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ahmad\_alminnawi](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ahmad_alminnawi/32/66700_2.png) [@ahmad\_alminnawi](https://discourse.slicer.org/u/ahmad_alminnawi)\
**Post date:** [April 12, 2024, 1:40pm UTC](https://discourse.slicer.org/t/measuring-pore-diameter-automatically/35458/1 "2024-04-12T13:40:26Z")

</div>

Hello,

I have CT scans of porous tissues and I created segmentation for my ROI. I usually have multiple pores even if the ROI is small (as in the picture) and I want to measure the diameter of these pores.  
I saw there was a similar thing in VMTK to calculate cross-sectional area of vessels but I am not sure it is the same as what I want since here there is no “main vessel” to get its Centerline plus I don’t want to do it by hand.

I was thinking something more like random point assignment in the segmentation and growing a circle in 2D (or sphere in 3D) to reach the boundary of the segment.

Is there a way in 3dslicer to do so? can you please provide me the code for it as I don’t use the GUI.

Thanks in advance!

 ![Screenshot 2024-04-12 153158](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/2/e/2e56d2f4390ccaaecef516016f6249eafae336d5.png)
