Multi-Channel Nuclear Analysis

An ImageJ/FIJI plugin for analyzing multi-channel fluorescence images with a focus on nuclear segmentation using StarDist.

Table of Contents

  1. Introduction
  2. Installation
  3. Requirements
  4. Compatibility Notice
  5. Usage
  6. Tutorial and Example Data Analysis with Python
  7. Plugin for Merging Channels into Multi-Channel TIF Files
  8. Credits
  9. Citation

Introduction

Quantitative analysis of fluorescence microscopy images requires multiple steps, from image acquisition, followed by data extraction, visualization and statistical analysis.

Analysis Workflow

This tool allows researchers to easily extract fluorescence and shape based metrics from multi-channel fluorescence microscopy images by combining the power of the StarDist nuclear segmentation algorithm with customizable channel processing parameters. The macro automates routine tasks in image analysis workflows:

Installation

Download the file “Multi_Channel_Nuclear_Analysis.ijm” using the button at the top of the page. Copy the file into FIJI/ImageJ plugins folder or, within FIJI/ImageJ, go to plugins > install and navigate to the file location. Restart FIJI before using the script.

Requirements

To install Stardist, CSBDeep, and TensorFlow plugins in FIJI:

  1. Open FIJI
  2. Go to Help > Update...
  3. Click on Manage update sites
  4. Check the boxes for:
    • StarDist
    • CSBDeep
    • TensorFlow
  5. Click Close
  6. Click Apply Changes
  7. Restart FIJI

This will ensure that StarDist and all its dependencies (CSBDeep and TensorFlow) are properly installed.

Compatibility Notice

Important: Java Version Compatibility

This plugin requires FIJI running on Java 8 to function properly. Due to ongoing transitions in the FIJI/ImageJ ecosystem, the latest FIJI releases now use Java 21, which causes compatibility issues with TensorFlow and StarDist plugins that this tool depends on.

How to Check Your FIJI’s Java Version

  1. Open FIJI
  2. Go to Help > About ImageJ...
  3. Look for the Java version information in the about dialog
    • If it shows Java 1.8.x, your FIJI is compatible
    • If it shows Java 17.x or 21.x, you need to download the stable version

How to Get a Compatible Version

  1. Go to the FIJI download page
  2. Download the stable version (right column) for your operating system
    • Choose the JRE (Java Runtime Environment) version, not the JDK version
    • The stable versions run on Java 8 and are fully compatible with this plugin
    • Avoid the latest versions (left column) which run on Java 21

Compatibility Status

This compatibility issue is temporary and will be resolved once the TensorFlow and StarDist plugins are updated to support Java 21. We will update this documentation when full compatibility is achieved.

On macOS systems, users may encounter permission-related errors (e.g., “Can’t create an ImageOutputStream” or “Permission denied”) when the plugin attempts to save files. This is due to macOS security restrictions. To resolve this issue, users should:

  1. Ensure FIJI has permission to access the folder containing the images (avoid using system-protected locations like Desktop or Documents)
  2. Move the image files to a user-created folder with full permissions (e.g., create a new folder in your home directory)
  3. If using the Desktop or Documents folders, grant FIJI full disk access in System Preferences > Security & Privacy > Privacy > Full Disk Access

Usage

  1. Open ImageJ/FIJI
  2. Run the macro by selecting Plugins > Multi-Channel Analysis (bottom of the list)
  3. Follow the step-by-step dialog boxes to configure your analysis
  4. Choose your input directory containing images
  5. Review results in the output directory

Input Requirements

Preparation

Before running the script, it’s recommended to:

  1. Explore Your Images: Open a representative image in ImageJ/FIJI
  2. Determine Channel Count: Check how many channels your images have (1-4 supported)
  3. Choose Background Subtraction Method: For each channel, decide whether to use:
    • Standard background subtraction: Best for images with uniform background
    • Rolling ball background subtraction: Better for images with uneven background illumination
  4. Set Background Values:
    • For standard subtraction: Determine appropriate background values to subtract from each channel
    • For rolling ball method: Determine appropriate radius (in pixels) for each channel
  5. Determine Max Display Values: Find suitable brightness values for optimal visualization of PNG images
  6. Plan Channel Assignments: Decide which channel will be used for nuclear segmentation

