Tool installation

Learning Objectives

After completing this lesson, learners should be able to:
  • Install the software that is required to execute the activities in this training material

Motivation

Provide instructions for installing the software required for this workshop. Please follow the instructions given by your trainer regarding which software you will need!

Concept map

graph TD I("Image Analysis") -->|with| C("Computer") C -->|using| T("Tools") T -->|require| S("Installation")



Figure


Screenshot of the community partners of https://forum.image.sc, containing many very useful bioimage analysis tools.



Activities

Install ImageJ

Install the ImageJ GUI and a scripting editor.


Show activity for:  

Fiji

Fiji bundles the ImageJ GUI, a scripting editor and various plugins; additional plugins can be readily installed via so-called update sites.

  1. Install Fiji on your machine, as described here.
  2. Add the following Fiji updates sites, as described here.
    • IJPB-Plugins
    • BioVoxxel

IntelliJ

IntelliJ is an IDE for developing Java code. It can be used to develop and run ImageJ code.

  1. TODO
  2. TODO



Install skimage & napari

Install the python library skimage for image analysis and the napari viewer for image inspection.


Show activity for:  

conda

Installation (only once)

  1. install miniconda
  2. open a terminal window
    • Windows: Anaconda Prompt (Miniconda3), e.g. type Anaconda in the search bar
  3. write conda create -n skimage-napari-tutorial -c conda-forge -c euro-bioimaging python=3.10 napari=0.4.17 notebook matplotlib jupytext "scikit-image>=0.20" openijtiff and press enter
  4. create a directory called skimage-napari-tutorial (e.g. on your Desktop)

Test installation (only once)

  1. download test_installation_skimage_napari.py to the skimage-napari-tutorial directory.
  2. open a terminal window (see above)
  3. cd skimage-napari-tutorial
  4. conda activate skimage-napari-tutorial
  5. jupyter notebook
  6. Richt-click on test_installation_skimage_napari.py and choose Open with -> Notebook. You will get a notebook with preconfigured cells. Run the cells one by one (Run button or Shift-Enter). The napari GUI will show twice the same image.
  7. create a new notebook
    • New > Python 3
    • type following commands in a cell and execute the cell by pressing the Run button or Shift-Enter.
# %% [markdown]
# # Test python napari skimage install

# %%
# Instantiate the napari viewer
import napari
viewer = napari.Viewer()

# %%
# Read the intensity image
from skimage.io import imread
fpath = 'https://github.com/NEUBIAS/training-resources/raw/master/image_data/xy_8bit__two_cells.tif'
image = imread(fpath)

# %%
# View the intensity image
viewer.add_image(image)

# %% 
# Read via OpenIJTIFF (OpenIJTiff.py must be in the same folder as the notebook path)
from OpenIJTIFF import open_ij_tiff
image_opentiff, axes, scales, units = open_ij_tiff(fpath)
# View the intensity image
viewer.add_image(image_opentiff)

Start (every time)

  1. open a terminal window (see above)
  2. cd skimage-napari-tutorial
  3. conda activate skimage-napari-tutorial
  4. jupyter notebook

To run an activity either:

  • (with package jupytext) create an empty file, e.g. current_activity.py in the skimage-napari-tutorial directory. Copy the activity code to this file and save the file. From the jupyter main landing page right-click on the file and choose Open with -> Notebook.
  • Create a new notebook New > Python 3 and copy the code in the activity into the notebook.

BAND

New BAND users

  1. Go to band.embl
    • We recommend using Chrome or Firefox browsers. Please avoid using IE as it is not supported. Safari and Opera may be ok as well, but they are not thoroughly tested.
  2. Agree to the Terms of Use and Privacy Notice and click the “Login” button.
    • We recommend Google authentication.
  3. After entering your credentials, check your emails for a confirmation email. It will typically take a maximum of 5 mins. Please also check your spam folder.
    • Do not try to use the BAND before you receive the confirmation email.
    • Please contact cbbcssupport@embl.de if you do not receive your confirmation email within 10 mins.
  4. Once you receive your confirmation email, go back to band.embl.de and log in again.

  5. You will be automatically redirected to the “Launch desktop” page after successful login.

  6. Please choose the following desired configurations (CPUs, Memory, GPUs, Screen resolution, and desktop running time).
    • No. of CPUs = 1
    • Memory (gb) = 2
    • No. of GPUs = 0
    • Resolution = your preference
    • Time (days) = 1
  7. Click “Launch Desktop”

    • If you encounter an error launching a desktop, please contact us at cbbcssupport@embl.de.
    • One user is only allowed to have 1 running desktop.
  8. Your desktop will be available in the ”Running Desktop” section if the launch is successful.
    • If this is your first time using the BAND, you may see a red error message appear after clicking “Go to Desktop”. If you see it, please simply stop the desktop and re-launch. The error is due to system and network limitations. It will go away, and the performance of your desktop will be optimal from your second desktop onwards.

    • If the “Go to desktop” button is greyed out, it means there are not enough resources available for your request. In this case, you have two options: 1) Stop your desktop and adjust your configurations. Lower the requested number of CPU, Memory, or GPU and launch again. 2) Wait until other users release their desktops so that more resources become available. The “Show Desktop” will automatically become clickable once there are enough resources.

  9. Click “Go to desktop” to view your desktop in a new browser tab.
    • Click “SSH to Desktop” if you prefer a command-line interface.
  10. Once your desktop appears in a new tab, you can access all the available software from the Application menu on the top left of your screen.

  11. After using your desktop, close the browser tab and click the “Stop desktop” button from the launch screen.

Existing BAND users

  1. Go to band.embl
  2. Click “Login” from the menu and then continue from step 5 above.

Launch skimage/napari

To execute the below steps you need to open a terminal window:

terminal

…and you also need to open an Application:

applications

  1. Open a Terminal and execute

     - cd Documents # go to the Document folder
     - mkdir skimage-napari-tutorial # create a folder called skimage-napari-tutorial
     - cd skimage-napari-tutorial
     - wget https://neubias.github.io/training-resources/functions/OpenIJTIFF.py
    
  2. Go to “Applications Places->Programming->JupyterLab”. Select ‘napari.tensorflow’ Kernel

  3. Save the jupyter note-book file in skimage-napari-tutorial folder

     File>Save Notebook As …> Documents/skimage-napari-tutorial/”FileName”.ipynb
    
  4. We have napari from the menu. Or if you prefer to start napari within Jupyter, just type “%gui qt5” and ignore the warnings.

BAND tipps

  1. Do not run the “skill ” command, which may affect your running session and do not “scancel” the slurm job running your desktop session.
  2. Do not use any .bashrc in your home directory. It will cause the guacamole connection error.
  3. DO NOT store large files in /home, move or download large files to /scratch. If /home is full, BAND will break. THIS IS IMPORTANT.
  4. Refer to User guide for copy & paste instructions
  5. Use pure Google accounts or accounts that purely managed by Google. Account linking, for example, login with Hotmail with account linking to Google may not work.
  6. User data stored in /home and /scratch persists between desktop sessions. Stop desktop will not lose data.
  7. Recommend to log in to BAND at least once before the course. This is to give enough time to fix issues if there are any.



Install napari standalone app

Install napari standalone app


Show activity for:  

desktop download

Open this link and navigate to Assets and click on the downloader according to your own system








Explanations

Installation instructions

To visualise the installation instructions, please select the required platform in the activity list.




Follow-up material

Recommended follow-up modules:

Learn more: