Your cfd code should have the dimensions. And, yes, you must specify the dimensions for a structured grid.<div><br></div><div>See this example:</div><div><a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/StructuredGrid/StructuredGrid">http://www.vtk.org/Wiki/VTK/Examples/Cxx/StructuredGrid/StructuredGrid</a></div>
<div><br><div class="gmail_quote">On Mon, Jul 9, 2012 at 2:48 PM, Brian Curtis <span dir="ltr"><<a href="mailto:bcurtis3@masonlive.gmu.edu" target="_blank">bcurtis3@masonlive.gmu.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi there,<br>
<br>
I have set a vtkPoints instance from a set of point locations I<br>
gathered from a CDF file.<br>
==CODE (CXX) ==<br>
vtkSmartPointer<vtkPoints> points2 = vtkSmartPointer<vtkPoints>::New();<br>
for(i=0;i<sizez2;i++){<br>
points2->InsertNextPoint(x2[i], y2[i], z2[i]);<br>
}<br>
==========<br>
<br>
I have inserted points1 into a StructuredGrid as follows: (as well as<br>
a scalar field that I gathered from the CDF file as well)<br>
==CODE (CXX)==<br>
vtkSmartPointer<vtkStructuredGrid> griddata2 =<br>
vtkSmartPointer<vtkStructuredGrid>::New();<br>
griddata2->SetPoints(points2);<br>
griddata2->GetPointData()->SetScalars(myones2);<br>
=========<br>
<br>
In order for me to see this scalar field, I am using a<br>
StructuredGridWriter to output a .vtk file to be read into Paraview.<br>
Unfortunately I can not visualize this scalar field. I believe I need<br>
the dimensions set in my structured grid for this to work, but with<br>
the dataset (CDF File) I am not given this information.<br>
<br>
Question: Is there a way in VTK (CXX) to compute or gather the<br>
dimensions of the structuredGrid?<br>
<br>
Thanks,<br>
~Brian<br>
<br>
--<br>
=================<br>
Doctoral Candidate in Computational Sciences and Informatics<br>
School of Physics Astronomy and Computational Sciences<br>
George Mason University<br>
4400 University Drive MSN6A2<br>
Fairfax, VA 22030<br>
=================<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>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Unpaid intern in BillsBasement at noware dot com<br><br>
</div>