Skip to content

Commit

Permalink
Merge pull request #149 from anilbey/nwbview
Browse files Browse the repository at this point in the history
add nwbview
  • Loading branch information
oruebel committed Feb 10, 2024
2 parents 63456c1 + 85378f7 commit fdba5a1
Show file tree
Hide file tree
Showing 5 changed files with 95 additions and 1 deletion.
7 changes: 6 additions & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,10 @@
'titles_only': False
}

# these links cannot be checked in github actions
linkcheck_ignore = [
"https://crates.io/crates/nwbview",
]

# -- Build the nwb project analytics in the current directory
build_project_analytics(target_dir=os.path.dirname(__file__))
build_project_analytics(target_dir=os.path.dirname(__file__))
14 changes: 14 additions & 0 deletions docs/source/tools/analysis_tools_home.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Analysis and Visualization Tools
nwbwidgets/nwbwidgets
neurosift/neurosift
nwbexplorer/nwbexplorer
nwbview/nwbview
hdftools/hdftools
spikeinterface/spikeinterface
cellexplorer/cellexplorer
Expand Down Expand Up @@ -87,6 +88,19 @@ Exploring NWB Files
<br/>
<br/>

.. image:: nwbview/nwbview-icon.png
:class: align-left
:width: 180

.. include:: nwbview/nwbview.rst
:start-after: .. short_description_start
:end-before: .. short_description_end

.. raw:: html

<br/>
<br/>

.. image:: hdftools/jupyterlab_h5web_nwb_example.png
:class: align-left
:width: 180
Expand Down
Binary file added docs/source/tools/nwbview/nwbview-icon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/source/tools/nwbview/nwbview-screenshot.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
75 changes: 75 additions & 0 deletions docs/source/tools/nwbview/nwbview.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
.. _analysistools-nwbview:


Nwbview
------------

.. image:: nwbview-icon.png
:class: align-left
:width: 100


.. short_description_start
:ref:`analysistools-nwbview` is a cross-platform software with a graphical user interface to display the contents of the binary NWB file format. It is written in Rust for high-performance, memory safety and ease of deployment.
Its features include the ability to display the contents of the NWB file in a tree structure. It displays voltage and current recordings data in interactive plots. The tabular data or the text data present in the NWB can be displayed in a scalable window.
:bdg-link-primary:`Docs <https://crates.io/crates/nwbview>` :bdg-link-primary:`Source <https://github.com/brainhack-ch/nwbview>`.

.. short_description_end
.. raw:: html

<br/>
<br/>
<br/>

The screenshot below shows the `nwbview` GUI. The left panel shows the contents of the NWB file in a tree structure. The right panel shows the details of the selected item, which can be a plot, a table or a text.

.. image:: nwbview-screenshot.png
:class: align-left
:width: 800

`nwbview` uses the `egui <https://github.com/emilk/egui>`_ Rust GUI library for rendering.


To install and run using cargo
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Cargo is the package manager for Rust, and `nwbview` is listed as a package there. You can find it on `crates.io <https://crates.io/crates/nwbview>`_.


**Note:** HDF5 needs to be installed in your system as cargo will try to locate the HDF5 root directory and/or headers.

First install the `cargo` package manager and then run the following command to install `nwbview`.

.. code-block:: shell
cargo install nwbview
Once you completed the installation, simply type `nwbview` on the console to run it.

.. code-block:: shell
nwbview
To build and run from the source code
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The Rust library dependencies are provided in the `cargo.toml` file.

Note that the Rust libraries depend on the following system packages that need to be provided.

* `libgtk-3-dev`
* `librust-atk-dev`
* `libhdf5-serial-dev`

The exact names of the packages may differ between systems.

Once all the dependencies are satisfied, go to the directory containing `cargo.toml` and run the following command.

.. code-block:: shell
cargo run --release
The release flag builds the artifacts with optimizations. Do not specify it when you need to debug.

0 comments on commit fdba5a1

Please sign in to comment.