You could threshold or contour or use selection by value or volume render to see the bins.<div><br></div><div>Or instead of using a vtkImageData you could create a vtkPolyData for the bins (with one vtkVertex cell per vtkPoint) and assign the hit count to a scalar array. If you want to convert to vtkImageData afterward you could use vtkGaussianSplatter to sample onto the cells.</div>
<div><div><div><br></div><div><div><div>David E DeMarle<br>Kitware, Inc.<br>R&D Engineer<br>21 Corporate Drive<br>Clifton Park, NY 12065-8662<br>Phone: 518-881-4909<br>
<br><br><div class="gmail_quote">On Fri, Jan 6, 2012 at 4:55 AM, h0ppel <span dir="ltr"><<a href="mailto:h0ppel@web.de">h0ppel@web.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
I do have an example point Cloud and put it into imagedata like this:<br>
<br>
int i, j, k;<br>
<br>
int[][][] Matrix;<br>
var rand = new Random(100);<br>
<br>
var x = 100; var y = 200; var z = 35;<br>
var size = x * y * z * sizeof(int);<br>
<br>
Matrix = new int[x][][];<br>
<br>
for (i = 0; i < x; i++)<br>
{<br>
Matrix[i] = new int[y][];<br>
<br>
for (j = 0; j < y; j++)<br>
{<br>
Matrix[i][j] = new int[z];<br>
<br>
for (k = 0; k < z; k++)<br>
{<br>
Matrix[i][j][k] = rand.Next();<br>
}<br>
}<br>
}<br>
<br>
vtkImageData image = new vtkImageData();<br>
<br>
image.SetDimensions(100, 200, 35);<br>
image.SetSpacing(1, 1, 1);<br>
image.SetOrigin(0, 0, 0);<br>
image.SetNumberOfScalarComponents(1);<br>
image.SetScalarTypeToFloat();<br>
image.AllocateScalars();<br>
<br>
unsafe<br>
{<br>
int* ptr = (int*)(image.GetScalarPointer());<br>
<br>
for (i = 0; i < 100; i++)<br>
{<br>
for (j = 0; j < 200; ++j)<br>
{<br>
for (k = 0; k < 35; ++k)<br>
{<br>
*ptr++ = Matrix[i][j][k];<br>
}<br>
}<br>
}}< /raw><br>
<br>
but how can I display this cloud in 3d and not only in the viewer?<br>
<br>
thanks<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
View this message in context: <a href="http://vtk.1045678.n5.nabble.com/Display-Pointcloud-in-3d-tp5125086p5125086.html" target="_blank">http://vtk.1045678.n5.nabble.com/Display-Pointcloud-in-3d-tp5125086p5125086.html</a><br>
Sent from the VTK - Users mailing list archive at Nabble.com.<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
</font></span></blockquote></div><br></div></div></div></div></div>