|
Notes |
|
|
(0030946)
|
|
Jean-Christophe Fillion-Robin
|
|
2013-06-05 17:27
|
|
Updated example for VTK 6:
import vtk
reader = vtk.vtkDataSetReader()
reader.SetFileName('surface.vtk')
#reader.Update()
tf = vtk.vtkTriangleFilter()
tf.SetInputConnection( reader.GetOutputPort())
stripper = vtk.vtkStripper()
stripper.SetInputConnection( tf.GetOutputPort() )
linear = vtk.vtkLinearSubdivisionFilter ()
linear.SetInputConnection(reader.GetOutputPort())
#linear.SetInput (tf.GetOutput())
#linear.SetInput (stripper.GetOutput())
linear.SetNumberOfSubdivisions (3)
linear.Update()
print linear.GetOutput()
renderer = vtk.vtkRenderer()
renWin = vtk.vtkRenderWindow()
iren = vtk.vtkRenderWindowInteractor()
mapper = vtk.vtkDataSetMapper()
actor = vtk.vtkActor()
geo = vtk.vtkGeometryFilter()
pmapper = vtk.vtkPolyDataMapper()
#mapper.SetInput( linear.GetOutput() )
#mapper.SetInput( reader.GetOutput() )
#actor.SetProperty( vtk.vtkProperty() )
#actor.GetProperty().SetRepresentationToWireframe()
geo.SetInputConnection( linear.GetOutputPort())
pmapper.SetInputConnection( geo.GetOutputPort())
#actor.SetMapper( mapper )
actor.SetMapper( pmapper )
renderer.SetBackground(1,1,1)
renderer.AddActor( actor )
renWin.AddRenderer( renderer )
renWin.SetSize( 300, 300 )
#Set the render window
iren.SetRenderWindow( renWin )
iren.Initialize()
iren.Start() |
|
|
|
(0030947)
|
|
Jean-Christophe Fillion-Robin
|
|
2013-06-05 17:28
|
|
|
Could you check if the recent version of VTK 6 work as expected for your use case ? |
|
|
|
(0031216)
|
|
Dave DeMarle
|
|
2013-07-22 19:13
|
|
|
If the bug persists in 6.0.0, please reopen. |
|
|
|
(0036729)
|
|
Kitware Robot
|
|
2016-08-12 09:54
|
|
Resolving issue as `moved`.
This issue tracker is no longer used. Further discussion of this issue may take place in the current VTK Issues page linked in the banner at the top of this page. |
|