[vtkusers] structured points dataset

Beate Aistleitner B.Aistleitner at irl.cri.nz
Wed Nov 20 18:03:25 EST 2002


Hi,

I have a some troubles understanding the syntax of a structured points
dataset and the input of scalar values. I have 3D data where the origin of
the axis is not 0 but the range is for example from -3 to 4. The values are
as for example this one -3.254. I want to write this data into a .vtk file
and use the vtkSturcturedPointsReader for reading this data into my program.
My problem now is how this file has to look like exactly to fit the
requirements for the vtkStructuredPointsReader because the examples I found
are just like the following one.

# vtk DataFile Version 2.0

ASCII
DATASET STRUCTURED_POINTS
DIMENSIONS 10 10 30
ORIGIN 100.0 80.0 1.0
SPACING 1.0 1.0 1.0

POINT_DATA 167580
SCALARS scalars unsigned_char
LOOKUP_TABLE default
..


So my questions are:
How do I define the range of the axis? eg. from -3 to 4 means DIMENSION 7,
ORIGIN -3?
What does the value after POINT_DATA mean?
How do I define my point data? Is it just writing values in a column? eg.
value at (x==1, y==2, z==1) == -3.254 means writing -3.254
For further processing (Ray Casting, Isosurfacing, and Histograms) the data
needs to be either unsigned short or unsigned char. Is it possible to get
data in the above mentioned format into one of these two datatypes?

Are there any better solutions than structured points dataset (note the
restrictions of datatypes and that vtkImageData or any subclass is required
in my program)? 

thanks for your help,
Beate 


*************************************************************** 
CAUTION: This email message and any attachments contain 
information that is CONFIDENTIAL and may be LEGALLY PRIVILEGED. 
If you are not the intended recipient any use, disclosure or 
copying of this message or attachments is strictly prohibited. 
If you have received this email message in error, please notify 
us immediately and erase all copies of the message and 
attachments. Thank you. 
*************************************************************** 




More information about the vtkusers mailing list