alan-turing-institute / pixelflow

BSD 3-Clause "New" or "Revised" License
5 stars 4 forks source link

README fix and expanded mask types #65

Closed jameswilsenach closed 4 months ago

jameswilsenach commented 4 months ago
  1. Syntax and import (numpy.typing) fixes to README.
  2. Added line to make boolean and float masks cast to int.
  3. Alternatively, floats could be binarised or the labels generalised using np.unique followed by reassignment but this may be opaque as to how the float -> label mapping is implemented. Perhaps an error should be thrown specifically for non-int/bool masks. Boolean masks seem justified given the abundance of thresholding methods that use it (e.g. in skimage).