[vtkusers] How use vtkProgrammableSource in C++(SurfaceReconstruction)
Paul Tait - OPES
Paul at opes.com.au
Thu Apr 12 20:26:27 EDT 2007
py2c
-----Original Message-----
From: vtkusers-bounces+paul=opes.com.au at vtk.org
[mailto:vtkusers-bounces+paul=opes.com.au at vtk.org] On Behalf Of yessine
Sent: Thursday, 12 April 2007 11:43 PM
To: vtkusers at vtk.org
Subject: [vtkusers] How use vtkProgrammableSource in
C++(SurfaceReconstruction)
Hi,
I have points in cloud and I want to generate surface reconstruction by
vtk library. There is example in vtk in .py but I couldn't convert it in C++
for below code. Can you help me to convert this few line code in c++. I have
problem with the use of SetExecuteMethod fonction.
////////////////////////
pointSource = vtk.vtkProgrammableSource()
def readPoints():
output = pointSource.GetPolyDataOutput()
points = vtk.vtkPoints()
output.SetPoints(points)
file = open(os.path.normpath(os.path.join(VTK_DATA_ROOT,
"Data/cactus.3337.pts")))
line = file.readline()
while line:
data = string.split(line)
if data and data[0] == 'p':
x, y, z = float(data[1]), float(data[2]), float(data[3])
points.InsertNextPoint(x, y, z)
line = file.readline()
pointSource.SetExecuteMethod(readPoints) -- ???
Thanks
--
View this message in context:
http://www.nabble.com/How-use-vtkProgrammableSource-in-C%2B%2B%28Surface-Rec
onstruction%29-tf3566169.html#a9961793
Sent from the VTK - Users mailing list archive at Nabble.com.
_______________________________________________
This is the private VTK discussion list.
Please keep messages on-topic. Check the FAQ at:
http://www.vtk.org/Wiki/VTK_FAQ Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers
More information about the vtkusers
mailing list