Loading images sequentially with overlap

Hi guys,

I was wondering whether there was a way of loading images sequentially with overlap?

By this, I mean something like the following:

Cycle 1:
Load images 1 and 2, perform action

Cycle 2:
Load images 2 and 3, perform action

Cycle 3:
Load images 3 and 4, perform action

etc.

It would be much appreciated!

Thanks,

Liam

Hi Liam,
Mark may have his own answer to this… Myself, I would use LoadData instead of LoadImages to load the images since this gives you complete control and flexibility, especially if you’re comfortable with some form of scripting language to make the list. Your .csv file might look something like this:

Image_FileName_Previous,Image_FileName_Next
img1.tif,img2.tif
img2.tif,img3.tif
img3.tif,img4.tif

Have LoadData load this file and make sure you ask it to read images. You’ll get two images in each image set, one named, “Previous” and one named “Next”.

Hope this helps.

–Lee

Hi there,
By the way, are you attempting to align frames of a movie over time? Lee’s suggestion should work for you, but your goal could also be accomplished with the Align module, where you align each subsequent frame to the first frame of the movie. Now, if you have multiple movies that you are processing in the same pipeline you need to make sure to let CellProfiler know so that it doesn’t align all frames of all movies to the first frame of the first movie! This requires setting LoadImages properly, using the group by metadata option such that the first frame of each movie is given a special identity. We can fill in the details further if needed.
Anne

Hi,

Thanks for the reply Lee, would there be any way of doing it by order rather than typing in the file names? There could potentially be several hundred images so this could take a while!

Hi Anne - No this isn’t to align the frames of a movie. I’m trying to implement a pipeline that would allow to produce a super resolution image using a technique called SHRImP (Super High Resolution Imaging with Photobleaching, Gordon et al. 2004). Basically you take a series of images from a fixed cell, which will slowly photobleach over time. So by substracting the second image from the first, the third from the second, etc. and adding together all of the resulting images, you can form an image composed of only the photobleached particles, which is generally of super high resolution.

I dont know whether this can be done with Cell Profiler, but I figured I should give it a go!

Thanks,

Liam

Ah, interesting! Yes, since you really do want sequential frames of the stack to be compared, I think Lee’s proposal is the only one that will work for you in the current software. I will add a feature request for this, but it’s not likely to make it to the top of the list for quite a while, since at least there is a workaround that will solve your problem for the time being.
Anne