Convert between itk and napari data structures.
pip install itk-napari-conversion
Convert an itk.Image
to an napari.layers.Image
:
from itk_napari_conversion import image_layer_from_image
image_layer = image_layer_from_image(image)
Convert to an napari.layers.Image
to an itk.Image
:
from itk_napari_conversion import image_from_image_layer
image = image_from_image_layer(image_layer)
Contributions are welcome!
To test locally:
git clone https://github.com/InsightSoftwareConsortium/itk-napari-conversion.git
cd itk-napari-conversation
pip install flit pytest
flit install --symlink
pytest tests.py
Follow the itk contributing guidelines and the itk code of conduct.