# Maximal distance control in CrossSectionAnalysis module

**URL:** <https://discourse.slicer.org/t/maximal-distance-control-in-crosssectionanalysis-module/43900>\
**Category:** Support\
**Tags:** python\
**Created:** [July 30, 2025, 8:27am UTC](https://discourse.slicer.org/t/maximal-distance-control-in-crosssectionanalysis-module/43900 "2025-07-30T08:27:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![SANTIAGO\_PENDON\_MING](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/santiago_pendon_ming/32/66060_2.png) [@SANTIAGO\_PENDON\_MING](https://discourse.slicer.org/u/SANTIAGO_PENDON_MING)\
**Post date:** [July 30, 2025, 8:27am UTC](https://discourse.slicer.org/t/maximal-distance-control-in-crosssectionanalysis-module/43900/1 "2025-07-30T08:27:46Z")

</div>

Hi to everyone!

Today, working with the module CrossSectionAnalysis I found a particular behavior that maybe causes some troubles.

 ![Captura de pantalla 2025-07-30 101157](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/6/b/6b9bab587f190e50f35b0dab89a4d8b1fcda493f.png)

The point in the box generates his CS area so far away, when it’s also obvious that this point is outside the geometry. As far as I understand about CSA module, the function will try to select the section closer to the point in case than more than one section intersects with the plane. But in this case only one section is computed, so the result here says that the vessel has a fake CS area.

My point of view: There is a way to limit/control the distance of selection CS, in order to avoid CS that are so far away the point where we are computing? For example, in the image, select only CS areas that are closer than the blue circle (radius = 5mm)

Thanks a lot!

---

<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:** [July 30, 2025, 9:51am UTC](https://discourse.slicer.org/t/maximal-distance-control-in-crosssectionanalysis-module/43900/2 "2025-07-30T09:51:57Z")

</div>

> [@SANTIAGO\_PENDON\_MING](#):
>
> The point in the box

But the point in the box is clearly outside of the segment. It’s this input that should be fixed. In general, If algorithms/workflows start accounting for corner conditions, there’ll be no end to their updates. CSA is indeed behaving as expected in this case too.

> [@SANTIAGO\_PENDON\_MING](#):
>
> There is a way to limit/control the distance of selection CS

Not really, because the surface is cut by vtkCutter which has as input an _infinite_ plane. I was looking for a way to limit that too but did not find one. Even if there is such a way, it would be hard to define this limit for automation.
