[vtkusers] How to display scalars to colors

amr Ismail abdel amr_191098 at yahoo.de
Wed Feb 21 05:42:37 EST 2007


Dear vtk users,

I have unstructured points xyz every point has a scalar value. I like to represent scalars with colors. 
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,

Thanks a lot ! 
 

 vtkPoints* cloud1      = vtkPoints::New(); 
 
 vtkDoubleArray *Gauss2=  vtkDoubleArray::New();
  

vtkPolyData *polyData1=vtkPolyData ::New();
    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/20070221/50b70cb0/attachment.htm>


More information about the vtkusers mailing list