CellProfiler/CellProfiler — Issue #42: JIRA [IMG-1567] cpmath or imagesets should be more aware of what a binary image includes
Author: thouis
Created: 2011-11-23 20:49:39+00:00
State: open

Use case:
- Threshold image A
- Threshold Image B
- Multiply threshA and threshB
- MeasureImageAreaOccupied on AtimesB
Result: error because product is not binary, according to MeasureImageAreaOccupied (which only tests dtype == bool).
Not sure the best approach, here:
- Add operations for binary images (AND, OR, XOR)
- Make the Multiply option DTRT if handed two binary images
- Add a"convert to binary" option in ImageMath
- Make cpimage check for (dtype == bool OR all values in {0, 1})
Personally, I like the last, I think.

Original reporter: thouis
Jira link: https://jira.broadinstitute.org/browse/IMG-1567
Assignee: leek