[vtkusers] Extracting edges from unstructured grid

Tim Jarvis jarv0075 at umn.edu
Wed Aug 10 12:00:24 EDT 2005


I'm currently trying to take polydata, and using a TubeFilter, draw some
subset of the edges... 

I've tried creating an unstructured grid, manually entering a vtkLine with
the correct point ID's, and then using an vtkExtractEdges filter, etc.

The code generates no errors, but it doesn't do anything either!  Any
ideas?  I tried doing a geometry filter before the extract but still
nothing

Thanks!


	vtkLine aLine
	[aLine GetPointIds] SetId 0 0
	[aLine GetPointIds] SetId 1 1

	vtkUnstructuredGrid aLineGrid
	aLineGrid Allocate 1 1
	aLineGrid InsertNextCell [aLine GetCellType] [aLine GetPointIds]
	aLineGrid SetPoints [polyData GetPoints]       

	vtkGeometryFilter parison
	parison SetInput aLineGrid

	vtkExtractEdges extract
	extract SetInput [parison GetOutput]

	vtkTubeFilter tubes

	tubes SetInput [extract GetOutput]
	tubes SetRadius 5
	tubes SetNumberOfSides 6
   
	vtkPolyDataMapper mapEdges
	mapEdges SetInput [tubes GetOutput]
	vtkActor edgeActor
	edgeActor SetMapper mapEdges
	eval [edgeActor GetProperty] SetColor 1.0 0.0 0.0

	ren1 AddActor edgeActor

---------------------------------------
 Timothy R. Jarvis                   
---------------------------------------
Graduate Research Assistant 
International Neuroimaging Consortium
VA Medical Center
612-467-2619
http://www.neurovia.umn.edu
---------------------------------------




More information about the vtkusers mailing list