GithubHelp home page GithubHelp logo

gundwane21 / simpleitk-snap Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jamesqfreeman/simpleitk-snap

0.0 0.0 0.0 9.12 MB

A qt-based 3D data visualization tool.

License: MIT License

Python 100.00%

simpleitk-snap's Introduction


Overview

SimpleITKSnap is a 3D-image visualization tool. SimpleITKSnap is developed to bridge the gap between 3D-image process programming and its visualization. Comparing to the existing method, SimpleITKSnap have these advantage:

  1. Matplotlib-style display: SimpleITKSnap.imshow(yourArray). You don't need to save your processed result to disk, open ITK-SNAP, find the file and load it again.
  2. Extension-based design, meet your visualization demand by writing your own extension. The extension development requires minimal code and is super easy to √evelop.

Install

First, clone this repo to your local environment:

git clone https://github.com/JamesQFreeman/simpleITK-Snap.git

Then use pip to install the dependency package:

pip install -r requirements.txt

Then you are ready to go!

Usage

In-place Mode

You can open 3D image in python code.

import SimpleITKSnap as sis
from SimpleITKSnap.Extension import histogram
array = np.arange(0,256*256*256).reshape(256,256,256)
sis.imshow(array, histogram)

Application Mode

Let's see an example of a brain CT image: To open an image, simply type:

python simpleITK-Snap -f YourFile.nii.gz

A CTA image opened in simpleITK-Snap

Extension

You can develop your own extension in two ways:

  • Matplotlib-style:
@pltExtension
def yourExtension(array3d:ndarray, x:int, y:int, z:int) -> str:
    plt.whateverYouWant()
    return "Extention display test at {}, {}, {}".format(x,y,z)
  • Array-style:
@imgExtension
def yourExtention(array3d:ndarray, x:int, y:int, z:int) -> Tuple[ndarray,str]:
    processed_2d_image = whateverYouWant()
    return processed_2d_image, "Extention display test at {}, {}, {}".format(x,y,z)

Dependency & Compatibility

SimpleITKSnap is based on:

  • python3
  • SimpleITK
  • numpy
  • opencv-python
  • PyQt5

Compatibility Test Status:

Windows 10 OS X Linux
Build Build Status Build Status Build Status
PyPI Build Status

Release note and what's coming next

At release 0.1.3, jupyter notebook is supported

release 0.1.4

  • Pypi support

release 0.1.5

  • A doc
  • More extension examples

Developer

This project is started by JamesQFreeman([email protected]) and supported by SJTU MIC lab.

simpleitk-snap's People

Contributors

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