[vtkusers] Retrieving dimensions
Bill Lorensen
bill.lorensen at gmail.com
Mon Jul 9 15:45:38 EDT 2012
Your cfd code should have the dimensions. And, yes, you must specify the
dimensions for a structured grid.
See this example:
http://www.vtk.org/Wiki/VTK/Examples/Cxx/StructuredGrid/StructuredGrid
On Mon, Jul 9, 2012 at 2:48 PM, Brian Curtis <bcurtis3 at masonlive.gmu.edu>wrote:
> Hi there,
>
> I have set a vtkPoints instance from a set of point locations I
> gathered from a CDF file.
> ==CODE (CXX) ==
> vtkSmartPointer<vtkPoints> points2 = vtkSmartPointer<vtkPoints>::New();
> for(i=0;i<sizez2;i++){
> points2->InsertNextPoint(x2[i], y2[i], z2[i]);
> }
> ==========
>
> I have inserted points1 into a StructuredGrid as follows: (as well as
> a scalar field that I gathered from the CDF file as well)
> ==CODE (CXX)==
> vtkSmartPointer<vtkStructuredGrid> griddata2 =
> vtkSmartPointer<vtkStructuredGrid>::New();
> griddata2->SetPoints(points2);
> griddata2->GetPointData()->SetScalars(myones2);
> =========
>
> In order for me to see this scalar field, I am using a
> StructuredGridWriter to output a .vtk file to be read into Paraview.
> Unfortunately I can not visualize this scalar field. I believe I need
> the dimensions set in my structured grid for this to work, but with
> the dataset (CDF File) I am not given this information.
>
> Question: Is there a way in VTK (CXX) to compute or gather the
> dimensions of the structuredGrid?
>
> Thanks,
> ~Brian
>
> --
> =================
> Doctoral Candidate in Computational Sciences and Informatics
> School of Physics Astronomy and Computational Sciences
> George Mason University
> 4400 University Drive MSN6A2
> Fairfax, VA 22030
> =================
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
--
Unpaid intern in BillsBasement at noware dot com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120709/f3add13f/attachment.htm>
More information about the vtkusers
mailing list