[vtkusers] Retrieving dimensions

Brian Curtis bcurtis3 at masonlive.gmu.edu
Mon Jul 9 14:48:23 EDT 2012


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
=================



More information about the vtkusers mailing list