initializing vtkContourWidget with a polydata

Hello, I’m using a vtkContourWidget to allow the user to click points to define a contour. This works great as is. They can place the contour points, then edit as needed. What I’d like to do is supply an initial guess of where the contour points are, and allow the user to edit it if needed (move,insert,delete points). I can call the “Initialize” function on the vtkContourWidget with a polydata containing the points, and the initial guess shows up visually. However I haven’t been able to get it to be editable. When the user clicks anywhere, it just starts defining a new contour instead of editing the existing one (both show up visually). It doesn’t seem to matter whether I pass 0 or 1 as the “state” parameter to “Initialize”.

Any help would be appreciated, thanks!

Mike

Update: While I haven’t figured out how to get the Initialize function to work in this way, I did find a workaround. Essentially one can just add points to the representation rather than the contour widget, similar to this example: VTK/Interaction/Widgets/Testing/Cxx/TestPolyPlane.cxx at master · Kitware/VTK · GitHub