[vtkusers] Set point color knowing its value

B. C. butterfly.1688 at yahoo.fr
Wed Oct 29 16:40:30 EDT 2008


Hi everyone.
I have a polydata. I computed its maximum curvatures and stored the values in an array.
Now, i want to do this: 
for each value in the array, if it's <0 set its color to 'red', else to 'black'
I did this:
vtkIdType nPoints = myArray->GetNumberOfComponents();
double curveValue;
for (vtkIdType i=1; i<=nPoints; i++)
{
  curveValue = myArray->GetValue(i);
  if (curveValue<0) 
   //Set the color to 'red'
  else 
   //Set the color to 'blue'
 }
 
Can someone help me to fichish the missing code?
Thank you for your help


      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20081029/4ff43a7f/attachment.htm>


More information about the vtkusers mailing list