# Creates Cylinder in Center of a segment for volume calculation

**URL:** <https://discourse.slicer.org/t/creates-cylinder-in-center-of-a-segment-for-volume-calculation/10194>\
**Category:** Support\
**Created:** [February 10, 2020, 8:09pm UTC](https://discourse.slicer.org/t/creates-cylinder-in-center-of-a-segment-for-volume-calculation/10194 "2020-02-10T20:09:00Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Juicy](https://avatars.discourse-cdn.com/v4/letter/j/74df32/32.png) [@Juicy](https://discourse.slicer.org/u/Juicy)\
**Post date:** [February 11, 2020, 8:12pm UTC](https://discourse.slicer.org/t/creates-cylinder-in-center-of-a-segment-for-volume-calculation/10194/2 "2020-02-11T20:12:13Z")

</div>

I cant really comment on the validity of growing the segment vs placing a cylinder around the segment as I dont know the project.

Looks like there are some great [new features](https://discourse.slicer.org/t/new-segment-statistics-oriented-bounding-box-diameter-and-more/10203) in Segment Statistics. You could find the centroid of the segment, place a cylinder model at the centroid and then align it with the principal axes of the segment (also found with segment statistics).

You could probably write a script which calls the logic of segment statistics to find centroid and principal axes and then places a vtk cylinder at the centroid and aligns it using a transform or perhaps you can specify angle on placement from the cration options for a vtk cylinder?

---

_[View the full topic](https://discourse.slicer.org/t/creates-cylinder-in-center-of-a-segment-for-volume-calculation/10194)._
