[Paraview] Embedding the Visualizer app in the browser within an iframe

Sebastien Jourdain sebastien.jourdain at kitware.com
Wed Jan 11 11:18:49 EST 2017


Thanks Claude,

Here is the add-on of what functions can be called on Visualizer. (All the
function with export)

https://github.com/Kitware/visualizer/blob/master/src/app.js

We are planning to add some helper for extracting arguments from the URL.
We actually add a class in the ParaViewWeb repo, but we haven't got to the
point of using it and making it available in visualizer.

Seb

On Wed, Jan 11, 2017 at 7:32 AM, claude <claude at theweak.link> wrote:

> Hi Debopam,
>
>
> I think there is one thing to consider first before taking care of data
> being passed through: if you manually start one instance of pvw-visualizer,
> it means all people connecting to port 8080 will see the same thing and act
> on the same viewer, which means potentially conflicting with each other
> action (e.g. a probable disconnection for everyone if one decide to exit
> maybe?). In that case, you need to have a virtual server that will launch a
> new process every time someone connect to port 8080. That way, all viewers
> are independent, the same person can open several viewers, etc.
>
>
> Now regarding the data being loaded at startup: you html index file should
> have a function grabbing the 'data' parameter from a URL, a form, a
> dropdown menu, etc. then sending it as a key to the Visualizer application
> (so that the launcher knows which file to load at startup).
>
> It would have been complicated to explain all the details in a email, so I
> made a gist with all the files and "code" addressing both points (launcher
> and data):
>
> https://gist.github.com/clavicule/7b8b3963ceb17302cff725f8dc36bc57
>
> Note that this gist was gathered info from the Paraview Web and Visualizer
> online documentations: kuddos to Paraview people.
> 2nd note: in that gist I'm giving the instructions for Apache server (you
> could technically choose any other, e.g. NGinx) for Linux.  I see you are
> on Windows: I don't know how Apache works on Windows but I assume (and
> hope) the steps and config file should be similar.
>
> I hope it helps! Good luck!
> cheers
> claude
>
>
>
>
> On 01/11/2017 04:10 AM, Debopam Ghoshal wrote:
>
> Hi,
>
> We have a requirement where our application will send a request to the
> paraview web server to render a specific file (which will be available in
> the data given directory) in the visualizer app, and this will be embedded
> within our application page as a iframe, whose source is the Visualizer
> app's index.html.
>
> We are using the pvpython.exe executable to start the paraview web server.
> The command used to start the server is:
>
> .\bin\pvpython.exe "C:\ParaView-5.2.0-Qt4-OpenGL2-MPI-Windows-64bit\
> share\paraview-5.2\web\visualizer\server\pvw-visualizer.py" --content
> "C:\ParaView-5.2.0-Qt4-OpenGL2-MPI-Windows-64bit\share\paraview-5.2\web\visualizer\www"
> --data "C:\ParaView-5.2.0-Qt4-OpenGL2-MPI-Windows-64bit\data" --port 8080
>
>
> From the command, we can see that the web content is being served from the
> C:\ParaView-5.2.0-Qt4-OpenGL2-MPI-Windows-64bit\share\paraview-5.2\web\
> visualizer\www directory. The index.html file uses the Visualizer.js script
> and calls the following functions:
>
> Visualizer.connect({ application: 'visualizer' });
> Visualizer.autoStopServer(10);
>
> Is there any way to find out the available functions in the Visualizer.js
> script and call them from our custom html file? What we intend to do is to
> update the index.html file and
> a. add a javascript function which will accept a filename to be rendered
> b. once the filename is received by this function, it will call the
> visualizer and display the specified file
> c. in the visualizer page, the open files tab should be hidden.
>
> Please let me know if you require any clarification.
>
> Cheers & Best Wishes,
> Debopam
> -------------------------------
>
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView
>
> Search the list archives at: http://markmail.org/search/?q=ParaView
>
> Follow this link to subscribe/unsubscribe:http://public.kitware.com/mailman/listinfo/paraview
>
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/
> opensource/opensource.html
>
> Please keep messages on-topic and check the ParaView Wiki at:
> http://paraview.org/Wiki/ParaView
>
> Search the list archives at: http://markmail.org/search/?q=ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/paraview
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20170111/aa3a03bb/attachment.html>


More information about the ParaView mailing list