<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p>Hi,<br>
<br>
</p>
<div>i would like to color and scale some glyphs.<br>
<br>
I am using the following code to draw and scale the glyphs:<br>
<br>
<div><i>vtkSmartPointer<vtkPoints> points = vtkSmartPointer<vtkPoints>::New();<br>
vtkSmartPointer<vtkFloatArray> scales = vtkSmartPointer<vtkFloatArray>::New();<br>
scales->SetName("radius");</i></div>
<i><br>
for(int i = 0; i < 100; i++)</i></div>
<div><i>{</i></div>
<div>
<div><i>    points->InsertNextPoint(x-pos, y-pos, z-pos);<br>
    scales->InsertNextValue(radius);</i></div>
</div>
<div><i>}</i><i><br>
</i></div>
<i><br>
</i>
<div><i>vtkSmartPointer<vtkPolyData> polydata = vtkSmartPointer<vtkPolyData>::New();<br>
polydata->SetPoints(points);<br>
polydata->GetPointData()->SetScalars(scales);<br>
<br>
// Glyph<br>
<span>vtkSmartPointer<vtkSphereSource> sphereSource = vtkSmartPointer<vtkSphereSource>::New();</span><br>
vtkSmartPointer<vtkGlyph3D> glyph = vtkSmartPointer<vtkGlyph3D>::New();<br>
<span>glyph</span>->SetSourceConnection(sphereSource->GetOutputPort());<br>
<span>glyph</span>->SetInputData(scBalls_polydata);<br>
<span>glyph</span>->Update();<br>
// Mapper<br>
vtkSmartPointer<vtkPolyDataMapper> mapper  = vtkSmartPointer<vtkPolyDataMapper>::New();<br>
mapper->SetInputConnection(scBalls_glyph3D->GetOutputPort());<br>
// Actor<br>
vtkSmartPointer<vtkActor> actor = vtkSmartPointer<vtkActor>::New();<br>
actor->SetMapper(actor);<br>
renderer->AddActor(actor);</i><b><i></i></b><i><b></b></i></div>
<br>
I don't know how to color AND scale the glyphs individually.  I would like to set<br>
any RGB color in the for loop.<br>
<br>
Thank you very much!<br>
<p></p>
</div>
</body>
</html>