pyplati / platipy

Processing Library and Analysis Toolkit for Medical Imaging in Python
https://pyplati.github.io/platipy/
Apache License 2.0
103 stars 24 forks source link

SimpleITK 2.3.0 might be breaking Platipy #232

Closed denbonte closed 8 months ago

denbonte commented 9 months ago

Dear @pchlap and @rnfinnegan,

Good day... again 😆

We thought you folks might want to know we noticed the following error raised by SimpleITK when running Platipy with SimpleITK==2.3.0 instead of SimpleITK==2.2.1 (or the previous versions, for that matter, I guess - although we tested it for 2.2.1 only!):

sitk::ERROR: Pixel type: 64-bit unsigned integer is not supported in 3D byN3itk6simple22MaskNegatedImageFilterE

Looking at your poetry.lock file, it seems if a user freshly installs Platipy in an environment (e.g., using conda and through pip), the package manager will pull 2.2.1 and all is good. However, I guess Platipy is pretty loose on which version of SimpleITK to use and will allow other SimpleITK installations. By chance, we built an MHub container with 2.3.0 and voilà.

We are pretty convinced this is on SimpleITK as we tested this with platipy==0.6.1 and platipy==0.7.0, using NIfTI files generated from DICOM using multiple tools (Plastimatch and dcm2niix), and everything works with SimpleITK==2.2.1 but not with SimpleITK==2.3.0.

On our side, we'll fix the SITK version to SimpleITK==2.2.1 - but you might want to look into this for the future 😄

Thanks again for all your work!

pchlap commented 9 months ago

Thanks for another bug report @denbonte! I am looking into this now.

The main reason we don't want to upper pin libraries in platipy is that some features in the library are useful within other projects (especially the image visualiser). Therefore we don't want to be restrictive as to which versions of libraries are required as this many be a limitation for other projects.

I should be able to resolve this one I think. But I suppose that this kind of issue may continue to pop up from time to time as libraries such as SimpleITK are updated.

One thing we could consider is that for the cardiac extra (used by installing with pip install platipy[cardiac]) we pin the support library versions, but when installing the base platipy library (pip install platipy) we leave the supported upper end of libraries open. I will think about it and will discuss with @rnfinnegan. In the meantime, I will look at solving the issue you've flagged above.

pchlap commented 8 months ago

Thanks again @denbonte, this should now be resolved in platipy v0.7.1