<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2912" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2><FONT face="Times New Roman" size=3>Hello, I'm 
working on my thesis with the VTK ToolKit and i have some 
<BR>problems...<BR><BR>I want to put diffrent actors on some points of a mesh. I 
use vtkGlyph3D and <BR>set my sources in and setIndexModeToScalar();<BR>// 
CODE<BR>&nbsp; glyph-&gt;SetSource(0, spheres-&gt;GetOutput());<BR>&nbsp; 
glyph-&gt;SetSource(1, spheres-&gt;GetOutput());<BR>&nbsp; 
glyph-&gt;SetSource(2, cubes-&gt;GetOutput());<BR>&nbsp; glyph-&gt;SetSource(3, 
spheres-&gt;GetOutput());<BR>&nbsp; glyph-&gt;SetSource(4, 
cubes-&gt;GetOutput());<BR>&nbsp; glyph-&gt;SetSource(5, 
cubes-&gt;GetOutput());<BR>&nbsp; glyph-&gt;SetSource(6, 
cones-&gt;GetOutput());<BR>&nbsp; 
glyph-&gt;SetIndexModeToScalar();<BR>//<BR><BR>==&gt; The problem is that only 
for the value 0 i see a sphere, the rest of the <BR>value's are all 
cones!!!&nbsp; You can see it at the image : <BR></FONT><A href=""><FONT 
face="Times New Roman" 
size=3>http://webs.hogent.be/~023174sv/BC2.jpg</FONT></A><BR><BR><FONT 
face="Times New Roman" size=3>You can see a actor of the lookuptable where you 
can see that each value has <BR>a diffrent colour, but alle values 1 --&gt; 6 
are CONES , and only number 6 <BR>should be a cone....<BR><BR>Can anyone please 
help me ?<BR><BR>Also i have a other question, the size of the actors should fit 
to the mesh, <BR>that means that when the points are further from eachother the 
actors should <BR>be bigger when there are lot's of point laying next to 
eachother....., is it <BR>possible in any way to get the maximum distance 
between points of a <BR>unstructured grid?? Or any option to solve this 
problem<BR><BR>// HERE IS PART OF MY CODE:<BR>&nbsp;vtkConeSource * cones = 
vtkConeSource::New();<BR>&nbsp; cones-&gt;SetResolution(10);<BR>&nbsp; 
cones-&gt;SetRadius(radius);<BR>&nbsp; 
cones-&gt;SetHeight(radius*2);<BR><BR>&nbsp;vtkSphereSource *spheres = 
vtkSphereSource::New();<BR>&nbsp;&nbsp; 
spheres-&gt;SetThetaResolution(10);<BR>&nbsp;&nbsp; 
spheres-&gt;SetPhiResolution(10);<BR>&nbsp;&nbsp; 
spheres-&gt;SetRadius(radius);<BR><BR>&nbsp;vtkCubeSource * cubes = 
vtkCubeSource::New();<BR>&nbsp; cubes-&gt;SetXLength(radius);<BR>&nbsp; 
cubes-&gt;SetYLength(radius);<BR>&nbsp; cubes-&gt;SetZLength(radius);<BR><BR>// 
MOET IN EEN KLASSE KOMEN VIA MAPPER vtkcolor["kleur"] return double*<BR>//<BR>// 
Setting up a color database: white, red, green, blue, 
yellow<BR>//&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
cyan, magenta, sky blue, black<BR>//<BR>&nbsp;double** vtkcolors = new 
double*[9];<BR>&nbsp;for (int i=0; i&lt;9; i++)<BR>&nbsp; vtkcolors[i] = new 
double[4];<BR><BR>&nbsp;//white<BR>&nbsp;vtkcolors[0][0]=1;<BR>&nbsp;vtkcolors[0][1]=1;<BR>&nbsp;vtkcolors[0][2]=1;<BR>&nbsp;vtkcolors[0][3]=1;<BR><BR>&nbsp;//red<BR>&nbsp;vtkcolors[1][0]=1;<BR>&nbsp;vtkcolors[1][1]=0;<BR>&nbsp;vtkcolors[1][2]=0;<BR>&nbsp;vtkcolors[1][3]=1;<BR><BR>&nbsp;//green<BR>&nbsp;vtkcolors[2][0]=0;<BR>&nbsp;vtkcolors[2][1]=1;<BR>&nbsp;vtkcolors[2][2]=0;<BR>&nbsp;vtkcolors[2][3]=1;<BR><BR>&nbsp;//blue<BR>&nbsp;vtkcolors[3][0]=0;<BR>&nbsp;vtkcolors[3][1]=0;<BR>&nbsp;vtkcolors[3][2]=1;<BR>&nbsp;vtkcolors[3][3]=1;<BR><BR>&nbsp;//yellow<BR>&nbsp;vtkcolors[4][0]=1;<BR>&nbsp;vtkcolors[4][1]=1;<BR>&nbsp;vtkcolors[4][2]=0;<BR>&nbsp;vtkcolors[4][3]=1;<BR><BR>&nbsp;//cyan<BR>&nbsp;vtkcolors[5][0]=0;<BR>&nbsp;vtkcolors[5][1]=1;<BR>&nbsp;vtkcolors[5][2]=1;<BR>&nbsp;vtkcolors[5][3]=1;<BR><BR>&nbsp;//mangenta<BR>&nbsp;vtkcolors[6][0]=1;<BR>&nbsp;vtkcolors[6][1]=0;<BR>&nbsp;vtkcolors[6][2]=1;<BR>&nbsp;vtkcolors[6][3]=1;<BR><BR>&nbsp;//sky 
blue<BR>&nbsp;vtkcolors[7][0]=0.5;<BR>&nbsp;vtkcolors[7][1]=0.5;<BR>&nbsp;vtkcolors[7][2]=1;<BR>&nbsp;vtkcolors[7][3]=1;<BR><BR>&nbsp;//black<BR>&nbsp;vtkcolors[8][0]=0;<BR>&nbsp;vtkcolors[8][1]=0;<BR>&nbsp;vtkcolors[8][2]=0;<BR>&nbsp;vtkcolors[8][3]=1;<BR><BR><BR>&nbsp;vtkLookupTable 
*glyphlut = vtkLookupTable::New();<BR>&nbsp; 
glyphlut-&gt;SetRange(0,6);<BR>&nbsp; 
glyphlut-&gt;SetNumberOfTableValues(7);<BR>&nbsp; 
glyphlut-&gt;SetTableValue(0,vtkcolors[1]);<BR>&nbsp; 
glyphlut-&gt;SetTableValue(1,vtkcolors[2]);<BR>&nbsp; 
glyphlut-&gt;SetTableValue(2,vtkcolors[3]);<BR>&nbsp; 
glyphlut-&gt;SetTableValue(3,vtkcolors[4]);<BR>&nbsp; 
glyphlut-&gt;SetTableValue(4,vtkcolors[5]);<BR>&nbsp; 
glyphlut-&gt;SetTableValue(5,vtkcolors[6]);<BR>&nbsp; 
glyphlut-&gt;SetTableValue(6,vtkcolors[7]);<BR>&nbsp; 
glyphlut-&gt;Build();<BR><BR>&nbsp;vtkGlyph3D *glyph = 
vtkGlyph3D::New();<BR>&nbsp; glyph-&gt;SetInput(polydata);<BR>&nbsp; 
glyph-&gt;ScalingOff();<BR>&nbsp; glyph-&gt;SetNumberOfSources(7);<BR>&nbsp; 
glyph-&gt;SetSource(0, spheres-&gt;GetOutput());<BR>&nbsp; 
glyph-&gt;SetSource(1, spheres-&gt;GetOutput());<BR>&nbsp; 
glyph-&gt;SetSource(2, cubes-&gt;GetOutput());<BR>&nbsp; glyph-&gt;SetSource(3, 
spheres-&gt;GetOutput());<BR>&nbsp; glyph-&gt;SetSource(4, 
cubes-&gt;GetOutput());<BR>&nbsp; glyph-&gt;SetSource(5, 
cubes-&gt;GetOutput());<BR>&nbsp; glyph-&gt;SetSource(6, 
cones-&gt;GetOutput());<BR>&nbsp; glyph-&gt;SetIndexModeToScalar();<BR>&nbsp; 
glyph-&gt;SetColorModeToColorByScalar();<BR>&nbsp; 
glyph-&gt;Update();<BR><BR><BR>&nbsp;//--- MAPPING AND RENDERING 
---//<BR>&nbsp;vtkPolyDataMapper *umap = vtkPolyDataMapper::New();<BR>&nbsp; 
umap-&gt;SetInput(glyph-&gt;GetOutput());<BR>&nbsp; 
umap-&gt;ScalarVisibilityOn();<BR>&nbsp; 
umap-&gt;SetLookupTable(glyphlut);<BR>&nbsp; 
umap-&gt;UseLookupTableScalarRangeOn();<BR>&nbsp; 
umap-&gt;SetColorModeToMapScalars();<BR><BR>&nbsp;vtkDataSetMapper *gmap = 
vtkDataSetMapper::New();<BR>&nbsp; 
gmap-&gt;SetInput(ugridreader-&gt;GetOutput());<BR>&nbsp; 
gmap-&gt;ScalarVisibilityOff();<BR><BR>//// MOET LEGENDE WORDEN / MAG 
WEG<BR>&nbsp; loadBarActor();<BR>&nbsp; 
baractor-&gt;SetLookupTable(umap-&gt;GetLookupTable());<BR>&nbsp; 
baractor-&gt;SetTitle(toConstChar("Boundairy 
Conditions"));<BR><BR>&nbsp;vtkActor *uactor = vtkActor::New();<BR>&nbsp; 
uactor-&gt;SetMapper(umap);<BR><BR>&nbsp;vtkActor *gactor = 
vtkActor::New();<BR>&nbsp; gactor-&gt;SetMapper(gmap);<BR>&nbsp; 
gactor-&gt;GetProperty()-&gt;SetColor(0.5,0.5,0.5);<BR>&nbsp; 
gactor-&gt;GetProperty()-&gt;SetOpacity(0.1);<BR>&nbsp; 
gactor-&gt;GetProperty()-&gt;SetRepresentationToWireframe();<BR><BR>&nbsp;ren-&gt;AddActor(gactor);<BR>&nbsp;ren-&gt;AddActor(uactor);<BR><BR>&nbsp;//start 
clock<BR>&nbsp;Stopwatch 
test;<BR>&nbsp;test.start();<BR><BR>&nbsp;//render<BR>&nbsp;renWin-&gt;Render();</FONT><BR></FONT></DIV></BODY></HTML>