Problem with RescaleIntensity module

I just start a pipeline using CellProfiler 2 but there seems to have a problem with the RescaleIntensity module. We have 12 bits image saved in 16 bits, so we have to rescale the histogram.
When I apply the rescale intensity, I get this error message:

Error while processing RescaleIntensity:
too many values to unpack

Traceback (most recent call last):
File “cellprofiler\gui\pipelinecontroller.pyc”, line 792, in do_step
File “cellprofiler\modules\rescaleintensity.pyc”, line 214, in run
ValueError: too many values to unpack

I’m using v.9777 of CellProfiler
It was working fine with CellProfiler 1
Is there something I should do different ?

Thanks,
Daniel

Hi Daniel,

We have noticed this behavior ourselves and corrected it. If you download our newest beta build from our website, your pipeline should work (I believe we’ve just placed a new beta without increasing the version number so it’s still v9777).

As a side note, we noticed this behavior when loading a CP1.0 pipeline in CP2.0. If this is what is occurring with you, you can get around this by adding the RescaleIntensity module yourself in CP2.0, with these settings:

  • Select rescaling method:Choose specific values to be reset to the full intensity range

  • Use the minimum intensity value as the lower limit?:No

  • Use the maximum intensity value as the upper limit?:No

  • Enter the intensity range for the input image:0,0.0625

  • Select method for rescaling pixels below the lower limit:Set to custom value

  • Enter custom value for pixels below lower limit:0

  • Select method for rescaling pixels above the upper limit:Set to custom value

  • Enter custom value for pixels below upper limit:1

Regards,
-Mark

Thank you for the fast answer.
I just downloaded the last CellPorfiler and it solves the problem if I use the exactly the same parameters you mentioned.
Unfortunately, I also have to use (in another pipeline) these two parameters:
Use the minimum intensity value as the lower limit?:Yes
Use the maximum intensity value as the upper limit?:Yes

When I check yes for these two parameters, I get the same error message as before.

Daniel

Hi Daniel,

We have also fixed this behavior as well, and it will be included in the next release. When we release it, I’ll notify you on this post.

Regards,
-Mark

In the meantime, there is a workaround: use the ‘Stretch each image to use the full intensity range’ option.