<div class="gmail_quote">On Thu, Feb 4, 2010 at 2:27 PM, Nico Schlömer <span dir="ltr">&lt;<a href="mailto:nico.schloemer@gmail.com">nico.schloemer@gmail.com</a>&gt;</span> wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">Hi all,<br><br>I have this data and I wonder how to represent it best in a scientific<br>format (e.g., some flavor of VTK). I&#39;m not sure though which suits<br>
best.<br><br>So, I&#39;m having this very simple 2D rectangular grid here, let&#39;s say<br>equal grid spacing overall, and I intersect this with, say a circle,<br>such that I&#39;m looking at *only the grid points which sit inside the<br>
circle. -- A pixeled circle then if you want.<br><br>At each grid point, I got one scalar value, and this I&#39;d like to visualize.<br><br>I was looking at STRUCTURED_POINTS to plot the values in the circle<br>and a tight bounding box around it, but here I&#39;d have to set values<br>
for all the points outside the circle I guess.<br><br>I&#39;m not too familar with the XML formats, so I haven&#39;t really looked<br>into that yet.<br><br>Anyone got a quick idea for which representation may be best suited?<br>
<br>Cheers,<br>Nico<br></blockquote>
<div>Here is a brief summary of the data types available in VTK:</div>
<div><a href="http://vtk.org/Wiki/VTK/Tutorials/3DDataTypes">http://vtk.org/Wiki/VTK/Tutorials/3DDataTypes</a><br clear="all"></div>
<div>In your case, as you mentioned, you shouldn&#39;t represent the points outside the circle, so &quot;grid based&quot; methods are out. This leaves you with vtkPolyData and vtkUnstructuredGrid.</div>
<div> </div>
<div>Here is an example of how to make a polydata:</div><a href="http://vtk.org/Wiki/VTK/Examples/IO/WriteVTP">http://vtk.org/Wiki/VTK/Examples/IO/WriteVTP</a> 
<div> </div>
<div>and an unstructured grid:</div>
<div><a href="http://vtk.org/Wiki/VTK/Examples/IO/WriteVTU">http://vtk.org/Wiki/VTK/Examples/IO/WriteVTU</a></div>
<div> </div>
<div>Let us know if you have any problems.</div>
<div> </div>
<div>Thanks,<br><br>David</div></div>