Unstable PIPELINE

I am working with Version 2.0, 32-bit. I’m transitioning from Version 1.0 because my computer just can’t handle it any more. I don’t know why, probably because of new Windows updates. I’m working with Windows XP Professional, Service Pack 3. I know it’s old, but I can’t afford to replace it.

Now, I am having a lot of problems with this new version.

For example, I’m having a number of stability problems with one of my pipelines. Sometimes it works, but on the next run, it crashes.

This is the PIPELINE:2_CropStack_IndividualCellsPIPE.mat (12 KB)

The goal of the pipeline:
I am trying to pick out individual cells of an image. I am cropping individual red-staining target cells from a red master image, and using that cropped image to identify and crop identical regions of subseqent planes of the stack (green images, not that it matters). You have to trace a single cell on the IdentifyObjectsManually module, Crop out just that region, Align the cropped individual cell to the same region on each of the subsequent green images, Crop each of those and Save each. The goal is to identify and crop cells corresponding to multiple red cells within the same field, one at a time. The PIPELINE works great the first time, and maybe even the second consecutive time. But if i try to use it multiple times one after another, it crashes at one of a number of steps. This might not be the most efficient way to do it. I had an alternative PIPELINE in Version 1.0, but it doesn’t work in 2.0 because of a bug in the Save Outline step.

It most often crashes in one of the CROP modules with the following error message:
Traceback (most recent call last):
File “cellprofiler\pipeline.pyc”, line 309, in run
File “cellprofiler\modules\crop.pyc”, line 339, in run
IndexError: index (1023) out of range (0<=index<1022) in dimension 0

It sometimes fails to identify the cell that I traced in IdentifyObjectsManually when it gets to the first CROP module. It sometimes crashes in the Align step. Usually it gets through these steps successfully, and crashes on the second CROP module. Unfortunately these aren’t happening today, so I can’t get you an error message.

Why would the pipeline work sometimes, but not others? It usually fails on the second or third consecutive run. Is something happening to the code, or could it be having a difficult time clearing its memory between runs? The PIPELINE needs to use the same set of starter images, but to identify and crop out different cells on each subsequent run.

Do you have any insight?

Thank you very much.

Jan








Hi Jan,

Without an error message, it will be difficult to diagnose this issue. If it happens again, please post it here.

In the meantime…

What bug did you encounter that prevented you from using this pipeline?

Regards,
-Mark

That would be a different PIPELINE. We can address that PIPELINE later. Right now that PIPELINE is dead in the water, because I can’t even get it to process the input image.(Error message: No prior instances of imagegroup were defined. Do you want to continue processing? )

For the Version PIPELINE that I sent you in the original message, 95% of the time I am getting the error message that I pasted into the message:

It most often crashes in one of the CROP modules with the following error message:
Traceback (most recent call last):
File “cellprofiler\pipeline.pyc”, line 309, in run
File “cellprofiler\modules\crop.pyc”, line 339, in run
IndexError: index (1023) out of range (0<=index<1022) in dimension 0

This usually does not happen the first time that I run the pipeline, only when I run it two or more consecutive times. But I will need to run it repetetively so I can identify and process all of the target cells. Do you have any idea of why this would happen?

Hi Jan,

I’ve managed to replicate the error. I think what’s happening is that the Crop mode setting in Align is causing the error. Your pipeline is set to “Crop to aligned region”, which has the effect of producing an image smaller in size than the original. The help notes “the output images may not be the same size as the input images which may cause problems if downstream modules use aligned and unaligned images in combination” and I think that’s whats occurring in the later Crop module.

To avoid this issue, try setting the Crop mode in Align to “Keep size.” This didn’t produce an error, at least when I tried it.

Regards,
-Mark