[vtkusers] Draw point-cloud

Thomas Obenaus thomaso at eas.iis.fraunhofer.de
Fri Sep 4 05:00:51 EDT 2009


Thank you, it works fine!
Do you know if there is a possibility to adjust the size of the points like
using GL_POINT_SIZE in OpenGL?

Thanks,
Thomas.


SureshJ wrote:
> 
> 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
>>
> 
> _______________________________________________
> 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
> 
> 

-- 
View this message in context: http://www.nabble.com/Draw-point-cloud-tp25270914p25290691.html
Sent from the VTK - Users mailing list archive at Nabble.com.




More information about the vtkusers mailing list