NiftyOne is a platform for bulk visualization of large-scale neuroimaging datasets. It is built with FiftyOne.
1. Install conda For stability, NiftyOne should be installed in it's own environment. For example,
conda create -y -n niftyone python=3.10
conda activate niftyone
pip install -U pip
pip install git+https://github.com/cmi-dair/niftyone.git
- Install datalad to download the data files
- You can use whatever BIDS dataset (such as ds000102 from OpenNeuro) as an example to test
niftyone bids_dir output_dir participant --workers 8
niftyone app launch
niftyone bids_dir output_dir participant --workers 8
niftyone bids_dir output_dir group
niftyone bids_dir output_dir launch
from a Mac/Linux/Windows Powershell terminal:
e.g. interact
At this point you should see "App Launched" in your terminal with a localhost URL.
Open a second terminal.
Execute the following command to create a multihop port forward from your local machine --> login node --> compute node. Related gist
HOST=(name of compute node, not the full address. e.g. r001) PORT=5151
ssh -L $PORT:localhost:$PORT [email protected] ssh -L $PORT:localhost:$PORT -N $HOST
5) Open http://localhost:5151 on your local browser to check the app.
https://superuser.com/questions/1154383/ssh-port-forwarding-on-windows
https://phoenixnap.com/kb/ssh-port-forwarding
NiftyOne can be installed both locally and on a remote server. If NiftyOne is installed on a server, the output can be viewed from a local web browser after port fowarding.
Try testing with a simple HTTP server with a "Hello World" HTML file using port fowarding to rule out any networking problems before installing further software.
$python3 -m http.server 9000
/home/user/.../mongod: error while loading shared libraries
Try re-installing mongo and re-creating the virtual conda environment.
OSError: You must have fiftyone>=0.22.1 installed in order to migrate from v0.22.1 to v0.21.6, but you are currently running fiftyone==0.21.6.
Try re-installing fiftyone / niftyone
Try incrementing to port 5152, 5153, etc