[vtkusers] scalars representation
amr Ismail abdel
amr_191098 at yahoo.de
Thu Feb 22 02:21:49 EST 2007
Hello,
I have a dataset that consists of XYZ point coordinates and one
scalar at each point. I want to display the points with the scalars value for every point as individual
points, not a surface.
I can see only one pixel color to every point. I like to get the color in between the points also, my code is below. please help,
Thank you
Amr
vtkPoints* cloud1 = vtkPoints::New(); // points
vtkDoubleArray *Gauss2= vtkDoubleArray::New(); //scalars
vtkPolyData *polyData1=vtkPolyData ::New(); //polyData
polyData1->SetPoints(cloud1);
polyData1->GetPointData()->SetScalars(Gauss2);
polyData1->Update();
vtkLookupTable * lut = vtkLookupTable::New();
vtkMaskPoints *maskPoints1 = vtkMaskPoints::New();
maskPoints1->SetInput(polyData1);
maskPoints1->GenerateVerticesOn();
vtkPolyDataMapper *map1 = vtkPolyDataMapper::New();
map1->SetLookupTable(lut);
map1->SetInput(maskPoints1->GetOutput());
map1->ScalarVisibilityOn();
map1->SetScalarRange(-50,50);
vtkActor* actor1 = vtkActor::New();
actor1->SetMapper(map1);
___________________________________________________________
Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070222/f89df8ba/attachment.htm>
More information about the vtkusers
mailing list