Installation¶

Note

for me:

  • refactor the way of installing napari omaas using just conda-forge in the environment_OMAAS_CPU.yml

  • add support and installation for GPU usage

To use this plugin you will need first to install napari, a fast, interactive viewer for multi-dimensional images in Python. Find more info about napari usage and installation here.

Important

While not strictly required, it is highly recommended to install this plugin (together with napari and all additional dependencies) into a clean virtual environment using an environment manager like conda or venv.

This should be set up before you install napari and napari-omaas. For example, setting with up a Python 3.10 environment with conda:

conda create -y -n napari-omaas -c conda-forge python=3.10
conda activate napari-omaas

After you have napari installed in your system, you can install napari-omaas via pip using the comand line:

pip install napari-omaas

To install the latest development version (recommended) :

pip install git+https://github.com/rjlopez2/napari-omaas.git

Custom installation¶

Note

This is a recommended method we currently use to install napari-omaas and all additional dependencies in a custom environment:

  1. Download manually or via comand line the environment_OMAAS_CPU.yml file from the OMAAS repository. This repo contains a number of configuration files for our experiments setup.

curl -O https://raw.githubusercontent.com/rjlopez2/OMAAS/master/setup_files/environments/environment_OMAAS_CPU.yml
  1. Create the environment using the recipe from the downlowded file.

conda create -f environment_OMAAS_CPU.yml
  1. Activate the environment.

conda activate omaas_base

You should now be ready to use napari-omaas.

Update to the latest version¶

  1. Uninstall the current version.

pip uninstall napari-omaas
  1. Install the latest developing version.

pip install git+https://github.com/rjlopez2/napari-omaas.git

Usage¶

This plugin can read images generated with Andor Technologies cameras. It has been currently tested on Zyla cameras. Just drag and drop an image (.sif format or spooling folder) to the napari GUI, and the image will display. Alternatively, you can programmatically load/read the image within a notebook.

Launch the application¶

Via command line¶

First activate your environment and then launch the application with the following command:

conda activate omaas_base
napari -w napari-omaas

A new window should appera showing the Napari viewer with the napari-omaas pluging attached.

Via Jupyter-Notebook or python script¶

import napari
import napari_omaas

viewer = napari.Viewer()
o = napari_omaas.OMAAS(viewer)
viewer.window.add_dock_widget(o, area='right')

file = "path/to/my/file/my_image.sif"
viewer.open(path=file, plugin="napari-omaas", name = "my_image")

to display the metadata use the standard call to the corresponding layer:

viewer.layers['my_image'].metadata

Plot profile¶

The following example ilustrate how to perform normalization (pixelwise) on a time serie image and plot its 2d profile along the t dimension withing the averaged ROI selected pixels.


APD estimation¶

The next example shows how to compute action potential duration (APD) in the same image stack.


You can also perform additional operations on images, such as normalization, temporal/spatial filters, segmentation, but also apply more advanced image processing methods such as motion tracking/compensation, etc. For detailed examples, pleaase refer to the tutorials.