Giter Club home page Giter Club logo

paraview-glance-py's Introduction

paraview-glance-py

Build Status

This is built off of ParaView Glance.

Installation

Download the stand-alone executable:

Operating System Executable
Linux paraview-glance-py.linux.x86_64
macOS paraview-glance-py.macos.x86_64
Windows paraview-glance-py.windows.x86_64.exe

Usage

Run the executable. A new tab will open in your web browser with the application user interface.

Development

Build

This has only been tested with python3.

$ git clone [email protected]:KitwareMedical/paraview-glance-py.git
$ cd paraview-glance-py/
$ npm install
$ npm run build:release
$ cd server/
$ pip install -r requirements.txt

To build a standalone executable:

$ pip install pyinstaller

On Windows, also install pywin32:

$ pip install pywin32

Then package as a directory:

$ pyinstaller build/paraview-glance-py.spec

Or as a single file:

$ pyinstaller build/paraview-glance-py-onefile.spec

Run

Simply run the resultant executable dist/paraview-glance-py/paraview-glance-py.

Run web and server separately

For dev purposes, it is better to run the web and server as separate instances for debugging.

In one terminal, build the development version of the webapp:

$ cd paraview-glance-py/
$ npm run dev

In another terminal, run the server.

$ cd paraview-glance-py/server
$ python server.py --port 8181 --no-browser

After the python server starts up, visit http://localhost:9999/?wsServer=ws://localhost:8181/ws to view the webapp. If you get a blank screen, try clearing cache and then refreshing.

Troubleshooting

Library issues when running (linux)

For the prebuilt binaries, this is likely due to the automated build environment using a different version of certain libraries. The easiest workaround is to follow the instructions under "Development" above and build the application locally so pyinstaller can link against local libraries.

The application is still running after closing the tab

Right now the server is set to self-terminate after 5 minutes. Either kill the application manually or wait 5 minutes for the application to self-terminate. Multiple instances of the application will not interfere with one another.

paraview-glance-py's People

Contributors

aylward avatar floryst avatar jourdain avatar psavery avatar thewtex avatar zachmullen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

paraview-glance-py's Issues

How to make the built webapp working with the server?

Hi,

I'm trying to build code, and I'm having troubles trying to use it with python server.
To built and start web and server instances, I followed instructions from documentation (and did not built a standalone executable)

Once server started (with python server.py), I have access to the web page at http://localhost:9999/ but the process step does not work and I'm guessing it is because no server is found.
Moreover, once server starts, it directly opens http://localhost:41692/?wsServer=ws://localhost:41692/ws . The front of this page is not the same than the one at http://localhost:9999/ and here, I can run the process step.

How can I make the server works with the built webapp ?

Thanks,

Error when executing remote tasks

Here is the error I got when executing remote tasks:

"ValueError('cannot reshape array of size 8388616 into shape (128,256,256)')"
"Traceback (most recent call last):
  File "site-packages\wslink\websocket.py", line 370, in onMessage
  File "helper2.py", line 14, in handler
  File "helper2.py", line 53, in rewrite_args
  File "serializable.py", line 39, in recurse
  File "serializable.py", line 36, in replacer
  File "serializable.py", line 30, in replace
  File "transformers.py", line 203, in vtk_to_itk_image
  File "site-packages\numpy\core\fromnumeric.py", line 292, in reshape
  File "site-packages\numpy\core\fromnumeric.py", line 56, in _wrapfunc
ValueError: cannot reshape array of size 8388616 into shape (128,256,256)
"

I use Engine.vti and itk 5.1.0

Default server port not correct - two ports are relevant

Lines 59 and 60 of server.py are incorrect:

wsurl = 'ws://{host}:{port}/ws'.format(host=host, port=port)

There are two ports that need to be recorded and reported to start the web and compute servers. The http:localhost:{port} that is running the webserver hosting the paraviewglance webpage and the ws:{port} that hosts the paraview server. Via lines 59 and 60, the program reports:

C:\src\ParaView-Glance-Py\server>python server.py --port 8181 --no-browser
Namespace(host='localhost', no_browser=True, port='8181')
If the browser doesn't open, navigate to: http://localhost:8181/?wsServer=ws://localhost:8181/ws
wslink: Starting factory
CRITICAL:twisted:wslink: Starting factory

This is wrong. The first instance of {port} should be 9999, in this case. The 8181 port is correct.

Hope this helps,
s

ITK / numpy errors on master

With itk 5.2, I got the following errors:

python server.py --port 8181 --no-browser
Traceback (most recent call last):
  File "server.py", line 11, in <module>
    from hello_world import AlgorithmApi
  File "C:\Work\ParaViewGlance\paraview-glance-py\server\hello_world.py", line 2, in <module>
    import itk
  File "C:\Work\ParaViewGlance\paraview-glance-py\env\lib\site-packages\itk\__init__.py", line 28, in <module>
    from itk.support.extras import *
  File "C:\Work\ParaViewGlance\paraview-glance-py\env\lib\site-packages\itk\support\extras.py", line 25, in <module>
    from numpy.typing import ArrayLike
  File "C:\Work\ParaViewGlance\paraview-glance-py\env\lib\site-packages\numpy\typing\__init__.py", line 315, in <module>
    from ._shape import _Shape, _ShapeLike
  File "C:\Work\ParaViewGlance\paraview-glance-py\env\lib\site-packages\numpy\typing\_shape.py", line 15, in <module>
    _ShapeLike = Union[SupportsIndex, Sequence[SupportsIndex]]
  File "C:\work\Python\Python374\lib\typing.py", line 254, in inner
    return func(*args, **kwds)
  File "C:\work\Python\Python374\lib\typing.py", line 629, in __getitem__
    params = tuple(_type_check(p, msg) for p in params)
  File "C:\work\Python\Python374\lib\typing.py", line 629, in <genexpr>
    params = tuple(_type_check(p, msg) for p in params)
  File "C:\work\Python\Python374\lib\typing.py", line 142, in _type_check
    raise TypeError(f"{msg} Got {arg!r:.100}.")
TypeError: Parameters to generic types must be types. Got NotImplemented.

Release URLs are dead

In the project Readme, the URLs to download the stand-alone executables are dead.
Github stores other releases (suffixed with vessel) but I'm not sure if they are supposed to be the same.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.