how to compute average vertical (y-axis) distance between two curves in 3d space?

hi,

i’m trying to find the average vertical distance (along the y-axis) between two curves in 3d space.

basically, i want to measure how far apart the two curves are in the y-direction — not the full 3d distance, just the offset along the y-axis. the curves are already defined, and i’d like to compute this average y-difference between them.

is there a good way to do this, either in 3d slicer or with python/numpy?

thanks a lot! any ideas would be appreciated.

Yes, you can do this in python. Just get the points from the two curves and subtract and look at the y (axis). If you need more detail you can resample in the markups module.

>>> n = getNode("OC")
>>> arrayFromMarkupsControlPoints(n)
array([[-102.88747763,  -36.66582196,   87.48674899],
       [ -32.85996019,  -42.21678371,   87.48674899],
       [ -32.85996019, -117.36826585,   87.48674899],
       [-114.84339524, -175.86686273,   87.48674899]])
>>>