Giter VIP home page Giter VIP logo

nbpapaya's Introduction

UPDATE

This is old now. Use nilearn's plotting library for this!!

   from nilearn import plotting
   plotting.view_stat_map("/path/to/file")

README

Want to see 3D brain data in the IPython_ notebook? Now you can by using Papaya_, a Javascript library for viewing medical images in the browser, and this little bit of code.

Install

Clone this repository to your computer,

git clone https://github.com/akeshavan/nbpapaya

then add submodules

git submodule update --init --recursive

and run the setup script.

python setup.py install

Use

Open a new IPython_ notebook

from nbpapaya import Brain, clear_brain

Then show a brain:

Brain("/path/to/your/brain.nii",port=<your ipython notebook port. Default is 8888>)

Or show overlaid brains

Brain(["/path/to/brain1.nii","/path/to/brain2.nii"],8888)

You can play around with the color maps and intensity ranges on the Papaya_ javascript interface.

Also, some files are created in the directory of your notebook to make it work. When you're done, clean up:

clear_brain()

The file papaya_viewer.html and the papaya_data folder are deleted.

Troubleshoot

Things might go wrong because I wrote this quickly. If you don't see anything, make sure you called Brain with the correct port. If you did, make sure that papaya.js and papaya.css exist in ~/.ipython/profile_default/static/custom/. If nothing is there, move the files in there. Also email me: [email protected].

.. _IPython: http://ipython.org/notebook.html .. _Papaya: https://github.com/rii-mango/Papaya/

nbpapaya's People

Contributors

akeshavan avatar alexlicohen avatar kastman avatar ltirrell avatar mrbago avatar pandafulmanda avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

nbpapaya's Issues

License?

What is the license for this software? Also can a license file please be included? Thanks. :)

Multiple images overlap on a wrong way

Hello,

I have an issue using Brain(["/path/to/brain1.nii","/path/to/brain2.nii"],8888)
If my 'brain1.nii' is a T1 image, and 'brain2.nii' is functional, sometimes I get T1 on top of functional, and sometimes functional goes on top of T1. I've sent an issue request to Papaya, but they've said their scripts are designed to wait for the first image to load before loading the second one. Any ideas on what might have created such competition?

Unable to get nbpapaya working

Hi,
I cloned the repo, downloaded all the dependent git repos and did a python setup.py install. And placed papaya.js and papaya.css in ~/.jupyter/custom and ~/.ipython/profile_default/static/custom. I keep getting "404 page not found". I want to install nbpapaya on a server which has a lot of nifti images and go through them on a client. Therefore I start my jupyter with jupyter notebook --ip=<>.
Will appreciate if I get some tips on debugging and installing nbpapaya properly

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.