Cellprofiler 3D threshold error

cellprofiler

#1

Hi,
I have been trying to segment DAPI stained nuclei with the new 3D functionality. I am getting the following error when processing the Threshold module:

Failed to run module Threshold
Traceback (most recent call last):
File “CellProfiler\cellprofiler\gui\pipelinecontroller.py”, line 2887, in do_step
File “CellProfiler\cellprofiler\pipeline.py”, line 2022, in run_module
File “CellProfiler\cellprofiler\modules\threshold.py”, line 658, in run
File “CellProfiler\cellprofiler\modules\threshold.py”, line 740, in get_threshold
File “CellProfiler\cellprofiler\modules\threshold.py”, line 844, in _threshold_otsu3
File “site-packages\centrosome\threshold.py”, line 237, in get_adaptive_threshold
File “site-packages\scipy\interpolate\fitpack2.py”, line 1174, in init
error: (1<=kx && kx<=5) failed for 5th keyword kx: regrid_smth:kx=0

I have built this pipepline from scratch in v3 and am not doing anything complicated at this stage (just want to see if it can actually segment my cells well enough in 3D). I only Resize (0.5) and medianFilter prior to thresholding.
Any help would be appreciated.
Cheers.


#2

Hi,

Can you upload your pipeline and the sample image causing the error? Thanks!


#3

180223 DAPI screen 3D stepXstep.cppipe (11.7 KB)

here is the pipeline, I haven’t tested past the threshold module though.
Having problems with the image upload (can’t tell the image size and stating it may be corrupt). They work fine in imageJ and can be visualised in Windows…


#4

Can you upload it to GoogleDrive/Dropbox/etc and post a link?


#5

https://www.dropbox.com/s/d6szx08qeu57j5l/test5.tif?dl=0

Let me know if you can access this. It is a reduced size/stack version of my image.


#6

Hi,

I found the source of your error- it appears to be thrown when you’re doing Adaptive thresholding but your adaptive window size is >50% the size of your image. I’ve filed a bug report here, but the simplest thing to do is simply adjust your adaptive window size (or use global thresholding).


#7

Hi, thanks for looking into that for me. I will take another look at it with smaller window sizes (the original image is much larger than the small cropped version I added to dropbox). I have been trying without thresholding by moving straight to watershed (I preprocess my images which is kind of like a thresholding in its own right I suppose) and this has been working well so far.
I have a complex dataset (tightly packed nuclei) but remain hopeful that 3D cellprofiler can do the job.

Cheers.