def initialize(self): # Bring used components self.registerVtkWebProtocol( pv_protocols.ParaViewWebStartupRemoteConnection( _TestServer.dsHost, _TestServer.dsPort, _TestServer.rsHost, _TestServer.rsPort, _TestServer.rcPort)) self.registerVtkWebProtocol( pv_protocols.ParaViewWebStartupPluginLoader(_TestServer.plugins)) self.registerVtkWebProtocol( pv_protocols.ParaViewWebFileListing(_TestServer.dataDir, "Home", _TestServer.excludeRegex, _TestServer.groupRegex)) self.registerVtkWebProtocol( pv_protocols.ParaViewWebProxyManager( allowedProxiesFile=_TestServer.proxies, baseDir=_TestServer.dataDir, fileToLoad=_TestServer.fileToLoad, allowUnconfiguredReaders=_TestServer.allReaders)) self.registerVtkWebProtocol( pv_protocols.ParaViewWebColorManager( pathToColorMaps=_TestServer.colorPalette)) self.registerVtkWebProtocol(pv_protocols.ParaViewWebMouseHandler()) self.registerVtkWebProtocol( pv_protocols.ParaViewWebViewPort() ) # _TestServer.viewportScale, _TestServer.viewportMaxWidth, _TestServer.viewportMaxHeight self.registerVtkWebProtocol( pv_protocols.ParaViewWebViewPortImageDelivery()) self.registerVtkWebProtocol( pv_protocols.ParaViewWebViewPortGeometryDelivery()) self.registerVtkWebProtocol(pv_protocols.ParaViewWebTimeHandler()) self.registerVtkWebProtocol(pv_protocols.ParaViewWebSelectionHandler()) self.registerVtkWebProtocol(pv_protocols.ParaViewWebWidgetManager()) self.registerVtkWebProtocol( pv_protocols.ParaViewWebKeyValuePairStore()) self.registerVtkWebProtocol( pv_protocols.ParaViewWebSaveData( baseSavePath=_TestServer.saveDataDir)) # Update authentication key to use self.updateSecret(_TestServer.authKey)
def initialize(self): # Bring used components self.registerVtkWebProtocol(pv_protocols.ParaViewWebFileListing(_VisualizerServer.dataDir, "Home", _VisualizerServer.excludeRegex, _VisualizerServer.groupRegex)) self.registerVtkWebProtocol(pv_protocols.ParaViewWebProxyManager(baseDir=_VisualizerServer.dataDir, allowUnconfiguredReaders=_VisualizerServer.allReaders)) self.registerVtkWebProtocol(pv_protocols.ParaViewWebColorManager()) self.registerVtkWebProtocol(pv_protocols.ParaViewWebMouseHandler()) self.registerVtkWebProtocol(pv_protocols.ParaViewWebViewPort(_VisualizerServer.viewportScale, _VisualizerServer.viewportMaxWidth, _VisualizerServer.viewportMaxHeight)) self.registerVtkWebProtocol(pv_protocols.ParaViewWebViewPortImageDelivery()) self.registerVtkWebProtocol(pv_protocols.ParaViewWebViewPortGeometryDelivery()) self.registerVtkWebProtocol(pv_protocols.ParaViewWebTimeHandler()) self.registerVtkWebProtocol(pv_protocols.ParaViewWebSelectionHandler()) self.registerVtkWebProtocol(pv_protocols.ParaViewWebWidgetManager()) self.registerVtkWebProtocol(pv_protocols.ParaViewWebKeyValuePairStore()) self.registerVtkWebProtocol(pv_protocols.ParaViewWebSaveData(baseSavePath=_VisualizerServer.dataDir)) # Disable interactor-based render calls simple.GetRenderView().EnableRenderOnInteraction = 0 simple.GetRenderView().Background = [0,0,0] # Update interaction mode pxm = simple.servermanager.ProxyManager() interactionProxy = pxm.GetProxy('settings', 'RenderViewInteractionSettings') interactionProxy.Camera3DManipulators = ['Rotate', 'Pan', 'Zoom', 'Pan', 'Roll', 'Pan', 'Zoom', 'Rotate', 'Zoom']
def initialize(self): # Bring used components self.registerVtkWebProtocol( pv_protocols.ParaViewWebStartupRemoteConnection( _VisualizerServer.dsHost, _VisualizerServer.dsPort, _VisualizerServer.rsHost, _VisualizerServer.rsPort)) self.registerVtkWebProtocol( pv_protocols.ParaViewWebStartupPluginLoader( _VisualizerServer.plugins)) self.registerVtkWebProtocol( pv_protocols.ParaViewWebStateLoader(_VisualizerServer.fileToLoad)) self.registerVtkWebProtocol( pv_protocols.ParaViewWebFileListing(_VisualizerServer.dataDir, "Home", _VisualizerServer.excludeRegex, _VisualizerServer.groupRegex)) self.registerVtkWebProtocol( pv_protocols.ParaViewWebProxyManager( allowedProxiesFile=_VisualizerServer.proxies, baseDir=_VisualizerServer.dataDir, allowUnconfiguredReaders=_VisualizerServer.allReaders)) self.registerVtkWebProtocol( pv_protocols.ParaViewWebColorManager( pathToColorMaps=_VisualizerServer.colorPalette)) self.registerVtkWebProtocol(pv_protocols.ParaViewWebMouseHandler()) self.registerVtkWebProtocol(pv_protocols.ParaViewWebViewPort()) self.registerVtkWebProtocol( pv_protocols.ParaViewWebViewPortImageDelivery()) self.registerVtkWebProtocol( pv_protocols.ParaViewWebViewPortGeometryDelivery()) self.registerVtkWebProtocol(pv_protocols.ParaViewWebTimeHandler()) self.registerVtkWebProtocol(pv_protocols.ParaViewWebSelectionHandler()) self.registerVtkWebProtocol(pv_protocols.ParaViewWebWidgetManager()) # Update authentication key to use self.updateSecret(_VisualizerServer.authKey)
def initialize(self): # Bring used components self.registerVtkWebProtocol( pv_protocols.ParaViewWebStartupRemoteConnection( _PipelineManager.dsHost, _PipelineManager.dsPort, _PipelineManager.rsHost, _PipelineManager.rsPort)) self.registerVtkWebProtocol( pv_protocols.ParaViewWebStartupPluginLoader( _PipelineManager.plugins)) self.registerVtkWebProtocol( pv_protocols.ParaViewWebStateLoader(_PipelineManager.fileToLoad)) self.registerVtkWebProtocol( pv_protocols.ParaViewWebFileListing(_PipelineManager.dataDir, "Home", _PipelineManager.excludeRegex, _PipelineManager.groupRegex)) self.registerVtkWebProtocol( pv_protocols.ParaViewWebPipelineManager( _PipelineManager.dataDir, _PipelineManager.fileToLoad)) self.registerVtkWebProtocol( pv_protocols.ParaViewWebFilterList(_PipelineManager.filterFile)) self.registerVtkWebProtocol(pv_protocols.ParaViewWebMouseHandler()) self.registerVtkWebProtocol(pv_protocols.ParaViewWebViewPort()) self.registerVtkWebProtocol( pv_protocols.ParaViewWebViewPortImageDelivery()) self.registerVtkWebProtocol( pv_protocols.ParaViewWebViewPortGeometryDelivery()) self.registerVtkWebProtocol(pv_protocols.ParaViewWebTimeHandler()) self.registerVtkWebProtocol(pv_protocols.ParaViewWebRemoteConnection()) self.registerVtkWebProtocol( pv_protocols.ParaViewWebFileManager(_PipelineManager.dataDir)) self.registerVtkWebProtocol(pv_protocols.ParaViewWebSelectionHandler()) self.registerVtkWebProtocol(pv_protocols.ParaViewWebWidgetManager()) # Update authentication key to use self.updateSecret(_PipelineManager.authKey)
def initialize(self): # Bring used components from ParaView self.registerVtkWebProtocol( pv_protocols.ParaViewWebStartupRemoteConnection( _Server.dsHost, _Server.dsPort, _Server.rsHost, _Server.rsPort, _Server.rcPort)) self.registerVtkWebProtocol( pv_protocols.ParaViewWebStartupPluginLoader(_Server.plugins)) self.registerVtkWebProtocol( pv_protocols.ParaViewWebFileListing(_Server.dataDir, "Home", _Server.excludeRegex, _Server.groupRegex)) self.registerVtkWebProtocol( pv_protocols.ParaViewWebProxyManager( allowedProxiesFile=_Server.proxies, baseDir=_Server.dataDir, fileToLoad=_Server.fileToLoad, allowUnconfiguredReaders=_Server.allReaders)) self.registerVtkWebProtocol( pv_protocols.ParaViewWebColorManager( pathToColorMaps=_Server.colorPalette, showBuiltin=_Server.showBuiltin)) self.registerVtkWebProtocol(pv_protocols.ParaViewWebMouseHandler()) self.registerVtkWebProtocol( pv_protocols.ParaViewWebViewPort(_Server.viewportScale, _Server.viewportMaxWidth, _Server.viewportMaxHeight)) self.registerVtkWebProtocol( pv_protocols.ParaViewWebPublishImageDelivery(decode=False)) self.registerVtkWebProtocol(pv_protocols.ParaViewWebTimeHandler()) self.registerVtkWebProtocol(pv_protocols.ParaViewWebSelectionHandler()) self.registerVtkWebProtocol(pv_protocols.ParaViewWebWidgetManager()) self.registerVtkWebProtocol( pv_protocols.ParaViewWebKeyValuePairStore()) self.registerVtkWebProtocol( pv_protocols.ParaViewWebSaveData(baseSavePath=_Server.saveDataDir)) # Bring used components from ParaView Lite self.registerVtkWebProtocol(local_protocols.ParaViewLite()) # Update authentication key to use self.updateSecret(_Server.authKey) # tell the C++ web app to use no encoding. ParaViewWebPublishImageDelivery must be set to decode=False to match. self.getApplication().SetImageEncoding(0) # Disable interactor-based render calls view = simple.GetRenderView() view.EnableRenderOnInteraction = 0 view.Background = [ 0.4470588235294118, 0.4470588235294118, 0.4470588235294118 ] view.Background2 = [ 0.2235294117647059, 0.2235294117647059, 0.2235294117647059 ] view.UseGradientBackground = 1 view.OrientationAxesVisibility = 0 # ProxyManager helper pxm = simple.servermanager.ProxyManager() # Update interaction mode interactionProxy = pxm.GetProxy('settings', 'RenderViewInteractionSettings') interactionProxy.Camera3DManipulators = [ 'Rotate', 'Pan', 'Zoom', 'Pan', 'Roll', 'Pan', 'Zoom', 'Rotate', 'Zoom' ] # Custom rendering settings renderingSettings = pxm.GetProxy('settings', 'RenderViewSettings') renderingSettings.LODThreshold = _Server.settingsLODThreshold
def initialize(self): # Bring used components self.registerVtkWebProtocol( paraViewWebProtocols.ParaViewWebStartupRemoteConnection( RenderingServer.dsHost, RenderingServer.dsPort, RenderingServer.rsHost, RenderingServer.rsPort, RenderingServer.rcPort)) self.registerVtkWebProtocol( paraViewWebProtocols.ParaViewWebStartupPluginLoader( RenderingServer.plugins)) self.registerVtkWebProtocol( paraViewWebProtocols.ParaViewWebProxyManager( allowedProxiesFile=RenderingServer.proxies, baseDir=RenderingServer.dataDirectoryPath, fileToLoad=RenderingServer.fileToLoad, allowUnconfiguredReaders=RenderingServer.allReaders)) self.registerVtkWebProtocol( paraViewWebProtocols.ParaViewWebMouseHandler()) self.registerVtkWebProtocol( paraViewWebProtocols.ParaViewWebViewPort( RenderingServer.viewportScale, RenderingServer.viewportMaxWidth, RenderingServer.viewportMaxHeight)) self.registerVtkWebProtocol( paraViewWebProtocols.ParaViewWebPublishImageDelivery(decode=False)) self.registerVtkWebProtocol( paraViewWebProtocols.ParaViewWebLocalRendering()) self.registerVtkWebProtocol( paraViewWebProtocols.ParaViewWebTimeHandler()) self.registerVtkWebProtocol( paraViewWebProtocols.ParaViewWebSelectionHandler()) self.registerVtkWebProtocol( paraViewWebProtocols.ParaViewWebWidgetManager()) self.registerVtkWebProtocol( paraViewWebProtocols.ParaViewWebKeyValuePairStore()) # self.registerVtkWebProtocol(paraViewWebProtocols.ParaViewWebSaveData(baseSavePath=RenderingServer.saveDataDir)) # Disabled # self.registerVtkWebProtocol(paraViewWebProtocols.ParaViewWebProgressUpdate()) # Not fully working yet # Initialize Viewer protocols print('Initializing Viewer protocols') self.registerVtkWebProtocol( Viewer(self.dataDirectoryPath, self.dataLoadSignatureDecoder)) # Update authentication key to use self.updateSecret(RenderingServer.authKey) # Tell the C++ web app to use no encoding. ParaViewWebPublishImageDelivery must be set to decode=False to match. self.getApplication().SetImageEncoding(0) # Disable interactor-based render calls simple.GetRenderView().EnableRenderOnInteraction = 0 simple.GetRenderView().Background = [0, 0, 0] # ProxyManager helper proxyManager = simple.servermanager.ProxyManager() # Update interaction mode interactionProxy = proxyManager.GetProxy( 'settings', 'RenderViewInteractionSettings') interactionProxy.Camera3DManipulators = [ 'Rotate', 'Pan', 'Zoom', 'Pan', 'Roll', 'Pan', 'Zoom', 'Rotate', 'Zoom' ] # Custom rendering settings renderingSettings = proxyManager.GetProxy('settings', 'RenderViewSettings') renderingSettings.LODThreshold = RenderingServer.settingsLODThreshold print('-------')