Again, sorry for the double posting:<br>
<br>
Hi, Randall:<br>
<br>
Curiously I'm using VTK5.0 compiled from source but the problem persists, any ideas?<br>
<br>
Thanks,<br>
<br>
Juan.<br>
<br><div><span class="gmail_quote">On 2/10/06, <b class="gmail_sendername">Randall Hand</b> <<a href="mailto:randall.hand@gmail.com">randall.hand@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I ran into a similar goof a while back, reported here : <a href="http://www.vtk.org/Bug/bug.php?op=show&bugid=2546&pos=3" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.vtk.org/Bug/bug.php?op=show&bugid=2546&pos=3
</a><br><br>That's since been fixed in
VTK5.0. What version are you using?<br><br><div><div><span class="e" id="q_10955dd019601578_1"><span class="gmail_quote">On 2/10/06, <b class="gmail_sendername">Juan José Aja Fernández</b> <<a href="mailto:juan.aja@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
juan.aja@gmail.com</a>> wrote:</span>
</span></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><span class="e" id="q_10955dd019601578_3">Sorry for the double post, apparently the vtkusers mailing system only admits text only messages.
<br>
<br>
Hi, everyone:<br>
<br>
I need to use Volume Rendering on an unstructured grid made out of
voxels, the problem is that I have a lot of them (the grid minimum size
is 50x50x50 so at least 25000 voxels).<br>
<br>
I'm doing a truly horrible hack to try to color them: generate a
vtkPoint for each voxel in the grid by means of<br>
<br>
vtkDoubleArray *pts = ....<br>
<br>
for (i=0; i < numberOf Voxels; i++)<br>
pts->InsertNextValue(i);<br>
<br>
Then I assign pts to the vtkCellData of my grid:<br>
<br>
(grid->GetCellData())->SetScala
<div>rs(pts);<br>
<br>
And finally I populate the color transfer function.<br>
For example if I want to color my grid like a red-green chess board, I
can do: <br>
<br>
for (i=0; i < numberOfVoxels; i++) {<br>
if(i%2 == 0 && i != 0)<br>
ctrans->AddRGBPoint(pts->GetValue(i), 1, 0, 0); <br>
else ctrans->AddRGBPoint(pts->GetValue(i), 0, 1, 0); <br>
}<br>
<br>
The final result is very strange, the colors don't alternate the way
they are supposed to (see the attached jpgs in the previous mail., the first one dimensions
are: 5x5x5 and it looks good <a href="http://public.kitware.com/pipermail/vtkusers/attachments/20060210/d991c333/5x5x5.jpg" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://public.kitware.com/pipermail/vtkusers/attachments/20060210/d991c333/5x5x5.jpg
</a><br>
the second one 19x19x19 but the checkered pattern dissapears:
<a href="http://public.kitware.com/pipermail/vtkusers/attachments/20060210/d991c333/19x19x19.jpg" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://public.kitware.com/pipermail/vtkusers/attachments/20060210/d991c333/19x19x19.jpg
</a>).<br>
<br>
Obviously I'm doing things wrong (the fact is that I'm somewhat new to
vtk and I don't have the slightest idea of how to accomplish this), or
is there a (short) limit in the number of points my transfer function
can have?<br>
<br>
If not, how can this be accomplished?<br>
<br>
Thanks a lot,<br><span>
Juan<br>
</span></div></span></div>
<br>_______________________________________________<br>This is the private VTK discussion list.<br>Please keep messages on-topic. Check the FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://www.vtk.org/Wiki/VTK_FAQ</a><br>Follow this link to subscribe/unsubscribe:<br><a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.vtk.org/mailman/listinfo/vtkusers
</a><br><br><br></blockquote></div><br><br clear="all"><br>-- <br>Randall Hand<br>Visualization Scientist, <br>ERDC-MSRC Vicksburg, MS<br>Homepage: <a href="http://www.yeraze.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://www.yeraze.com</a>
</blockquote></div><br>