# vmtkcenterlinesections doesn't work sometime

**URL:** <https://discourse.slicer.org/t/vmtkcenterlinesections-doesnt-work-sometime/18729>\
**Category:** VMTK\
**Created:** [July 14, 2021, 12:48pm UTC](https://discourse.slicer.org/t/vmtkcenterlinesections-doesnt-work-sometime/18729 "2021-07-14T12:48:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dongwei](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/dongwei/32/11616_2.png) [@Dongwei](https://discourse.slicer.org/u/Dongwei)\
**Post date:** [July 14, 2021, 12:48pm UTC](https://discourse.slicer.org/t/vmtkcenterlinesections-doesnt-work-sometime/18729/1 "2021-07-14T12:48:50Z")

</div>

Hi,

I am using vmtkcenterlinesections to calculate the cross-sectional area of my vessel. But sometimes the function brokes for certain vessel geometry… It says ‘executing vmtkcenterlinesections’, then directly exit without returning anything. I increase vmtkcenterlineresampling parameter from 1 to, for example, to 3. Then it works. However, this may cause to miss the minimum cross-sectional area due to the too sparse sampling on the centerline. Does anyone has any idea to solve the situation? Like, could it be the roughness of the surface that broke the function? (Cause mine vessel wall is pretty bumpy)  
Thank you!

---

<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:** [September 3, 2021, 1:45am UTC](https://discourse.slicer.org/t/vmtkcenterlinesections-doesnt-work-sometime/18729/2 "2021-09-03T01:45:48Z")

</div>

> [@Dongwei](#):
>
> Like, could it be the roughness of the surface that broke the function?

Absolutely. If the vessel polydata quality is bad then anything can happen. All computational geometry algorithms are inherently unstable, so if you provide bad input then anything can happen.

Could you share (upload somewhere and post the link) your problematic mesh files? Or at least post a few screenshots?

---

<div class="post-metadata">

**Author:** ![junqiangchen](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/junqiangchen/32/11541_2.png) [@junqiangchen](https://discourse.slicer.org/u/junqiangchen)\
**Post date:** [October 21, 2021, 7:52am UTC](https://discourse.slicer.org/t/vmtkcenterlinesections-doesnt-work-sometime/18729/3 "2021-10-21T07:52:37Z")

</div>

i have same the problem,maybe there should modify the centerlinesections source code,and add abnormal process code in order to the program exit directly.

---

<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:** [October 22, 2021, 5:56am UTC](https://discourse.slicer.org/t/vmtkcenterlinesections-doesnt-work-sometime/18729/4 "2021-10-22T05:56:41Z")

</div>

Please provide an example file and information about your environment (Slicer version, operating system).
