So I&#39;d have to snap my data to the grid manually? There is no way to convert a unstructured grid of points to a structured grid? (where it automatically sets the spacing to the largest spacing that will make each point fall on the grid?)<br clear="all">
<br clear="all">Thanks,<br><br>David<br>
<br><br><div class="gmail_quote">On Wed, Mar 4, 2009 at 9:24 AM, Bryn Lloyd <span dir="ltr">&lt;<a href="mailto:blloyd@vision.ee.ethz.ch">blloyd@vision.ee.ethz.ch</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div><div class="h5">this is a image with all zeros:<br>
<br>
vtkImageData *output = vtkImageData::New();<br>
  output-&gt;SetScalarTypeToDouble();<br>
  output-&gt;SetDimensions(this-&gt;Dimensions);<br>
  output-&gt;SetOrigin(this-&gt;Origin);<br>
  output-&gt;SetSpacing(this-&gt;Spacing);<br>
  output-&gt;AllocateScalars();<br>
  output-&gt;GetPointData()-&gt;GetScalars()-&gt;SetName(&quot;scalars&quot;);<br>
  output-&gt;GetPointData()-&gt;GetScalars()-&gt;FillComponent(0,0.0);<br>
<br>
<br>
You could assign the pixel values by whatever method you want. A simple<br>
test case can be generated by using the calculator on above image in<br>
paraview. (write it with a vtkDataSetWriter...)<br>
<br>
<br>
--Bryn<br></div></div>
_______________________________________________<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>
</blockquote></div><br>