Alter number of points which makes up VTK curve

Hello,

Is there some way to take an existing Slicer VTK curve node, say it is defined by 4 initial points I have placed, and increase the number of points along the curve to be a number such as 100, such that the curve shape remains the same, but now there are 100 points defining the shape?

If there is no built-in VTK method for such functionalities, is there a method by which I could find the curve equation and then add points manually along the curve?

Thank you!

Resample curves within the Markups tool does exactly that. Perhaps @smrolfe can point out to the specific code.

1 Like

Yes, you can find the code to do this, with the option to constrain to a surface,
in the onApplyCurveResamplingPushButton call back here:

1 Like

@muratmaga @smrolfe Thank you for the help!