How to get output of HoughTransform2DLinesImageFilter() ?

I am trying to use Hough Lines transform on some iage with itk on python (spyder).
I used the given example here:
How to deal with HoughTransform2DLinesImageFilter GetLines() method in python - Beginner Questions - ITK
but I have the same problem. Here the code to make reading easier:
edges = sobslice #image itk.image(itk.F,2)
houghF = itk.HoughTransform2DLinesImageFilter[itk.F, itk.F].New()

DetectedLines is a “Swig object of type std::vector” from which I can’t access data. At least, I know its size (with len() or .size()) but I can’t access value with GetPoint().
Any idea ?
Thanks !

Does DetectedLines[0].GetPoints()[0] work?

Unfortunately no, I still have a ‘proxy of a swig object’ and not a value.

Does DetectedLines[0].GetPoint(0) work? DetectedLines[0] is a LineSpatialObject.

@nick did you get it working, and how?

Neither,it gives the same kind of output that .GetPoints(). I would expect an array with some coordinate, an angle and a distance as it is what the Hough transform should compute.
I read the page you linked with LineSpatialObject. The method “PrintSelf()” is not working (error), may be it coul be a way to retrieve the value ?

Maybe print(DetectedLines[0])?

Thought I already tried this one but may be I only tried “print(DetectedLines)” and “print(DetectedLines[0].GetPoints)”.
It gives something at least, some info on the object (size) plus some on the region but I don’t know which region ! I have also info on “Family Bounding Boxes of Spatial Object”. I don’t see something which looks like a couple (distance, angle).Output_printDetectedLines.txt (3.8 KB)

To get the LineSpatialObjectPoint:

point = DetectedLines[0].GetPoint(0)

This has methods: