Recover 2d curve from 2d slices

Hi,
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.

https://www.slicer.org/wiki/Documentation/Nightly/ScriptRepository#Get_the_values_of_all_voxels_for_a_label_value

1 Like

Thank you very much for the answer