[vtkusers] problem with Point Iterator : vtkGenericPointIterator vtkGenericDataSet

Alberto Magrofuoco abemagro at yahoo.it
Thu Aug 18 10:09:28 EDT 2005


I am running vtk on windows (c++).

I am working on human head modelling, I extract the
skull surface from medical data and I obtain a file
containing :
- points list with correspoinding value (1 if the
surface passes through that voxel 0 otherwise)
- normals per each point.

something like:


--------------------------------------------------
vtk output
ASCII
DATASET STRUCTURED_POINTS
DIMENSIONS 8 8 8
SPACING 1 1 1
ORIGIN 0 0 0
CELL_DATA 343
POINT_DATA 512
SCALARS scalars float
LOOKUP_TABLE default
0 0 0 0 0 0 0 0 0 
0 0 0 0 0 0 0 0 0 
1 1 1 1 0 0 0 0 1 
1 1 1 0 0 0 0 1 1 

(... and so on)

NORMALS normals float
0 0 0 0 0 0 0 0 0 
0 0 0 0 0 0 0 0 0 
0 0 0 0 0 0 0 0 0 
0 0 0 0 0 0 0 0 0 
0 0 0 0 0 0 0 0 0 
0 0 0 0 0 0 0 0 0 
-0.0524864 -0.0524864 -0.997241 0 -0.0525588 -0.998618
0 -0.0525588 -0.998618 
0.0524864 -0.0524864 -0.997241 0 0 0 0 0 0 
0 0 0 0 0 0 -0.0525588 0 -0.998618 

(..... and so on)

----------------------------------------------------

I need to be able to iterate in this file, to use a
index to individuate a point and the corresponding
normals. 

1)Which function should I use?

I found out vtkGenericPointIterator should work, but
it was not installed,
so I copied vtkGenericPointIterator.h,
vtkGenericDataSet.h, vtkGenericPointIterator.cxx,
vtkGenericDataSet.cxx into /VTK/Filtering
2)Is that enough or should I install something else?

Anyway I do not know how to use it, I could find only
one example.
I am running something like:

vtkGenericDataSet *dataset;
vtkGenericPointIterator *it =
dataset->NewPointIterator();

2)How can I choose the input for dataset? (I should be
able to load structuredpoints data)

3)Can I find some examples in which
vtkGenericPointIterator performs something similar to
what I am looking for? 

Thanks,
Alberto 




	

	
		
___________________________________ 
Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB 
http://mail.yahoo.it



More information about the vtkusers mailing list