Giter VIP home page Giter VIP logo

nims's Introduction

NIMS: Neurobiological Image Management System

NIMS is a scientific data management system, specifically designed for neuroimaging data. It is implemented in Python, based on TurboGears. NIMS is open-source software, released under the MIT license (see below for details).

NIMS Development on Ubuntu 12.04

Set up a virtual python environment:

sudo apt-get install build-essential python-dev python-virtualenv python-numpy python-imaging python-h5py
virtualenv --system-site-packages tg2env
source tg2env/bin/activate

Install the TurboGears development tools:

easy_install -i http://tg.gy/current tg.devtools

Clone NIMS from GitHub and install its dependencies:

git clone [email protected]:cni/nims.git
cd nims
python setup.py develop
easy_install "repoze.what >= 1.0.8" "repoze.what-quickstart"

Optionally, add PostgreSQL and LDAP support:

sudo apt-get install postgresql-client libpq-dev
easy_install psycopg2

sudo apt-get install libldap2-dev libsasl2-dev
easy_install python-ldap

Generate a development database and start the paste web server:

paster setup-app development.ini --name=nimsgears
paster serve --reload development.ini

NIMS Deployment on Ubuntu Server 12.04 and Apache

Set up a virtual python environment:

apt-get install build-essential python-dev python-virtualenv php5 libapache2-mod-wsgi libapache2-webauth
virtualenv --system-site-packages /var/local/tg2env
source /var/local/tg2env/bin/activate

Clone NIMS from GitHub and install its dependencies:

easy_install -i http://tg.gy/current tg.devtools
git clone git://github.com/cni/nims.git /var/local/nims
cd !$
python setup.py develop

Add PostgreSQL and LDAP support:

apt-get install postgresql-client libpq-dev python-ldap
easy_install psycopg2

Generate the production database:

# first, obtain or create production.ini
paster setup-app production.ini

Configure and restart Apache:

ln -s $PWD/apache.conf /etc/apache2/conf.d/nims.conf
mkdir /var/cache/nims && chown www-data:www-data /var/cache/nims
service apache2 restart

Populating the Database

Once you have the NIMS web GUI running, you need to get your data into NIMS. We use various utilities to pull data from the MR scanner and insert it into NIMS. We use a suite of python scripts (various reapers, sorter.py, scheduler.py and processor.py, all in nimsproc) to do this. The reapers (dicomreaper.py, pfilereaper.py) copy data from the scanner and put it in the NIMS staging area. The sorter moves data from the staging area into the NIMS storage area and creates appropriate database entries. The scheduler finds new datasets in the database and schedules processing jobs for them. The processor executes the scheduled jobs. Some processing steps involve finding peripheral data files associated with the dataset, such as physio files. This is also where NIfTI creation happens and image pyramids are generated. All these tools have nice command-line help, so usage should be self-explanatory.

You also need to run a process to maintain the shadow filesystem, which is a view into the data files that provides human-friendly paths, which are based on the database (e.g., all datasets for an experiment "exp1" will appear in a directory called "exp1"). Each user gets their own shadow filesystem, and it allows them to have read-only access to the data through, e.g., scp. This shadow filesystem is rebuilt periodically to keep it in sync with the current DB structure (see nimsutil/symlinks.py).

We usually launch all these processes using screen, so that we can connect to the screen session from anywhere to check on them. We provide an example .screenrc file that launches all the processes in separate screens (run as "screen -c reaper.screenrc").

Data are automatically organized by the sorter using the PatientID field from DICOM files (or the analogous field in the raw MR data files). The format of the Patient ID string is PI_UID/experiment_name.

License

Copyright (c) 2012 Robert Dougherty

Copyright (c) 2012 Gunnar Schaefer

Copyright (c) 2012 Reno Bowen

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

nims's People

Contributors

rfdougherty avatar rfbowen avatar

Stargazers

Ariel Rokem avatar

Watchers

Ariel Rokem avatar James Cloos avatar

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.