ANTsX / ANTsPy

A fast medical imaging analysis library in Python with algorithms for registration, segmentation, and more.
https://antspyx.readthedocs.io
Apache License 2.0
608 stars 161 forks source link

Request for ANTsPy version of ConvertImagePixelType in ANTs #506

Closed novafae closed 5 months ago

novafae commented 11 months ago

Is your feature request related to a problem? Please describe. I'm always frustrated that the default data output is float because of how much memory & storage space it takes up.

Describe the solution you'd like Ideally, I would love an option to select the bit depth of output images and to include uint16 and int16 as a supported pixeltype. However, I've used ConvertImagePixelType in ANTs as a post processing step to convert images to lower bit depths. I would like to be able to do this in ANTsPy as well. (Apologies if it's here and I just can't find it).

Describe alternatives you've considered I've tried using image_type_cast but uint16 is not supported

ncullen93 commented 5 months ago

Only uint8 ("unsigned char") and uint32 ("unsigned int") are supported at the moment, sorry. I think it mostly has to do with keep the builds as small as possible. It may be revisited in the future.