Recover 2d curve from 2d slices

Is there any way to recover the points of 2D curve corresponding to segmented area into 2D slices as shown in figure. I want recover the coordinates of red points (red curve) surrounded the green area.

I know that in slicerRT, the labelMap is computed automatically from reconstructed surface, but how can I access to this labelMap in my code.
Thank’s in advance

Do you want just an unordered list of the coordinates or do you want something like clockwise order fitted curve (the first is easier)/

Yes, i would just recover an unordered list of the coordinates.

The points variable in this snippet would have that info.

1 Like

Thank you very much for the answer