[vtkusers] vtkPolyData to Qt
Anja Ende
anja.ende at googlemail.com
Mon Nov 13 06:56:05 EST 2006
Hi again,
My application is using Qt to render splines and curves on top of the vtk
window. I am using vtkParametricSpline and vtkParametricFunctionSource
classes to generate splines. When rendering with vtk the vtkPolyDataMapper
does all the rendering, I guess. Now, my question is how I can convert the
output (vtkPolyData) to polygon or line values that I can use with
QPainterPath in Qt.
The code to generate the output is simple. It is:
vtkParametricSpline * spline =vtkParametricSpline::New();
spline->SetPoints(inputPoints);
spline->ClosedOff();
vtkParametricFunctionSource * splineSource =
vtkParametricFunctionSource::New();
splineSource->SetParametricFunction(spline);
splineSource->Update();
// How to convert data as to use with Qt
vtkPolyData * data = splineSource->GetOutput();
Now, how can I convert this data array to Qt compatible array or points...
Would really appreciate some help here.
Anja
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20061113/5f4ea5c5/attachment.htm>
More information about the vtkusers
mailing list