improved visualization of script results

This commit is contained in:
Christoph Kords 2013-05-13 09:36:19 +00:00
parent 6fac7c347c
commit 7f7cd0732d
1 changed files with 8 additions and 5 deletions

View File

@ -411,9 +411,11 @@ for filename in filenames:
meshMapper.ScalarVisibilityOff() # do not use scalar data for coloring meshMapper.ScalarVisibilityOff() # do not use scalar data for coloring
meshActor = vtkActor() meshActor = vtkActor()
meshActor.SetMapper(meshMapper) meshActor.SetMapper(meshMapper)
meshActor.GetProperty().SetOpacity(0.5) meshActor.GetProperty().SetOpacity(0.2)
meshActor.GetProperty().SetColor(1,1,0) meshActor.GetProperty().SetColor(1.0,1.0,0)
meshActor.GetProperty().EdgeVisibilityOn() meshActor.GetProperty().BackfaceCullingOn()
# meshActor.GetProperty().SetEdgeColor(1,1,0.5)
# meshActor.GetProperty().EdgeVisibilityOn()
boxpoints = vtkPoints() boxpoints = vtkPoints()
for n in range(8): for n in range(8):
@ -436,9 +438,8 @@ for filename in filenames:
boxMapper.SetInput(boxsurface) boxMapper.SetInput(boxsurface)
boxActor = vtkActor() boxActor = vtkActor()
boxActor.SetMapper(boxMapper) boxActor.SetMapper(boxMapper)
boxActor.GetProperty().SetOpacity(0.1)
boxActor.GetProperty().SetLineWidth(2.0) boxActor.GetProperty().SetLineWidth(2.0)
boxActor.GetProperty().EdgeVisibilityOn() boxActor.GetProperty().SetRepresentationToWireframe()
gridMapper = vtkDataSetMapper() gridMapper = vtkDataSetMapper()
gridMapper.SetInput(pointgrid) gridMapper.SetInput(pointgrid)
@ -450,6 +451,7 @@ for filename in filenames:
renderer = vtkRenderer() renderer = vtkRenderer()
renderWindow = vtkRenderWindow() renderWindow = vtkRenderWindow()
renderWindow.FullScreenOn()
renderWindow.AddRenderer(renderer) renderWindow.AddRenderer(renderer)
renderWindowInteractor = vtkRenderWindowInteractor() renderWindowInteractor = vtkRenderWindowInteractor()
renderWindowInteractor.SetRenderWindow(renderWindow) renderWindowInteractor.SetRenderWindow(renderWindow)
@ -459,5 +461,6 @@ for filename in filenames:
renderer.SetBackground(1,1,1) renderer.SetBackground(1,1,1)
renderWindow.Render() renderWindow.Render()
renderWindowInteractor.SetInteractorStyle(vtkInteractorStyleTrackballCamera())
renderWindowInteractor.Start() renderWindowInteractor.Start()