In its current version, class DicomSeriesReader has around 2500 lines of code, which makes it hard to maintain.
In addition, there have been cases where the hard-coded default frame sorting algorithm fails to work in an expected way (e.g. multi-phase acquisitions with minimal shift between phases).
I have been working on a new version of the reader which is now ready for a review and could soon be integrated into master. The code
- is structured accross multiple classes in a module of its own
- is more flexible / configurable regarding the frame sorting
- can be more easily enhanced to cover multi-frame DICOM images
- will be helpful for the diffusion module (disussed with Jan Hering)
The current tests from module DICOMTesting were moved to test the new infrastructure and are by now passing again.
Summary of the structure of the work-in-progress branch:
- new module DICOMReader
- module DICOMTesting moved from Core to Modules
- and changed to use/test the new code
- Doxygen documentation is in this branch is considered part of this bug's documentation. When generated, the most important parts are
- group__DICOMReaderModule.html
- classmitk_1_1DICOMITKSeriesGDCMReader.html
- regarding flexibility:
- classmitk_1_1DICOMFileReaderSelector.html
- classmitk_1_1DICOMReaderConfigurator.html
To visually test the code within mitkWorkbench, I also pushed a debugging branch
personal/maleike/dcm-ugly-loader
which reuses the file import button of the DICOM editor to load files via the new code. (this branch should never be integrated)
A number of smaller issues is marked with TODO lines in the code itself.
We can setup a meeting if this helps in discussing this branch.