.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/webgl/static.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note Click :ref:`here ` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr_auto_examples_webgl_static.py: ====================== Create a static viewer ====================== A static viewer is a brain viewer that exists permanently on a filesystem The viewer is stored in a directory that stores html, javascript, data, etc The viewer directory must be hosted by a server such as nginx .. GENERATED FROM PYTHON SOURCE LINES 12-28 .. code-block:: default import cortex import numpy as np np.random.seed(1234) # gather data Volume volume = cortex.Volume.random(subject='S1', xfmname='fullhead') # select path for static viewer on disk viewer_path = '/path/to/store/viewer' # create viewer cortex.webgl.make_static(outpath=viewer_path, data=volume, recache=True) # a webserver such as nginx can then be used to host the static viewer .. rst-class:: sphx-glr-timing **Total running time of the script:** ( 0 minutes 0.000 seconds) .. _sphx_glr_download_auto_examples_webgl_static.py: .. only :: html .. container:: sphx-glr-footer :class: sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: static.py ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: static.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_