[vtkusers] Changing vtkPolyData
"Siebert, Frank-André"
siebert at onco.uni-kiel.de
Thu May 30 10:45:16 EDT 2002
Dear VTK-list members,
I have trouble with changing a vtkPolyData set. Of course I read the
list-archives and this topic was discussed before but I didn't found a
convenient solution.
In my Application (vtk4.0 with Tcl/Tk on Win2000) I define up to 100
user given lines in a 2D image (vtkTkImageViewerWidget) by mouseclick
as vtkPolyData. This works fine. But now I am looking for a possibility to
change the coordinates of one single point in the vtkPolyData set.
When I look at vtkTransformPolyDataFilter it seems to me that one can
use this filter to transform the whole dataset but not a single point.
The mentioned lines in my program are defined as followed:
...
vtkPoints pts1
vtkCellArray line1
vtkPolyData myLines
myLines SetPoints pts1
myLines SetLines line1
# define a new line: lineNum is the number of the line (0..99)
pts1 InsertPoint [expr 2*$lineNum] $x1 $y1 0
pts1 InsertPoint [expr 2*$lineNum +1] $x2 $y2 0
line1 InsertNextCell 2
line1 InsertCellPoint [expr 2*$lineNum]
line1 InsertCellPoint [expr 2*$lineNum+1]
viewer Render
...
It would be very helpful if somebody could give a hint how to alter the
vtkPolyData structure or could name a link to an example.
Maybe the solution is so easy I could not see it !?
Thank you
Frank-André
----------------------------------------
Frank-André Siebert (PhD)
Klinik für Strahlentherapie
Universitäts-Klinikum Kiel (UKK)
Arnold-Heller-Str. 9
24105 Kiel
Germany
----------------------------------------
Email: siebert at onco.uni-kiel.de
Tel: 0431/597-3022
Fax: 0431/597-3110
More information about the vtkusers
mailing list