MCPcopy Create free account
hub / github.com/Kitware/ParaView / Pipeline

Class Pipeline

Examples/Catalyst/TemporalCacheExample/SampleScripts/timestats.py:15–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13def CreateCoProcessor():
14 def _CreatePipeline(coprocessor, datadescription):
15 class Pipeline:
16 # KEY POINT:
17 # Ask the coprocessor for a temporal producer instead of a normal one
18 # data = coprocessor.CreateProducer( datadescription, "volume" )
19 data = coprocessor.CreateTemporalProducer( datadescription, "volume" )
20
21 # write out each volume like you might do normally
22 imageDataWriter1 = servermanager.writers.XMLPImageDataWriter(Input=data)
23 coprocessor.RegisterWriter(imageDataWriter1, filename="tcache_pyex_{time}.pvti", freq=10)
24
25 # The fun part do something across timesteps
26 # We will output a temporal statistics volume every 10 frames
27 temporalStatistics1 = TemporalStatistics(Input=data)
28 imageDataWriter2 = servermanager.writers.XMLPImageDataWriter(Input=temporalStatistics1)
29 coprocessor.RegisterWriter(imageDataWriter2, filename="tcache_pyex_tstats_{time}.pvti", freq=10)
30
31 return Pipeline()
32

Callers 1

_CreatePipelineFunction · 0.70

Calls 2

RegisterWriterMethod · 0.80

Tested by

no test coverage detected