Module that looks at a ParaView pipeline and automatically creates a cinema store that ranges over all of the variables that we know how to control and later show.
paraview.cinemaIO.pv_introspect.
add_control_and_colors
(name, cs, userDefined)[source]¶add parameters that change the settings and color of a filter
paraview.cinemaIO.pv_introspect.
add_customized_array_selection
(sourceName, source, fields, ranges, userDefined)[source]¶paraview.cinemaIO.pv_introspect.
add_filter_value
(name, cs, userDefinedValues)[source]¶creates controls for the filters that we know how to manipulate
paraview.cinemaIO.pv_introspect.
explore
(cs, proxies, iSave=True, currentTime=None, userDefined={}, specLevel='A', camType='phi-theta', tracking={}, floatValues=True)[source]¶Runs a pipeline through all the changes we know how to make and saves off images into the store for each one.
paraview.cinemaIO.pv_introspect.
explore_customized_array_selection
(sourceName, source, colorList, userDefined)[source]¶paraview.cinemaIO.pv_introspect.
export_scene
(baseDirName, viewSelection, trackSelection, arraySelection)[source]¶This explores a set of user-defined views and tracks. export_scene is called from vtkCinemaExport. The expected order of parameters is as follows:
Directory of the form {‘ViewName’ : [parameters], ...}, with parameters defined in the order: Image filename, freq, fittoscreen, magnification, width, height, cinema).
Directory of the form {‘FilterName’ : [v1, v2, v3], ...}
Directory of the form {‘FilterName’ : [‘arrayName1’, ‘arrayName2’, ...], ... }
Note: baseDirName is used as the parent directory of the database generated for each view in viewSelection. ‘Image filename’ is used as the database directory name.
paraview.cinemaIO.pv_introspect.
filter_has_parameters
(name)[source]¶see if this proxy is one we know how to make controls for
paraview.cinemaIO.pv_introspect.
float_limiter
(x)[source]¶a shame, but needed to make sure python, javascript and (directory/file)name agree. TODO: This can go away now that we use name=index instead of name=value filenames.
paraview.cinemaIO.pv_introspect.
inspect
(skip_invisible=True)[source]¶Produces a representation of the pipeline that is easier to work with. Thanks Scott Wittenburg and the pv mailing list for this gem
paraview.cinemaIO.pv_introspect.
make_cinema_store
(proxies, ocsfname, view, forcetime=False, userDefined={}, specLevel='A', camType='phi-theta')[source]¶Takes in the pipeline, structured as a tree, and makes a cinema store definition containing all the parameters we will vary.
paraview.cinemaIO.pv_introspect.
make_workspace_file
(basedirname, cinema_dirs)[source]¶This writes out the top level json file that says that there are child cinema stores inside. The viewer sees this and opens up in the children in separate panels.
paraview.cinemaIO.pv_introspect.
max_bounds
()[source]¶returns conservative min and max (over x y and z) bounds
paraview.cinemaIO.pv_introspect.
prepare_selection
(trackSelection, arraySelection)[source]¶The rest of pv_introspect expects to receive user-defined values in the structure:
This structure is necessary for catalyst to correctly reference the created proxies. Although this is not necessary in the menu->export case (proxies could be accessed by name directly), we comply for compatibility.
paraview.cinemaIO.pv_introspect.
project_to_at
(eye, fp, cr)[source]¶project center of rotation onto focal point to keep gaze direction the same while allowing both translate and zoom in and out to work
paraview.cinemaIO.pv_introspect.
record_visibility
()[source]¶at start of run, record the current paraview state so we can return to it