Hi all,<br>
<br>
I am using Qt to select some points on the screen and draw a cubic
Bezier curve through it. Now what I want to do is generate a
vtkPolyData object from the bezier path.<br>
<br>
Qt returns me the Bezier path as a set of floating point coordinates
but these coordinates are not for every pixel in the path but I guess
they represent the curve path as a polygon. <br>
<br>
What I want to do is to use this into a vtkStencil. So, my plan is to use:<br>
<br>
vtkPolyData->vtkPolyDataToImageStencil->vtkStencil (also the input image goes here).<br>
<br>
My question is how can I create the vtkPolyData object from a set of
image coordinates (I convert the display coordinates to image space. I
am guessing the algorithm works in the image space)? I am having
trouble understanding how vtkPolyData is initialized.<br>
<br>
Say I have the following data. Please assume for the moment that they are in the image space<br>
<br>
213: 208<br>
223.428: 197.666<br>
233.33: 189.453<br>
242.696: 183.232<br>
251.516: 178.875<br>
259.779: 176.252<br>
267.475: 175.234<br>
274.594: 175.693<br>
281.125: 177.5<br>
287.059: 180.525<br>
292.385: 184.641<br>
297.093: 189.717<br>
301.172: 195.625<br>
304.613: 202.236<br>
307.404: 209.422<br>
309.537: 217.053<br>
311: 225<br>
213: 208<br>
<br>
How can I create a vtkPolyData representing the polygon described by this data.<br>
<br>
Thanks for any help you might be able to give me.<br>
<br>
Anja<br>
<br>