-
Notifications
You must be signed in to change notification settings - Fork 2
cmusatyalab/optviewer
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
OPT viewer ========== This is a web-browser based viewer for 3d datasets that are stored as stacks of images. Most of the logic is implemented in client-side javascript so it is possible to run this using a webserver that only serves static content. However for quick setup and testing it is also possible to run this from a small Flask webapp that pulls image data directly from unmodified dataset Zip archive files. Installation using the Flask web application -------------------------------------------- Setup a virtualenv with the necessary dependencies and run the webapp, # (apt-get or yum) install python-virtualenv $ virtualenv env $ env/bin/pip install -r requirements.txt Update IMAGE_NAME in flaskapp.py to export data from zip archives in the current folder that are named, <IMAGE_NAME>_Sagittal.zip <IMAGE_NAME>_Coronal.zip <IMAGE_NAME>_Transverse.zip Start the Flask web application $ env/bin/python flaskapp.py runserver Now you should be able to point your webbrowser at http://localhost:5000/ and view the dataset. Installation using static files ------------------------------- Setup the Flask web application and run $ env/bin/python flaskapp.py make_static_site <path> This will extract the datasets archives to <path>/<IMAGE_NAME>, copy the javascript and image resources and renders the template to <path>/index.html. If you want to relocate the image data it is possible to set optview.urls to the appropriate values using FRAMEn to mark the location of the frame number. f.i. FRAME3 will be replaced by a frame number that is padded to a 3-digit number (i.e. 000, 001, etc). Available substitutions in the urls are NAME, PLANE and FRAME1 through FRAME9. for instance optview = { name: "asset", urls: { 'sagittal': "NAME/1FRAME5.png", 'coronal': "NAME/2FRAME5.png", 'transverse': "NAME/3FRAME5.png", } }
About
Web viewer for 3D data in image stacks
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published