Nuclei segmentation and shape measurement

Prerequisites

Before starting this lesson, you should be familiar with:

Learning Objectives

After completing this lesson, learners should be able to:
  • Create a basic image analysis workflow.

  • Understand that bioimage analysis workflows consist of a sequence of image analysis components.

  • Segment nuclei in a 2D image and measure their shapes and understand the components (concepts and methods) that are needed to accomplish this task.

  • Draw a biophysically meaningful conclusion from applying an image analysis workflow to a set of images.

Motivation

Detecting a set of objects in an image, counting them and measuring certain characteristics about their morphology is probably the most frequently occurring task in bioimage analysis. Depending on the image, even this task could become quite challenging and the workflow could become quite complex. Here we start with a relatively simple image where combining a minimal set of image analysis components into a simple workflow does the job.

Concept map

graph TD I("Grayscale image") --> T("Intensity threshold") T --> BI["Binary image"] BI --> C("Connected component labeling") C --> LI["Label image"] LI --> S("Shape measurement") S --> SFT["Object feature table"]

Figure


Workflow for nuclei segmentation and area measurement.



Activities


Show activity for:

ImageJ GUI

  • [ Process › Binary › Options… ]
    • Black background
  • Open one of the input image (see above)
  • [ Image › Duplicate… ]
    • Title = binary
  • Draw a line profile to find a good threshold
    • Use the straight line tool in the Fiji menu bar
    • [ Analyze › Plot Profile ]
      • [ Live ] and move the line around, including nuclei and background pixels
  • [ Image › Adjust › Manual Threshold… ]
    • Min = 25
    • Max = 255
  • [ Process › Binary › Convert to Mask ]
  • [ Plugins › MorphoLibJ › Binary Images › Connected Components Labeling ]
    • connectivity = 4
    • type= 8 bits
  • [ Image › Lookup Tables › glasbey_on_dark ]
  • [ Plugins › MorphoLibJ › Analyze › Analyze Regions ]
    • area

ImageJ Macro

/**
 * 2D Nuclei segmentation (simple workflow)
 * 
 * Requirements:
 *   - Update site: IJPB-Plugins (MorpholibJ)
 * 
 */

// Threshold parameter
threshold = 25;

// Code
run("Close All");
run("Options...", "iterations=1 count=1 black do=Nothing");

analyseNuclei( "INCENP_T1", "https://github.com/NEUBIAS/training-resources/raw/master/image_data/xy_8bit__mitocheck_incenp_t1.tif", threshold );
analyseNuclei( "INCENP_T70", "https://github.com/NEUBIAS/training-resources/raw/master/image_data/xy_8bit__mitocheck_incenp_t70.tif", threshold );

run("Tile");

function analyseNuclei( name, filePath, threshold )
{
	open(filePath);
	rename(name);
	setMinAndMax(0, 100);
	run("Duplicate...", "title=" + name + "_binary" );
	setThreshold(threshold, 65535);
	run("Convert to Mask");
	run("Connected Components Labeling", "connectivity=4 type=[8 bits]");
	run("glasbey_on_dark");
	run("Analyze Regions", "area");
}

Assessment


Follow-up material

Recommended follow-up modules:

Learn more: