GithubHelp home page GithubHelp logo

ltirrell / nbpapaya Goto Github PK

View Code? Open in Web Editor NEW

This project forked from akeshavan/nbpapaya

0.0 2.0 0.0 130 KB

View brain images in the ipython notebook using papaya.js

Jupyter Notebook 20.48% Python 79.52%

nbpapaya's Introduction

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

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].

nbpapaya's People

Contributors

akeshavan avatar mrbago avatar pandafulmanda avatar

Watchers

 avatar  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.