Picai-prep

Latest version: v2.1.6

Safety actively analyzes 623092 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 2

2.1.6

What's Changed
* Remove common prefixes from filenames when checking DICOM slice filenames by joeranbosma in https://github.com/DIAGNijmegen/picai_prep/pull/45
* dcm2mha type hinting and output filename by joeranbosma in https://github.com/DIAGNijmegen/picai_prep/pull/46


**Full Changelog**: https://github.com/DIAGNijmegen/picai_prep/compare/v2.1.4...v2.1.6

2.1.4

What's Changed
* dcm2mha: remove localizer slices, improve logging by joeranbosma in https://github.com/DIAGNijmegen/picai_prep/pull/39
* dcm2mha: reduce memory usage by joeranbosma in https://github.com/DIAGNijmegen/picai_prep/pull/42
* Update README with dcm2mha options by snorthman in https://github.com/DIAGNijmegen/picai_prep/pull/43
* mha2nnunet: reduce logging about skipping cases by joeranbosma in https://github.com/DIAGNijmegen/picai_prep/pull/44


**Full Changelog**: https://github.com/DIAGNijmegen/picai_prep/compare/v2.1.3...v2.1.4

2.1.3

- Logging mha2nnunet (https://github.com/DIAGNijmegen/picai_prep/pull/32): Write the traceback to the log when an error occurs, instead of silently
continuing.
- mha2nnunet: skip converted cases (https://github.com/DIAGNijmegen/picai_prep/pull/35)

2.1.2

* Verify DICOM filenames bugfix (https://github.com/DIAGNijmegen/picai_prep/pull/31)
* Improve robustness (https://github.com/DIAGNijmegen/picai_prep/pull/29)
- Read metadata more reliably
- Cleanup terminal output, by prioritizing dicom.zip
- Cleanup spacing naming & ensure in-plane resolution

2.1.0

**Read dicom zip**
Implemented new `DICOMImageReader` to organise DICOM reading:
- Read DICOM data from a folder or dicom.zip.
- Improve support with `pydicom`: image origin and direction are now set correctly.
- Fix metadata reading with `pydicom`: metadata is now read in the same way as `SimpleITK`.
- Cleanup: split image reading with `SimpleITK`/`pydicom` to separate functions. Move `pydicom`-specific function `get_pydicom_value` to `dcm2mha.py`.
- Update slice from which metadata is read to align with `pydicom` (now orientation etc. is read from the same slice as the metadata, which is better consistency anyway).
- Added unit tests to verify image reading with `SimpleITK` and `pydicom`.

Add metadata reading to `DICOMImageReader`:
- metadata can now be read without extracting anything from the dicom.zip.
- bring the responsibility for checking DICOM filenames to `DICOMImageReader`.
- added tests for reading from dicom.zip.

2.0.0

**Major updates:**
* Archives are now converted case-by-case, instead of performing each phase after the other (i.e. collecting metadata for all cases, then converting images).
* Logging has improved and now offers three levels of verbosity: 1) show full case log when something goes wrong (default), 2) show full log for all cases, and 0) off.
* Improved usability of command-line interface: both DICOM → MHA and MHA → nnU-Net conversions are now available, as well as the generation of the conversion settings.
* Conversion of dynamic contrast-enhanced (DCE) scans is now supported (but experimental, feedback is welcome).

**Updates that may require you to update your existing scripts:**
* Some parameter names have changed (e.g. `input_path` to `input_dir` in `MHA2nnUNetConverter`). Please refer to the README or source code for the new values.
* Conversion settings for DICOM → MHA now require the `patient_id` and `study_id` for each item.

**Minor updates:**
* Multiprocessing is now optional. Set `num_threads=1` to turn off.
* Improved creation of dataset.json for nnUNet raw data archive.
* Any DICOM tag can now be used to match cases to their target MHA file.
* The way values from DICOM tags are matched with the provided values is now configurable. See Dicom2MHAConverter's docstring for details.

**Improved testing:**
* Test DICOM → MHA conversion from both Python and the command line interface
* Test conversion of DCE scans

Page 1 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.