It would be good to have a dicom reader. There’s a large number out there, but I have the feeling it needs to be a C/C++ library such that our IO doesn’t depend on Python/MATLAB (and I’m not aware of a good library for MATLAB anyway). Of course, that will create another (optional) dependency…
There’s a variety of candidates. I’d prefer ITK as it’ll take care of a lot of stuff, but it is rather huge just to use it for IO. Of course, a bonus is that ITK comes with lots of other file formats. This is the option I chose for STIR (ITK can be built with fewer modules such that we could exclude stuff). In fact, with not too much work, I believe that we might be able to use STIR IO for MR images as well (it’ll fall back to ITK if all else fails and ITK is installed). Alternatively, ITK’s DICOM support relies on gdcm which is much more lightweight.
Another option is to not have native reading of DICOM (and other formats) in SIRF, but provide either advice, or a convertor (which will then have the above dependencies). @bathomas has written such a tool that we can make public. it is ITK based.
It would be good to have a dicom reader. There’s a large number out there, but I have the feeling it needs to be a C/C++ library such that our IO doesn’t depend on Python/MATLAB (and I’m not aware of a good library for MATLAB anyway). Of course, that will create another (optional) dependency… There’s a variety of candidates. I’d prefer ITK as it’ll take care of a lot of stuff, but it is rather huge just to use it for IO. Of course, a bonus is that ITK comes with lots of other file formats. This is the option I chose for STIR (ITK can be built with fewer modules such that we could exclude stuff). In fact, with not too much work, I believe that we might be able to use STIR IO for MR images as well (it’ll fall back to ITK if all else fails and ITK is installed). Alternatively, ITK’s DICOM support relies on gdcm which is much more lightweight.
Another option is to not have native reading of DICOM (and other formats) in SIRF, but provide either advice, or a convertor (which will then have the above dependencies). @bathomas has written such a tool that we can make public. it is ITK based.