医学影像处理

使用jupyter lab动态交互3D/2D医学影像

2018-10-12  本文已影响0人  reallocing
from itkwidgets import view
import itkwidgets
import nibabel as nib
nii = nib.load('./nii/demo.nii.gz')
img = nii.get_data()
viewer = view(img,cmap=itkwidgets.cm.grayscale)
viewer
image.png image.png

示例:


image.png
image.png
Installation
To install the widgets for the Jupyter Notebook:
$ pip install itkwidgets

For Jupyter Lab, additionally run:
$ jupyter labextension install @jupyter-widgets/jupyterlab-manager itk-jupyter-widgets
#Usage
#In Jupyter, import the view function:
from itkwidgets import view

#Then, call the view function at the end of a cell, passing in the image to examine:
view(image)

#For information on additional options, see the view function docstring:
view?
上一篇 下一篇

猜你喜欢

热点阅读