Problems getting started

Hi all,

I’ve just downloaded the developer’s version of CP (CellProfiler.m: Revision: 7485 ) and run it with

MATLAB Version (R2008b)
Operating System: Linux #1 SMP PREEMPT Mon Aug 17 12:42:05 CEST 2009 i686
Java VM Version: Java 1.6.0_04 with Sun Microsystems Inc. Java HotSpot™ Client VM mixed mode

To get started, I was going to run the SBS pipeline on the example images provided, but I already ran into some problems:

  1. in the CalculateStatistics module, it seems that there is an error with the waitbar function as I get the following

There was a problem running the analysis module CalculateStatistics which is number 20.
Improper arguments for waitbar

waitbar in /amd/kronecker/2/package/matlab/matlabr2008b/toolbox/matlab/uitools/waitbar.m (249)
CPwaitbar in /amd/kronecker/2/package/cellprofiler/7522/CPsubfunctions/CPwaitbar.m (15)
CPcalculateStatistics in /amd/kronecker/2/package/cellprofiler/7522/CPsubfunctions/CPcalculateStatistics.m (91)
CalculateStatistics in /amd/kronecker/2/package/cellprofiler/7522/Modules/CalculateStatistics.m (162)
AnalyzeImagesButton_Callback in /amd/kronecker/2/package/cellprofiler/7522/CellProfiler.m (4505)
gui_mainfcn in /amd/kronecker/2/package/cellprofiler/7522/CellProfiler.m (6265)
CellProfiler in /amd/kronecker/2/package/cellprofiler/7522/CellProfiler.m (55)

I saw in the forum that there has been an issue with the waitbar function and the R2008b version before, but as far as I can tell the CPwaitbar function has now been updated accordingly so I don’t know how to fix that.

  1. When I choose to display the intermediate images for IdentifySecondary, and (after the image analysis is complete) change the Oulines:Secondary to e.g. Outlines:Primary and Secondary from the drop-down list, the image changes and always displays the corresponding image from cycle #1 which is very weird.

In general, I am not sure how to access the intermediate images from previous cycles if I’d like to examine the results of the pipleline on a few example images - under ‘windows’ in the main window, I can only click on the images generated in the currrent cycle…

I apologise if these are stupid questions!

Best, Irina

Hi again,

the weird thing with the IdentifySecondary figures happens as well when I save the figures by the way. I was going to upload an example for the case that would help, but uploading .fig files doesn’t seem to work.

What I noticed is that the header of the figures changes as well, e.g. from "“Outlined DistanceCells” when I first open the image (e.g. saved from cycle #2) to “Outlines of Nuclei and DistanceCells on Input Image, cycle #1” when I choose “Outlines: Primary and Secondary”, and when I choose “Outlines: Secondary” again, then the heading becomes “DistanceCells Outlined on Input Image, cycle #1” - and that happens no matter which cycle I want to look at.

Any help is highly appreciated!!!



The first bug you mention (the 2008b waitbar) was fixed in 7892, so if you update to that revision it will be fixed. The second bug, we must have never noticed- because I just checked and it still remains in our most recent revision. The expected behavior is that the figure changes to correspond to the current cycle, so the only way to see the figure from a previous cycle is to save it and select Save Every Cycle. However, it appears that the bug occurs even in saved figures so this doesn’t really help you if you want to toggle back and forth from image to outlines to colored label etc. The best solution is to save whatever you’re interested in (the image with outlines overlaid, or the label matrix) and then you can look at the corresponding image for each cycle. We have a new version of CellProfiler (written in Python) coming out soon in beta that will not have either of these problems!


Hi Kate,

I realise that this is probably an awefully stupid question, but where can I find the 7892 revision?!

Thanks for CP by the way! I’ve tried a commercial software for a bit but this is so much better!!!

Cheers, Irina

No, I misinterpreted your question. I thought when you said you had the developer’s version that you had checked out our code from its repository, in which case you can update to whatever version you want. Instead, you can make the modification to your code to fix this problem yourself (see this post viewtopic.php?f=2&t=600&p=2243&hilit=waitbar#p2243) if you have the “Developer’s Version” from our website.

I should have been more clear :smile:


Hi again,

yes, I got the developer’s version from the website. My CPwaitbar function says

% Revision: 7496

is2008b = str2num(strrep(strtok(version),’.’,’’)) > 760324;
if is2008b && nargin > 2, % Updating previously created waitbar
fin = varargin{2};
userData = get(fin,‘userdata’);
fout = waitbar(varargin{:});
userData.Application = ‘CellProfiler’;
userData.ImageFlag = 0;
if is2008b, userData.FractionInput = get(fout,‘userdata’); end
set(fout, ‘Color’, [0.7 0.7 0.9], ‘UserData’,userData);

which is why I thought the problem had been fixed already…

Is there a repository with matlab functions as well? The only programming language I know so far is R so I thought I’d try the matlab-based CP to get started - but I have to say I haven’t quite got the hang of it yet… :confused:

Thanks, Irina

So I can only replicate this error when I close the waitbar before it’s finished updating… does this error occur no matter what you do (showing all windows, not showing all windows, closing the waitbar, not closing the waitbar, etc)?

It may not be related to 2008b but something else in how CalculateStatistics updates the waitbar.

Hi again, sorry for the late reply (have been away…). Yes, the error occurs no matter what I do to the figures. The exact thing that happens is that the waitbar shows up for a bit, but doesn’t get updated, and then the error message gets displayed. It doesn’t happen with e.g. the ExportToExcel waitbar by the way so I guess you’re right assuming that it is something specific to the CalculateStatistics module… Thanks for your help!