self.registerParaViewWebProtocol(paraviewweb_protocols.ParaViewWebPipelineManager()) self.registerParaViewWebProtocol(paraviewweb_protocols.ParaViewWebRemoteConnection()) self.registerParaViewWebProtocol(paraviewweb_protocols.ParaViewWebFileManager(_PipelineManager.dataDir)) # Update authentication key to use self.updateSecret(_PipelineManager.authKey) # ============================================================================= # Main: Parse args and start server # ============================================================================= if __name__ == "__main__": # Create argument parser parser = argparse.ArgumentParser(description="ParaView/Web Pipeline Manager web-application") # Add default arguments web.add_arguments(parser) # Add local arguments parser.add_argument("--data-dir", default=os.getcwd(), help="path to data directory to list", dest="path") # Exctract arguments args = parser.parse_args() # Configure our current application _PipelineManager.authKey = args.authKey _PipelineManager.dataDir = args.path # Start server web.start_webserver(options=args, protocol=_PipelineManager)
nodeTree[path + "/" + filename] = child parent["children"].append(child) return rootNode # ============================================================================= # Main: Parse args and start server # ============================================================================= if __name__ == "__main__": # Create argument parser parser = argparse.ArgumentParser(description="ParaView/Web file loader web-application") # Add default arguments web.add_arguments(parser) # Add local arguments parser.add_argument("--file-to-load", help="path to data file to load", dest="data") parser.add_argument("--data-dir", default=os.getcwd(), help="path to data directory to list", dest="path") # Exctract arguments args = parser.parse_args() # Configure our current application _FileOpener.fileToLoad = args.data _FileOpener.pathToList = args.path _FileOpener.authKey = args.authKey # Start server web.start_webserver(options=args, protocol=_FileOpener)
if(self.scalarBar is not None): view.Representations.remove(self.scalarBar) self.scalarBar = simple.CreateScalarBar(Title=colorArrayName, LabelFontSize=12, Enabled=1, LookupTable=lut, TitleFontSize=12) view.Representations.append(self.scalarBar) self.rep.ColorArrayName = colorArrayName self.rep.LookupTable = lut simple.Render() if __name__ == "__main__": parser = argparse.ArgumentParser( description="Midas+ParaViewWeb application") web.add_arguments(parser) parser.add_argument("--width", default=400, help="width of the render window", dest="width") parser.add_argument("--height", default=400, help="height of the render window", dest="height") args = parser.parse_args() authKey = args.authKey width = args.width height = args.height initView(width, height) web.start_webserver(options=args, protocol=CosmoApp)
simple.GetAnimationScene().GoToPrevious() if oldTime != self.View.ViewTime: self.factory.dispatch("http://paraview.org/event#probeDataChanged", True) return True return False # ============================================================================= # Main: Parse args and start server # ============================================================================= if __name__ == "__main__": # Create argument parser parser = argparse.ArgumentParser(description="ParaView Web Data-Prober") # Add default arguments web.add_arguments(parser) # Add local arguments parser.add_argument("--data-dir", help="path to data directory", dest="path") # Exctract arguments args = parser.parse_args() # Configure our current application _DataProber.DataPath = args.path _DataProber.setupApplication() _DataProber.authKey = args.authKey # Start server web.start_webserver(options=args, protocol=_DataProber)
# Main: Parse args and start server # ============================================================================= if __name__ == "__main__": # Create argument parser parser = argparse.ArgumentParser( description="ParaView/Web file loader web-application") # Add default arguments web.add_arguments(parser) # Add local arguments parser.add_argument("--file-to-load", help="path to data file to load", dest="data") parser.add_argument("--data-dir", default=os.getcwd(), help="path to data directory to list", dest="path") # Exctract arguments args = parser.parse_args() # Configure our current application _FileOpener.fileToLoad = args.data _FileOpener.pathToList = args.path _FileOpener.authKey = args.authKey # Start server web.start_webserver(options=args, protocol=_FileOpener)
@exportRpc("listFiles") def listFiles(self): return ToggleFile.fileList @exportRpc("toggle") def toggle(self, name, visibility): if visibility: simple.Show(ToggleFile.proxyList[name]) else: simple.Hide(ToggleFile.proxyList[name]) if __name__ == "__main__": parser = argparse.ArgumentParser(description="ParaView/Web Toggle web-application") web.add_arguments(parser) parser.add_argument("--data-dir", default=os.getcwd(), help="path to data directory to list", dest="path") args = parser.parse_args() # Create file list ToggleFile.fileList = glob.glob(args.path + "/*.wrl") # Create proxy and representation for each file for file in ToggleFile.fileList: proxy = simple.OpenDataFile(file) ToggleFile.proxyList[file] = proxy rep = simple.Show(proxy) rep.DiffuseColor = [0.5, 0.1, 0.9] simple.Render() web.start_webserver(options=args, protocol=ToggleFile)