Commit 37dc617d authored by Berk Geveci's avatar Berk Geveci

Added EnSight tests to increase coverage.

Also added associated data.

Change-Id: I29de59dabf130855aff68c73ff50bf6f35048b56
parent 6066b788
vtk_add_test_python(EnSight6Elements.py)
vtk_add_test_python(EnSight6ElementsBin.py)
vtk_add_test_python(EnSight6OfficeBin.py)
vtk_add_test_python(EnSightBlow1ASCII.py)
vtk_add_test_python(EnSightBlow1Bin.py)
......@@ -9,6 +10,7 @@ vtk_add_test_python(EnSightBlow4Bin.py)
vtk_add_test_python(EnSightBlow5ASCII.py)
vtk_add_test_python(EnSightCompound.py)
vtk_add_test_python(EnSightGoldElements.py)
vtk_add_test_python(EnSightGoldElementsBin.py)
vtk_add_test_python(EnSightIronProtASCII.py)
vtk_add_test_python(EnSightIronProtBin.py)
vtk_add_test_python(EnSightMandelbrot.py)
......
#!/usr/bin/env python
import vtk
from vtk.test import Testing
from vtk.util.misc import vtkGetDataRoot
VTK_DATA_ROOT = vtkGetDataRoot()
# create a rendering window and renderer
ren1 = vtk.vtkRenderer()
renWin = vtk.vtkRenderWindow()
renWin.AddRenderer(ren1)
renWin.StereoCapableWindowOn()
iren = vtk.vtkRenderWindowInteractor()
iren.SetRenderWindow(renWin)
reader = vtk.vtkGenericEnSightReader()
reader.SetCaseFileName("" + str(VTK_DATA_ROOT) + "/Data/EnSight/elements6-bin.case")
reader.UpdateInformation()
reader.GetOutputInformation(0).Set(vtk.vtkStreamingDemandDrivenPipeline.UPDATE_TIME_STEP(), 0.1)
geom = vtk.vtkGeometryFilter()
geom.SetInputConnection(reader.GetOutputPort())
mapper = vtk.vtkHierarchicalPolyDataMapper()
mapper.SetInputConnection(geom.GetOutputPort())
mapper.SetColorModeToMapScalars()
mapper.SetScalarModeToUsePointFieldData()
mapper.ColorByArrayComponent("pointTensors",0)
mapper.SetScalarRange(0,300)
actor = vtk.vtkActor()
actor.SetMapper(mapper)
# assign our actor to the renderer
ren1.AddActor(actor)
# enable user interface interactor
iren.Initialize()
renWin.Render()
# prevent the tk window from showing up then start the event loop
reader.SetDefaultExecutivePrototype(None)
# --- end of script --
#!/usr/bin/env python
import vtk
from vtk.test import Testing
from vtk.util.misc import vtkGetDataRoot
VTK_DATA_ROOT = vtkGetDataRoot()
# create a rendering window and renderer
ren1 = vtk.vtkRenderer()
renWin = vtk.vtkRenderWindow()
renWin.AddRenderer(ren1)
renWin.StereoCapableWindowOn()
iren = vtk.vtkRenderWindowInteractor()
iren.SetRenderWindow(renWin)
reader = vtk.vtkGenericEnSightReader()
# Make sure all algorithms use the composite data pipeline
cdp = vtk.vtkCompositeDataPipeline()
reader.SetDefaultExecutivePrototype(cdp)
reader.SetCaseFileName("" + str(VTK_DATA_ROOT) + "/Data/EnSight/elements-bin.case")
reader.UpdateInformation()
reader.GetOutputInformation(0).Set(vtk.vtkStreamingDemandDrivenPipeline.UPDATE_TIME_STEP(), 0.1)
geom0 = vtk.vtkGeometryFilter()
geom0.SetInputConnection(reader.GetOutputPort())
mapper0 = vtk.vtkHierarchicalPolyDataMapper()
mapper0.SetInputConnection(geom0.GetOutputPort())
mapper0.SetColorModeToMapScalars()
mapper0.SetScalarModeToUsePointFieldData()
mapper0.ColorByArrayComponent("pointTensors",0)
mapper0.SetScalarRange(0,112)
actor0 = vtk.vtkActor()
actor0.SetMapper(mapper0)
# assign our actor to the renderer
ren1.AddActor(actor0)
# enable user interface interactor
iren.Initialize()
# prevent the tk window from showing up then start the event loop
reader.SetDefaultExecutivePrototype(None)
# --- end of script --
9cc88acf19a07ffc67e0513fc929cf6f
8823270b2ddbf583e81c882c15cfc0e8
f1e6e469a355e8d497262242ba916786
ca4bce32a827d63809ba3cd70a01d149
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment