Error in identifying primary objects




I am experiencing an error while attempting to identify primary objects from OrigGreen:
“Error while processing IdentifyPrimaryObjects: index 713 is out of bounds for axis 1 with size 713”.

I am using a slightly modified example “speckles” pipeline, i.e., nuclei size has been changed, but no other modifications have been made with the exception of changing the OrigGreen file identifier to bp1.
I have successfully used this pipeline on a separate image set and am lost as to why I can’t identify the speckles. Please advise.

I have attached sample files.

Thank you,

Matt

Hi Matt,
The reason for this error is that your 2 channels are not the same image dimensions; the ‘hoe’ image is 714 x 540 pixels, the ‘bp1’ image is 713 x 540 pixels. A one-pixel difference, but enough to make things fail :smiley: The solution is to insure your input images are all the same size.
-Mark

Thanks Mark! I had a feeling it was going to be a small detail that I was over looking.

Now that I have my images working, I want to make the analysis a bit more complicated. I would like to count speckles only in nuclei which are negative for a second marker. I have managed to use FilterObjects to identify those nuclei that are positive for the second marker (after IdentifyPrimaryObjects in both channels). But, I how can I select only nuclei that are negative?

Thanks,

Matt

You can select nuclei that are negative for the marker by inserting another FilterObjects module, and reversing the cutoff criteria. That is, if your 1st FilterObjects module retained nuclei for which the marker intensity was minimum of X units, the second one would be set to retain nuclei or which the marker intensity was a maximum of X units.
-Mark

Hey guys,
I am experiencing a problem similar to Mark’s, but when I check the sizes of my pics they seem to be the same. I just checked in ImageJ and the amount of pixels seemed to add up, but maybe the image files are different after all?
I want to measure the proportion/number of green cells being close to red cells, and how close they are to each other. In the end --> if green and red cells are closer to each other in my treated vs control.

Traceback (most recent call last):
File “/Applications/CellProfiler.app/Contents/Resources/lib/python2.7/cellprofiler/gui/pipelinecontroller.py”, line 2777, in do_step
File “/Applications/CellProfiler.app/Contents/Resources/lib/python2.7/cellprofiler/modules/measureobjectneighbors.py”, line 432, in run
IndexError: index 900 is out of bounds for axis 0 with size 896

I really appreciate your software and help - great job!

Thanks,

Thomas




PMN_NKT_neighbors.cpproj (622 KB)