Skip to content
Pradeep Rajasekhar edited this page Nov 25, 2024 · 17 revisions

Welcome to the napari_lattice wiki!

The sections on the right menu will go into details about the plugin features.

Installation

Configuring the environment

  1. Use a conda environment for installation. You will need Anaconda Navigator or a lighter version Miniconda installed. Click on the Anaconda prompt or terminal and create an environment first:

     conda create -n napari-lattice python=3.9
    
  2. You can use any name instead of "napari-lattice". Once an environment is created, activate it by typing with the name you used:

     conda activate napari-lattice
    
  3. Start with installing pyopencl

     conda install -c conda-forge pyopencl
    

    If you have trouble installing pyopencl on Windows, use a precompiled wheel from here. As we use python 3.9, you have to download and try the wheels which have cp39 in their name. For example, if we download pyopencl‑2022.1‑cp39‑cp39‑win_amd64.whl, then we navigate to the download folder and run:

     pip install pyopencl‑2022.1‑cp39‑cp39‑win_amd64.whl
    

    If this version doesn't work, try pyopencl‑2021.2.9+cl12‑cp39‑cp39‑win_amd64.whl

Note: If you want to use the CPU only instead of GPU, then please follow instructions here to configure it based on your operating system.

  1. If you have an NVIDIA graphics card, you can enable fast deconvolution by installing Talley Lamberts' highly optimised pycudadecon library.

     conda install -c conda-forge pycudadecon
    

    Check the pycudadecon github page if you're having trouble with installation.

  2. Install napari. You can do this by entering:

     conda install -c conda-forge napari
    

Alternatively, you can combine steps 3-4 by typing:

    conda install -c conda-forge pyopencl pycudadecon napari

Once napari is installed, type napari in the terminal and press Enter. This will bring up the napari viewer.

Installing napari-lattice

There are two ways:

  • You can use pip:

      pip install napari-lattice
    

OR

  • You can install from within napari. You can install napari-lattice by going to Plugins -> Install/Uninstall Plugins, and typing "lattice" into the search bar.

installation

Once napari-lattice pops up under "Available Plugins", click the install button on the far right. Installation may take a while. Once it's complete, you may have to restart napari by closing and reopening it again. napari-lattice should be available as an option under Plugins upon restarting napari.


Alternatively, if you'd like to install latest version of the napari_lattice plugin, type the following command in the terminal :

    pip install git+https://github.com/BioimageAnalysisCoreWEHI/napari_lattice.git

Note that channels and timepoints start from 0.

Saving Images

h5: Please note that the h5 file generated from this plugin is a BigDataViewer h5 file. Each h5 file will have an xml file associated with it. Using this h5 file format allows compatibility with BigDataViewer and BigStitcher in Fiji which are optimized for reading large datasets. If either of these plugins are installed in Fiji, you can just drag and drop the h5 file or go to the link above to see other options to open h5 files in Fiji.

Note: You can resave your raw czi data to h5 without deskewing. BigStitcher can display the data as deskewed by reading the transformations from the xml file. Refer to this notebook for more info.

tiff: When opening the tiff files in Fiji, you will need to convert them into a HyperStack (Image -> Hyperstack -> Stack to Hyperstack). You'll need to know the dimensions, i.e., channels, time and z slices to conver tit accurately. Tiff saving option is only provided for convenience sake as h5 is the recommended option.

Support for other file formats will be added in future versions