web.helper Module¶
web_helper is a module that provides access to functions that helps to build new protocols and process ParaView data structure into web friendly ones.
- class paraview.web.helper.Pipeline(name)[source]¶
Bases:
object
Define a data structure that represent a pipeline as a tree. This provide also methods to get the data structure for the web environment
- paraview.web.helper.getParentProxyId(proxy)[source]¶
Return ‘0’ if the given proxy has no Input otherwise will return the parent proxy id as a String.
- paraview.web.helper.getProxyAsPipelineNode(id, view=None)[source]¶
Create a representation for that proxy so it can be used within a pipeline browser.
- paraview.web.helper.getProxyAsState(id)[source]¶
Return a json representation of the given proxy state.
- Example of the state of the Clip filter
- {
proxy_id: 234, ClipType: {
proxy_id: 235, Normal: [0,0,1], Origin: [0,0,0], InsideOut: 0
}
}
- paraview.web.helper.getProxyDomains(id)[source]¶
Return a json based structured based on the proxy XML.
- paraview.web.helper.listFiles(pathToList)[source]¶
Create a tree structure of the given directory that will be understand by the pipelineBrowser widget. The provided path should not have a trailing ‘/’.
- return {
- children: [
{ name: ‘fileName.vtk’, path: ‘/full_path/to_file/fileName.vtk’ }, { name: ‘directoryName’, path: ‘/full_path/to_file/directoryName’, children: [] }
]
}