Is it possible to pass parameters to a Catalyst pipeline/script at runtime? For example, I’d like to be able to adjust the center of rotation of a view based on the size parameters in a simulation.
Of course, I can think of a hacky solution that involves copying the script to create a temporary file that I edit in my simulation code before creating the pipeline but I was wondering if there was a more elegant method.
Just bumping this topic as I think there should be an answer given that the old ParaView Catalyst Guide mentions that simulation developers can create “pre-configured ParaView Catalyst pipelines” (Section 2.1).
As a specific example, I’d like to make a general slice visualization Catalyst script which can automatically adjust where to slice (i.e. the center) based on the size of the grid in the simulation (which will vary depending on the simulation parameters/input deck). My Catalyst adaptor is Catalyst 1 based (since it’s an Overlapping AMR dataset). I believe the guide was written before Catalyst V2 scripts so don’t mind creating an old V1 script if that is what is required.
I am not entirely sure how this can be done with Catalyst 1.
Just for information sake, with Catalyst 2.0 adaptor, there are elegant ways. See CxxImageDataExample. You can use arguments (which are passed during initialization and remain unchanged during the execution) or parameters (which are passed per execute call). See the example code for changes needed to the adaptor to pass such args/params.
Alternatively, you can use things like environment variables too, os.getenv(...), if feasible. That may be a workable approach for Catalyst 1.0 too.