Obtaining the curve of intersection between two polydata

Hello everyone,
Is there a function in VTK that could determine the curve of intersection between two polydatas?

I’d also like to obtain the points that lie in the curve(indicated by the red color in the figure below). Is it somehow possible?

1024px-Is-spherecyl5-s.svg

Slicer is based on VTK and all VTK features are available for Slicer modules and in the Python console. VTK compute intersection of surfaces, for example using vtkCutter. The cutting surface must be represented as an implicit surface, which a sphere or cylinder already is. If you want to cut with a surface defined by a surface mesh then you can probably convert it to an implicit function - check out the VTK textbook and VTK examples, and if you cannot figure it out then ask on the VTK forum.