How to track intensity changes for each pixel in a ROI over time?

Hey everyone,
im a grad student new to imaging quantification.
that being said i would like to track the changes in intensity of each pixel for a region of interest over time.

specifically, i have a 200x200 ROI (40,000 pixels total), and i would like to track how each pixel changes in intensity over time (not the average intensity for the whole square). This is a calcium imaging experiment, so i have increases in signal intensity occurring randomly in processes within this 200x200 square.

Any input or advice as to specific plugins would be greatly appreciated!

thanks so much!!!

You can import your image sequence as a stack and then make a 3d plot (z-achsis = intensities) from the whole stack which gives you a plot stack for each image in the stack, see:

The plot can be coloured with a selected LUT and you can also create a nice montage from the stack for use in
a presentation or poster:


That’s simple to do but how do you want the output to be: 40,000 text files or a single text file with 40,000 lines? and how do you evaluate them?

Hey Kota, thanks for your response.
I figured it would be simple enough.
ideally the output would be a single text file with 40,000 lines.
We have Igor and Matlab to handle hefty analysis, as this would be too much for excel i think.

thanks for you response.
I have been able to make different plots with the image, but rarely do these have lookup tables associated with them.
I need the actual pixel intensities for further quantification.

Well actually it is very easy with ImageJ. Here is an animated *.gif from the mri stack example exported with ImageJ:

First create a stack from your plot images, apply a LUT and then create the surface plot.

However, since I don’t know what you want to analyze it’s hard to give you a proper recommendation.


I have been making plots like this, but can you pull out the raw data?
Is there a lookup table for this type of plot…

You can define your own LUT and even create a legend in ImageJ, see:

oh wow, awesome!

Look at Menu:

Image->Color->Edit LUT…


Analyze->Tools->Calibration Bar…



Marcel the magic… I stick to the text-out then.

To get a text file output, i could think of two ways and

1. Macro style

A ROI should be there.
crop, rotate, montage, save as a text image.

run("Duplicate...", "duplicate");
run("TransformJ Rotate", "z-angle=0.0 y-angle=0.0 x-angle=90 interpolation=Linear background=0.0 adjust");
run("Make Montage...", "columns=1 rows=200 scale=1");
saveAs("Text Image", "/Users/miura/Desktop/zprofiles.txt");

Above is a sequence of menu items, so you could do it without programming.

2. jython style

A ROI should be there as well.
Iterate over pixel by pixel, save log window as a text file. You could instead write the output directly to a csv by combining this .

from ij import IJ

def getPix(imp, x, y):
	depth = imp.getStackSize()
	zprofile = []
	for z in range(depth):
		apix = imp.getStack().getVoxel(x, y, z)
	return zprofile
imp = IJ.getImage()
roi = imp.getRoi().getBounds()

for y in range(roi.height):
	for x in range(roi.width):
		zp = getPix(imp, roi.x + x, roi.y + y)