RFR: IO cleanup

Maël Primet mael.primet at gmail.com
Sun Nov 7 12:32:48 EST 2010


I agree with previous post,

usually, uint8 makes sense because it is the "usual image format", uint32
allows to handle image of labels (where there might be more than 255
labels), I don't really see an use for uint16 from what I've experienced (we
might convert them to uint32, I'm not sure the x2 memory loss might be too
problematic here), and float32 is often used. I more rarely use float64,
except sometime inside an algorithm (rather than in input/output images).

For some algorithms, it makes sense to have a uint8 version, for some it
doesn't. I'd say we should let the user make the conversions from/to the
algorithm intended format himself, so he knows that the algorithm isn't
intended for its  original  data format, and he  takes  special care in
understanding why (rather than using an  inapropriate  algorithm and not
worrying  about  the possible effects)

but we should clearly have conversion routines, that might also ensure that
arrays are contiguous (to speed-up C/ Cython ), and possibly to ensure that
we copy the array so we can modify it
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scikit-image/attachments/20101107/e4c7ec40/attachment.html>


More information about the scikit-image mailing list