Measure fluorescence intensity at the nuclear envelope

This example reproduces a well-established workflow in bioimage data analysis for measuring the fluorescence intensity localized to the nuclear envelope, in a time sequence of cell images (each with two channels and two spatial dimensions) which shows a process of protein re-localization from the cytoplasmic area to the nuclear envelope. This biological application was first presented by Andrea Boni and collaborators in 1; it was used in a textbook by Kota Miura 2 as well as in other works (3, 4). In other words, we port this workflow from ImageJ Macro to Python with scikit-image.


Boni A, Politi AZ, Strnad P, Xiang W, Hossain MJ, Ellenberg J (2015) “Live imaging and modeling of inner nuclear membrane targeting reveals its molecular requirements in mammalian cells” J Cell Biol 209(5):705–720. ISSN: 0021-9525. DOI:10.1083/jcb.201409133


Miura K (2020) “Measurements of Intensity Dynamics at the Periphery of the Nucleus” in: Miura K, Sladoje N (eds) Bioimage Data Analysis Workflows. Learning Materials in Biosciences. Springer, Cham. DOI:10.1007/978-3-030-22386-1_2


Klemm A (2020) “ImageJ/Fiji Macro Language” NEUBIAS Academy Online Course:


Vorkel D and Haase R (2020) “GPU-accelerating ImageJ Macro image processing workflows using CLIJ”

import matplotlib.pyplot as plt
import numpy as np
import as px
from scipy import ndimage as ndi

from skimage import (
    filters, measure, morphology, segmentation
from import protein_transport

We start with a single cell/nucleus to construct the workflow.


shape: (15, 2, 180, 183)

The dataset is a 2D image stack with 15 frames (time points) and 2 channels.

fig = px.imshow(
    labels={'animation_frame': 'time point', 'facet_col': 'channel'}