.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/plot_multiplexed.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_auto_examples_plot_multiplexed.py: Multiplexed Imaging: CODEX ========================== .. GENERATED FROM PYTHON SOURCE LINES 5-22 .. image-sg:: /auto_examples/images/sphx_glr_plot_multiplexed_001.png :alt: plot multiplexed :srcset: /auto_examples/images/sphx_glr_plot_multiplexed_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none [ 0 18481553 27300386] | .. code-block:: Python import imageio.v3 as iio import napari from cellSAM import cellsam_pipeline img = iio.imread("../sample_imgs/tissuenet.png") # Image is 3-channel RGB where Channel 1 (G) represents a nuclear stain # and Channel 2 (B) a membrane stain. Channel 0 (R) is blank. print(img.sum(axis=(0, 1))) mask = cellsam_pipeline(img, use_wsi=False) nim = napari.view_image(img, name="CODEX image"); nim.add_labels(mask, name="Cellsam segmentation"); if __name__ == "__main__": napari.run() .. rst-class:: sphx-glr-timing **Total running time of the script:** (1 minutes 11.274 seconds) .. _sphx_glr_download_auto_examples_plot_multiplexed.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_multiplexed.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_multiplexed.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_multiplexed.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_