[vtkusers] Visulazing values rather than coordinates

Chris Scharver scharver at evl.uic.edu
Thu Feb 27 09:44:26 EST 2003


At 9:59 AM -0500 on 02/26/2003, Arun Nagarajan wrote:

>I am not sure how exactly to visualize this input data I have at hand. I
>have looked through the sample files and have come up with nothing. as most
>of them deal with coordinates rather than the value at the coordinates. I
>have included a portion of the file. The format is
>[x y z]:  value_at_that_coordinate

Arun, it sounds like the data you're reading is very similar to data I've been used. The user's guide has a section on "Working with Field Data" which clearly explains reading individual data into separate fields. You can normalize the values and create a visualization using vtkDataObjectToDataSource. Without normalization, you can treat the x-y-z axis just as coordinates. Take a look at VTK/Examples/DataManipulation/Tcl/FinancialField.tcl. It demonstrates assigning an array of scalar values. If you're creating a structured grid, you just need to make sure that you use vtkDataObjectToDataSource::SetDimensions().

At 11:51 AM +0530 02/27/2003, Prabhu Ramachandran wrote:
>The x co-ordinate increases fastest, y next and z last.  The latest
>version of the File formats document mentions this.

It may be good to document this within vtkStructuredGrid itself. If one is importing data from some other file format with a vtkProgrammableDataObjectSource, then it's essential to know how to order the data when creating the grid. I had to do all the sorting for my data beforehand. It would be nice to be able to do that directly on the vtkDataArray.

Hope this helps,
Chris
--
Chris Scharver
Electronic Visualization Laboratory
The University of Illinois at Chicago
Ph: 312-996-3002   FAX: 312-413-7585
<http://www.evl.uic.edu/scharver/>



More information about the vtkusers mailing list