美文网首页医学影像处理
使用jupyter lab动态交互3D/2D医学影像

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

作者: reallocing | 来源:发表于2018-10-12 11:00 被阅读0次
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?

相关文章

网友评论

    本文标题:使用jupyter lab动态交互3D/2D医学影像

    本文链接:https://www.haomeiwen.com/subject/ibpwaftx.html