Yes that's it... You can read more on the ParaViewWeb wiki here: http://www.paraview.org/Wiki/ParaViewWeb_Plugins
On Mon, May 14, 2012 at 3:47 AM, Tuan Ha Tran <tuan-ha.t...@insa-lyon.fr> wrote: > Thank you Seb, > So, If I understand well, I will charge the file in 2 step, the first > one is to charge a file in plugin with "myPlugin.py", then use the plugin to > charge the file in ParaViewWeb? > So, in your reply > > > "def load(file): > return simple.OpenDataFile('/your-path/' + file)" > > the parameter ('nameOfFile.mhd') will be parsed directly to > OpenDataFile('/my-path/'+file) and become ('/my-path/nameOfFile.mhd') > I wonder if I'm right. Sorry for this question but I just want to be > sured. > > > ----- Original Message ----- > From: Sebastien Jourdain <sebastien.jourd...@kitware.com> > To: Tuan Ha Tran <tuan-ha.t...@insa-lyon.fr> > Cc: paraview@paraview.org > Sent: Fri, 11 May 2012 19:32:08 +0200 (CEST) > Subject: Re: [Paraview] OpenDataFile with ParaViewWeb JavaScript Console > > You can create your own python plugin that will append the proper path > in front of the provided name. > > === myPlugin.py === > from paraview import simple > > def load(file): > return simple.OpenDataFile('/your-path/' + file) > > ======= > > In JS you'll do something like that > > var plugin = paraview.getPlugin('myPlugin'); > var reader = plugin.load('NameOfFile.mhd'); > > But you should figure out why the server crashed by looking at the log > if you can. The full path should have worked. > > Seb > > On Fri, May 11, 2012 at 11:31 AM, Tuan Ha Tran > wrote: >> Hi everybody, >> I have a question to ask. I use ParaViewWeb JavaScript Console to load >> an image file to ParaViewWeb, I use the followed code "var reader >> =paraview.OpenDataFile({filename:"../NameOfFile"});" I tried with the >> absolute path of my PC (which is normally not the good solution) and get >> the >> "ServerDownException" >> So, if I want ParaViewWeb to look at in the web-apps of tomcat server, >> which path I have to use? As I know, if the file is in the same location >> as >> the PWConsole.war, we can access to it directly using >> {filename:"hola.mhd"} >> (for example) >> Anyone have an idea? >> Thank in advance. >> >> _______________________________________________ >> 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 >> >> Follow this link to subscribe/unsubscribe: >> http://www.paraview.org/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 Follow this link to subscribe/unsubscribe: http://www.paraview.org/mailman/listinfo/paraview