MCPcopy Create free account
hub / github.com/Kitware/VTK / Test3

Function Test3

Filters/Parallel/Testing/Python/TestIntegrateAttributes.py:51–76  ·  view source on GitHub ↗
(datadir)

Source from the content-addressed store, hash-verified

49 assert (val > 1.999 and val < 2.01)
50
51def Test3(datadir):
52 reader = vtkDataSetReader()
53 reader.SetFileName(datadir + "/Data/blow.vtk")
54 reader.UpdateInformation();
55 reader.ReadAllScalarsOn()
56 reader.ReadAllVectorsOn()
57
58 dssf = vtkDataSetSurfaceFilter()
59 dssf.SetInputConnection(reader.GetOutputPort())
60
61 stripper = vtkStripper()
62 stripper.SetInputConnection(dssf.GetOutputPort())
63
64 f = vtkIntegrateAttributes()
65 f.SetInputConnection(stripper.GetOutputPort())
66 f.Update()
67
68 result = f.GetOutputDataObject(0)
69 val = result.GetPointData().GetArray("displacement1").GetValue(0)
70 assert (val > 463.64 and val < 463.642)
71
72 val = result.GetPointData().GetArray("thickness3").GetValue(0)
73 assert (val > 874.61 and val < 874.618)
74
75 val = result.GetCellData().GetArray("Area").GetValue(0)
76 assert (val > 1145.405 and val < 1145.415)
77
78Test1(VTK_DATA_ROOT)
79Test2(VTK_DATA_ROOT)

Callers 1

Calls 12

vtkStripperClass · 0.85
SetFileNameMethod · 0.45
UpdateInformationMethod · 0.45
SetInputConnectionMethod · 0.45
GetOutputPortMethod · 0.45
UpdateMethod · 0.45
GetOutputDataObjectMethod · 0.45
GetValueMethod · 0.45
GetArrayMethod · 0.45
GetPointDataMethod · 0.45
GetCellDataMethod · 0.45

Tested by

no test coverage detected