brainglobe / cellfinder-core

Standalone cellfinder cell detection algorithm
https://brainglobe.info/documentation/cellfinder/index.html
BSD 3-Clause "New" or "Revised" License
19 stars 16 forks source link

[Feature] Cast good tiles mask as `bool` instead of `uint8` #128

Closed dstansby closed 1 year ago

dstansby commented 1 year ago

For some reason the good tiles filter is cast to uint8 here: https://github.com/brainglobe/cellfinder-core/blob/a536a1b2ccaadc6ec1d57a82f7f9e243a6862bdf/src/cellfinder_core/detect/filters/plane/plane_filter.py#L54

Naively I would assume it could be bool type though (that is how it's created), which would save a bit of memory. Someone should follow through where good_tiles_mask is used later in the code, and see if it is possible to instead keep it as a bool here.