[vtkusers] 3D PointCloud Visualization VERSUS Memory usage

Berk Geveci berk.geveci at kitware.com
Tue Jun 18 16:43:32 EDT 2002


Did you try switching to immediate mode rendering ?
Check
http://public.kitware.com/cgi-bin/vtkfaq?req=show&file=faq03.007.htp

Also, you should use
vtkPolyData::SetVerts()
not 
vtkPolyData::SetPolys()

You won't gain any memory but it's a better way.

-Berk

On Tue, 2002-06-18 at 18:20, Devrim AKÇA wrote:
> Hello (from an unexperienced VTK user) to all VTK users, 
> 
> I have a Point Cloud which have 3 000 000 points. Every point have  X-Y-Z 
> coordinates (float) and an intensity value (integer). How can I visualize 
> this point cloud in a afficiently manner (with using minumum MEMORY)? 
> 
> For visualization of this point cloud, I write a code (below). But when it 
> runs, it takes approximately 250MB memory from OS. But the size of my data 
> approximately 40MB. What is the meaning of this big difference? 
> 
> So, it works very very slowly. Is there another efficiently solution? 
> 
> 
> //----------------------------------------------------------
> float x[3];
> vtkIdType pts[1];
> int iPON; 
> 
> //.... 
> 
> vtkPolyData *cloud = vtkPolyData::New();
> vtkPoints *points = vtkPoints::New();
> vtkCellArray *cells = vtkCellArray::New();
> vtkIntArray *intensities = vtkintArray::New(); 
> 
> //loop started...
> 
>  points->InsertPoint(i,x);
>  cells->InsertNextCell(1,pts);
>  intensities->InsertTuple(i,iPON); 
> 
> //loop ended... 
> 
> cloud->SetPoints(points);              points->Delete();
> cloud->SetPolys(cells);                cells->Delete();
> cloud->GetPointData()->SetScalars(intensities);  intensities->Delete(); 
> 
> vtkPolyDataMapper *cloudMapper = vtkPolyDataMapper::New();
>  cloudMapper->SetInput(cloud); 
> 
> vtkActor *cloudActor = vtkActor::New();
>  cloudActor->SetMapper(cloudMapper);
>  cloudActor->GetProperty()->SetRepresentationToPoints(); 
> 
> //......
> //----------------------------------------------------------- 
> 
> My Specifications: C++Builder 5.0 + WIN2000
>                   Pentium III CPU + 128MB Memory
>                   ATI 3D RAGE PRO AGP 2X (8 MB) displayCard
> //-----------------------------------------------------------
> Is there a more efficient and more faster way to visualize this PointCloud? 
> If anybody prefer something to me I would be pleased... 
> 
> Best Regards... 
> 
>  
> 
> Ass.Res.M.Devrim AKCA
> Istanbul Technical University
> Dep. of Geodesy and Photogrammetry
> Division of Photogrammetry
> 80626-Maslak/Istanbul  TURKEY
> +90 212 2856553
> +90 533 2200022 
> _______________________________________________
> This is the private VTK discussion list. 
> Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers





More information about the vtkusers mailing list