[vtkusers] Draw point-cloud
Suresh Joshi
Suresh.Joshi at insa-lyon.fr
Thu Sep 3 04:14:17 EDT 2009
Hey Thomas, in the past I've done something like this and its worked out
quite nicely for making large point clouds:
vtkPoints* pts = vtkPoints::New();
vtkCellArray* conn = vtkCellArray::New();
vtkPolyData* poly = vtkPolyData::New();
for (int i = 0; i < ptrToData->GetNumberOfTuples(); i++)
pts->InsertNextPoint(ptrToData->GetComponent(i, 0),
ptrToData->GetComponent(i, 1), ptrToData->GetComponent(i, 2));
for (int i = 0; i < pts->GetNumberOfPoints(); i++)
conn->InsertNextCell(1, &i);
poly->SetPoints(pts);
poly->SetVerts(conn);
vtkPolyDataMapper* pmap = vtkPolyDataMapper::New();
pmap->SetInput(poly);
Cheers,
-SJ
On Thu, Sep 3, 2009 at 9:14 AM, Thomas Obenaus <
thomaso at eas.iis.fraunhofer.de> wrote:
>
> Hello,
>
> I have to visualize a point-cloud whose number of points varies from 10 to
> 20000. At the Moment I use a sphere with low resolution for each point but
> the result is not satisfying (bad performance or ugly points). Is there a
> possibillity to draw points in VTK like using GL_POINTS in OpenGL?
>
> Thanks,
> Thomas.
> --
> View this message in context:
> http://www.nabble.com/Draw-point-cloud-tp25270914p25270914.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090903/d832b572/attachment.htm>
More information about the vtkusers
mailing list