The values you determine in this preparation stage will be used in the configuration dialog boxes when running the script.

Configuration Options

The script offers a user-friendly interface with three main configuration steps:

  1. Welcome Dialog:
    • Select number of channels in your images (1-4)
    • Open the ImageJ “Set Measurements” dialog to select which measurements to include
  2. Channel Configuration:
    • For each channel, set:
      • Background subtraction value
      • Background subtraction method:
        • Standard subtraction: Subtracts a fixed value from each pixel
        • Rolling ball method: Uses ImageJ’s rolling ball algorithm to remove uneven background (value represents radius in pixels)
      • Maximum display value in PNG images
      • Color for visualization
      • Suffix for naming output files
  3. Merge and Segmentation Configuration:
    • Select which channels to include in merged visualization
    • Choose which channel to use for nuclear segmentation

Output Files

The script generates the following outputs in an “analisis” subfolder:

Images

Data Files

Data Analysis

The CSV tables are the primary output for further quantitative analysis:

For Users Without Programming Skills

For Users With Basic Programming Skills

Tips for Best Results

Full tutorial on youtube

Watch the comprehensive tutorial on how to use the Multi-Channel Nuclear Analysis plugin:

Example Data Analysis with Python

To help users get started with data analysis, I provide an example dataset with analysis code in Python. This demonstrates a typical workflow from raw data to visualization.

Example Experiment

This example is based on a real experiment involving mouse embryonic stem cells (mESCs) engineered to inducibly express a fusion protein comprising the transcription factor OCT6 linked to the mCherry fluorescent protein. Expression was induced by doxycycline treatment for 1, 2 or 3 days. An immunofluorescence was then performed against NANOG (alexa fluor 488), and nuclei were stained with DAPI. Channel

Key experimental details:

Analysis Files

Download the example data and analysis files: Download Example Dataset (ZIP)

The ZIP file contains:

Interactive Analysis in Google Colab

Explore the analysis interactively using the Google Colab notebook Open In Colab

The notebook demonstrates:

  1. Loading and exploring the CSV data from the ImageJ plugin
  2. Data cleaning and transformation
  3. Basic exploratory data analysis
  4. Creating publication-quality visualizations

This example shows how different background subtraction methods (fixed value vs. rolling ball) can be applied to different channels based on their characteristics, and how to analyze the resulting data.

Plugin for Merging Channels into Multi-Channel TIF Files

Some microscopes (such as Evos microscopes from ThermoFisher Scientific) save each channel as a separate TIF file instead of combining them into a multi-channel file. For these cases, I provide a companion plugin called Merge_multi_channel_tif.ijm that merges separate channel files into a single multi-channel TIF file before analysis.

Installation and Usage

  1. Download the Merge_multi_channel_tif.ijm file
  2. Install it in the same way as the main plugin (copy to the FIJI/ImageJ plugins folder or use Plugins > Install)
  3. Run the plugin through the Plugins menu
  4. Follow the configuration dialogs to set up the channel merging

File Naming Requirements

For the channel merging plugin to work correctly, your files must follow a consistent naming convention:

Example:

10X-Image1-DAPI.tif   // Base name: "10X-Image1", Suffix: "-DAPI"
10X-Image1-488.tif    // Base name: "10X-Image1", Suffix: "-488"
10X-Image1-594.tif    // Base name: "10X-Image1", Suffix: "-594"

The plugin will identify files with the same base name, merge them according to the channel configuration you specify, and save the result as a multi-channel TIF file that can be used with the main analysis tool.

Credits

Developed by Ariel Waisman at FLENI, Argentina

This tool utilizes the StarDist algorithm for nuclear segmentation:

Uwe Schmidt, Martin Weigert, Coleman Broaddus, and Gene Myers.
Cell Detection with Star-convex Polygons.
International Conference on Medical Image Computing and Computer-Assisted Intervention (MICCAI), Granada, Spain, September 2018.

Citation

Pending publication

License

MIT License Copyright (c) 2025 Ariel Waisman