[vtkusers] how to mask huge unstructuredgrid point data!

njuzg guangz at u.washington.edu
Thu Jun 11 18:17:07 EDT 2009


Hi, all:

I just wrote the following code to visualize the huge point data, i want to
improve the performance of manipulate the data(rotate, zoom,etc.). so i used
the vtkMaskPoints filter to randomly pick up portion of the huge data. 

but i cannot see nothing in the final rendering window.anyboy can help me
figure this out? thanks very much!

Guang


tkUnstructuredGrid *polyvertexgrid=vtkUnstructuredGrid::New();
	polyvertexgrid->Allocate(1,1);

polyvertexgrid->InsertNextCell(polyvertex->GetCellType(),polyvertex->GetPointIds());
	polyvertexgrid->SetPoints(points1);
	polyvertexgrid->GetPointData()->SetScalars(scalars);

vtkMaskPoints *ptmask=vtkMaskPoints::New();
	ptmask->SetInput(polyvertexgrid);
	ptmask->SetOnRatio(num/100);
	ptmask->RandomModeOn();


vtkDataSetMapper *polyvertexmapper=vtkDataSetMapper::New();
polyvertexmapper->SetInputConnection(ptmask->GetOutputPort());
	polyvertexmapper->SetScalarRange(scalars->GetRange());


-- 
View this message in context: http://www.nabble.com/how-to-mask-huge-unstructuredgrid-point-data%21-tp23989918p23989918.html
Sent from the VTK - Users mailing list archive at Nabble.com.




More information about the vtkusers mailing list