# perpendicular cross sectional area along centerline

**URL:** <https://discourse.slicer.org/t/perpendicular-cross-sectional-area-along-centerline/15556>\
**Category:** Support\
**Tags:** segmentation, centerlines\
**Created:** [January 16, 2021, 3:20pm UTC](https://discourse.slicer.org/t/perpendicular-cross-sectional-area-along-centerline/15556 "2021-01-16T15:20:07Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![airtech2](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/airtech2/32/9564_2.png) [@airtech2](https://discourse.slicer.org/u/airtech2)\
**Post date:** [January 16, 2021, 3:20pm UTC](https://discourse.slicer.org/t/perpendicular-cross-sectional-area-along-centerline/15556/1 "2021-01-16T15:20:07Z")

</div>

Operating system: windows  
Slicer version: 4.11  
Expected behavior:  
Actual behavior:

I need a perpendicular cross sectional area along centerline in vessel segmentation model.

I can extract centerline using VMTK extension and get diameter along centerline using centerline metrics extension.

However, I don’t know how to automatically measure the perpendicular cross sectional area’s’ along extracted centerline.

It will be very useful to determine the appropriate stent size in stenotic curved vassel.

---

<div class="post-metadata">

**Author:** ![airtech2](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/airtech2/32/9564_2.png) [@airtech2](https://discourse.slicer.org/u/airtech2)\
**Post date:** [January 16, 2021, 3:20pm UTC](https://discourse.slicer.org/t/perpendicular-cross-sectional-area-along-centerline/15556/2 "2021-01-16T15:20:33Z")

</div>

Operating system: windows  
Slicer version: 4.11  
Expected behavior:  
Actual behavior:  
I had done segmentation of vessel and extract centerline with VMTK tool kit  
With centerline metrics, i was able to get diameter of vessel along centerline  
(Radius of inscribed sphere). However, clinically, when clinicians plans to do stent insertion, we need to know cross sectional area along to centerline to determine the size of stent.  
I have trouble with calculate the cross sectional area perpendicular to center line  
Is there any way to automatically calculate perpendicular cross sectional area along centerline ?

---

<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:** [January 16, 2021, 3:23pm UTC](https://discourse.slicer.org/t/perpendicular-cross-sectional-area-along-centerline/15556/4 "2021-01-16T15:23:52Z")

</div>

You can use “Cross-section analysis” module in recent versions of SlicerVMTK (you need to install Slicer at least to the latest stable release).

---

<div class="post-metadata">

**Author:** ![chir.set](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/chir.set/32/66982_2.png) [@chir.set](https://discourse.slicer.org/u/chir.set)\
**Post date:** [January 16, 2021, 4:21pm UTC](https://discourse.slicer.org/t/perpendicular-cross-sectional-area-along-centerline/15556/5 "2021-01-16T16:21:44Z")

</div>

At a stenotic point, whether in curved or straight arterial part, the contrasted lumen’s surface area won’t be helpful to measure the vessel’s diameter. It will always be underestimated because, well, it is by definition decreased.

With the Cross-Section Analysis module, you can place a slice view at the point of interest, perpendicular to the centerline, and measure the diameter manually. Calcifications may render this unfeasible, but the diameter downstream and upstream should be useful hints. Centerline Metrics on its own can hint similarly.

---

<div class="post-metadata">

**Author:** ![chir.set](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/chir.set/32/66982_2.png) [@chir.set](https://discourse.slicer.org/u/chir.set)\
**Post date:** [January 16, 2021, 7:34pm UTC](https://discourse.slicer.org/t/perpendicular-cross-sectional-area-along-centerline/15556/6 "2021-01-16T19:34:39Z")

</div>

Unless I misunderstood :

Class vtkVmtk/ComputationalGeometry/vtkvmtkPolyDataCenterlineSections.h computes

- Area
- Min Size
- Max Size
- Shape
- Closed

for a centerline.

This file is not included anywhere, hence it does not seem to be used.

It has an interesting ::RequestData function, this is not public however.

If you can convince VMTK devs to expose these data with the 3 arrays attached to a centerline (Radius, EdgeArray, EdgePCoordArray), that would open a way to show them at every centerline point.

Good luck.

---

<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:** [January 16, 2021, 9:26pm UTC](https://discourse.slicer.org/t/perpendicular-cross-sectional-area-along-centerline/15556/7 "2021-01-16T21:26:54Z")

</div>

vtkvmtkPolyDataCenterlineSection just gives a value for each centerline section (region between two bifurcations), so it is not very useful for analyzing a single vessel branch.

> [@chir.set](#):
>
> It has an interesting ::RequestData function, this is not public however.

RequestData is never public, that is called by the VTK filter pipeline executor.

> [@chir.set](#):
>
> If you can convince VMTK devs to expose these data with the 3 arrays attached to a centerline (Radius, EdgeArray, EdgePCoordArray), that would open a way to show them at every centerline point.

Most recent Slicer versions can now store and visualize scalar arrays associated with centerlines. I’ve now updated “Extract Centerline” module in SlicerVMTK to add radius array to the curve node (it will be available for Slicer Preview Release form tomorrow). This can be used to color the centerline, but it could be also used in Cross-Section analysis module to show “Diameter” in “More” section.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/f/b/fbfed824ea95bac41e571274603e4200158f284d.png)

---

<div class="post-metadata">

**Author:** ![chir.set](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/chir.set/32/66982_2.png) [@chir.set](https://discourse.slicer.org/u/chir.set)\
**Post date:** [January 17, 2021, 8:14am UTC](https://discourse.slicer.org/t/perpendicular-cross-sectional-area-along-centerline/15556/8 "2021-01-17T08:14:29Z")

</div>

> [@lassoan](#):
>
> vtkvmtkPolyDataCenterlineSection just gives a value for each centerline section

My bad is now clarified.

> [@lassoan](#):
>
> to show “Diameter” in “More” section.

I’ll update Cross-Section Analysis module and send a PR.

---

<div class="post-metadata">

**Author:** ![chir.set](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/chir.set/32/66982_2.png) [@chir.set](https://discourse.slicer.org/u/chir.set)\
**Post date:** [January 17, 2021, 10:42am UTC](https://discourse.slicer.org/t/perpendicular-cross-sectional-area-along-centerline/15556/9 "2021-01-17T10:42:47Z")

</div>

> [@lassoan](#):
>
> Most recent Slicer versions can now store and visualize scalar arrays associated with centerlines. I’ve now updated “Extract Centerline” module in SlicerVMTK to add radius array to the curve node

I could not update Cross Section Analysis module to show diameters along a centerline markups curve in the same way as we do for a centerline model.

1. Radii are available at control points only, with arrayFromMarkupsControlPointData. They are not available at curve points, could not find a function like ‘arrayFromMarkupsCurvePointData’. Control points are fewer than curve points and reslicing is performed along curve points.

2. Available radii at control points are volatile. If the scene is saved and reloaded, arrayFromMarkupsControlPointData returns None.

More advanced coding might be necessary, its usefulness remains to be seen.

---

<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:** [January 17, 2021, 2:01pm UTC](https://discourse.slicer.org/t/perpendicular-cross-sectional-area-along-centerline/15556/10 "2021-01-17T14:01:44Z")

</div>

> [@chir.set](#):
>
> Radii are available at control points only, with arrayFromMarkupsControlPointData. They are not available at curve points, could not find a function like ‘arrayFromMarkupsCurvePointData’. Control points are fewer than curve points and reslicing is performed along curve points.

Extract centerline module creates curves with `curveNode.SetNumberOfPointsPerInterpolatingSegment(1)`, which means there is no difference between curve points and control points (if we set a higher number of curve points then markups module can interpolate between the control points to determine values at each curve point, but I’m not sure if this is exposed - we should have a `slicer.util.arrayFromMarkupsCurvePointData` helper function).

> [@chir.set](#):
>
> Available radii at control points are volatile. If the scene is saved and reloaded, arrayFromMarkupsControlPointData returns None.

This seems to be a bug in markups module.

@cpinter The issue seems to be that `InterpolateControlPointMeasurement` is disabled. We should be able to fix this (write its state into the json file) but I’m wondering if we need this at all. Could interpolation be always enabled?

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [January 18, 2021, 11:17am UTC](https://discourse.slicer.org/t/perpendicular-cross-sectional-area-along-centerline/15556/11 "2021-01-18T11:17:38Z")

</div>

I think I didn’t enable it by default for performance reasons. We can try enabling it by default and see if it becomes a problem or not.

Otherwise I can add this option to the json storage as you suggest.

---

<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:** [January 18, 2021, 3:01pm UTC](https://discourse.slicer.org/t/perpendicular-cross-sectional-area-along-centerline/15556/12 "2021-01-18T15:01:41Z")

</div>

Probably the best would be to remove this variable and always compute the array.

We can improve the performance later. Probably at some point we will need to implement a delayed update mechanism: whenever something is changed then hide measurements, scalar overlays, etc. and request a measurement update; when there are no update requests for X amount of time then perform the measurement update. If really lengthy computations emerge then we may even need to implement manual update mode.

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [January 18, 2021, 4:25pm UTC](https://discourse.slicer.org/t/perpendicular-cross-sectional-area-along-centerline/15556/13 "2021-01-18T16:25:04Z")

</div>

See PR here [ENH: Always interpolate control point measurements in markups by cpinter · Pull Request #5392 · Slicer/Slicer · GitHub](https://github.com/Slicer/Slicer/pull/5392)

---

<div class="post-metadata">

**Author:** ![joannecallow](https://avatars.discourse-cdn.com/v4/letter/j/e36b37/32.png) [@joannecallow](https://discourse.slicer.org/u/joannecallow)\
**Post date:** [June 24, 2021, 6:23pm UTC](https://discourse.slicer.org/t/perpendicular-cross-sectional-area-along-centerline/15556/14 "2021-06-24T18:23:22Z")

</div>

Hello,

I am trying to measure cross-sectional area of slices perpendicular to the centreline of a tendon that I segmented. When I go to the cross-section analysis module, all the sections are blank and I can’t see any details about the area or other measures. I will include a picture below. How can I fix this problem?  
 ![Screen Shot 2021-06-24 at 11.16.37 AM](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/b/0/b04c2b2a0023c603a4478fd28740ea45c4bcf1d6.png)

---

<div class="post-metadata">

**Author:** ![chir.set](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/chir.set/32/66982_2.png) [@chir.set](https://discourse.slicer.org/u/chir.set)\
**Post date:** [June 24, 2021, 6:41pm UTC](https://discourse.slicer.org/t/perpendicular-cross-sectional-area-along-centerline/15556/15 "2021-06-24T18:41:21Z")

</div>

> [@joannecallow](#):
>
> measure cross-sectional area of slices perpendicular to the centreline

While it’s certainly information of interest, Centerline metrics does not have any knowledge of this area. You may alternatively use ‘Curved planar reformat’ and ‘Segment cross-section area’ modules if surrounding anatomy is not important.

> [@joannecallow](#):
>
> all the sections are blank

Don’t have any clue for this one.

---

<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:** [June 24, 2021, 6:47pm UTC](https://discourse.slicer.org/t/perpendicular-cross-sectional-area-along-centerline/15556/16 "2021-06-24T18:47:41Z")

</div>

> [@chir.set](#):
>
> > [@joannecallow](#):
> >
> > all the sections are blank
> 
> Don’t have any clue for this one.

This is just a problem on macOS with the Slicer Stable Release. You can either go to menu → Edit → Application settings → Appearance and set Style → “Light Slicer”; or switch to the Slicer Preview Release, where this problem has been already fixed.

---

<div class="post-metadata">

**Author:** ![chir.set](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/chir.set/32/66982_2.png) [@chir.set](https://discourse.slicer.org/u/chir.set)\
**Post date:** [June 24, 2021, 7:02pm UTC](https://discourse.slicer.org/t/perpendicular-cross-sectional-area-along-centerline/15556/17 "2021-06-24T19:02:07Z")

</div>

> [@lassoan](#):
>
> or switch to the Slicer Preview Release

It would fix the display issue. However, SlicerExtension-VMTK is available for VTK8, while Slicer Preview Release is built on top of VTK9. So module ‘Centerline metrics’ won’t be available to @joannecallow. I hope some grant kicks in soon to help porting SlicerExtension-VMTK to VTK9.

---

<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:** [June 24, 2021, 7:05pm UTC](https://discourse.slicer.org/t/perpendicular-cross-sectional-area-along-centerline/15556/18 "2021-06-24T19:05:13Z")

</div>

You can run VMTK in Slicer Stable Release and load the scene in to Slicer Preview Release. VMTK update for VTK9 is already funded, we just need for @jcfr to be freed up (expected to happen any day now).

---

<div class="post-metadata">

**Author:** ![joannecallow](https://avatars.discourse-cdn.com/v4/letter/j/e36b37/32.png) [@joannecallow](https://discourse.slicer.org/u/joannecallow)\
**Post date:** [June 24, 2021, 7:16pm UTC](https://discourse.slicer.org/t/perpendicular-cross-sectional-area-along-centerline/15556/19 "2021-06-24T19:16:42Z")

</div>

Thanks so much. Using ‘Curved planar reformat’ and ‘Segment cross-section area’ modules seems to have worked.

---

<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:** [November 25, 2021, 3:55pm UTC](https://discourse.slicer.org/t/perpendicular-cross-sectional-area-along-centerline/15556/20 "2021-11-25T15:55:56Z")

</div>

A post was merged into an existing topic: [tangent plane to a centerline](https://discourse.slicer.org/t/tangent-plane-to-a-centerline/20778/2)

---

<div class="post-metadata">

**Author:** ![Tom](https://avatars.discourse-cdn.com/v4/letter/t/3d9bf3/32.png) [@Tom](https://discourse.slicer.org/u/Tom)\
**Post date:** [November 30, 2022, 9:24am UTC](https://discourse.slicer.org/t/perpendicular-cross-sectional-area-along-centerline/15556/21 "2022-11-30T09:24:11Z")

</div>

The VMTK ”Cross-section analysis’” can compute perpendicular cross-sectional areas along a centerline, but is it possible to extract the data for all voxels comprising a given cross-section (the numerical data)? I have a segmentation of a spiralling tube-like structure and need to compute some statistics on each cross-section along the tube. I can get the centerline control points with slicer.util.arrayFromModelPointData but I need all the data points of the corresponding cross-section, ideally of the original scalar volume that was used for the segmentation.  
Many thanks!

[Next page](https://discourse.slicer.org/t/perpendicular-cross-sectional-area-along-centerline/15556.md?page=2)
