Chores
- Update .gitattributes for merge strategies and diff management
([184](https://github.com/bhklab/med-imagetools/pull/184),
[`8fef781`](https://github.com/bhklab/med-imagetools/commit/8fef781fcc9b3b58f13b76ef4696da8cf61b1a04))
Continuous Integration
- Update CI workflow and add JUnit test reporting
([192](https://github.com/bhklab/med-imagetools/pull/192),
[`8ccc0c0`](https://github.com/bhklab/med-imagetools/commit/8ccc0c0e2ac1c755e7f203c24c4d878b4dd3a49e))
- **CI/CD** - Simplified GitHub Actions workflow to focus on main branch - Added JUnit test result
summary reporting - Enhanced test job error handling
- **Development Tools** - Updated pytest configuration for improved test reporting and caching -
Refined linting configuration - Added new development task to clean cache and coverage files
Features
- Add Test Data classes to download from github releases
([194](https://github.com/bhklab/med-imagetools/pull/194),
[`3385682`](https://github.com/bhklab/med-imagetools/commit/3385682c23ae6b574ff1858e4b014b7de79cbd85))
❯ pixi run -e default imgtools --help Usage: imgtools [OPTIONS] COMMAND [ARGS]...
A collection of tools for working with medical imaging data.
Options: -q, --quiet Suppress all logging except errors, overrides verbosity options. -v, --verbose
Increase verbosity of logging, overrides environment variable. (0-3: ERROR, WARNING, INFO, DEBUG).
--version Show the version and exit. -h, --help Show this message and exit.
Commands: dicomsort Sorts DICOM files into directories based on their tags. find-dicoms A tool to
find DICOM files.
versus using `med-imagetools[test]` ❯ pixi run -e dev imgtools --help Usage: imgtools [OPTIONS]
COMMAND [ARGS]...
Commands: dicomsort Sorts DICOM files into directories based on their tags. find-dicoms A tool to
find DICOM files. testdata Download test data from the latest GitHub release.
- **New Features** - Added GitHub release management functionality for medical imaging test data.
- Introduced new classes for handling GitHub releases and assets. - Implemented methods for
downloading and extracting test datasets. - Enhanced command-line interface with a new command
for downloading test datasets based on availability. - Expanded platform support in project
configuration.
- **Documentation** - Updated README with improved layout and badge presentation. - Enhanced
project configuration in `pyproject.toml` and `pixi.toml`.
- **Tests** - Added comprehensive test suite for GitHub release data management. - Created
fixtures and test methods to validate release retrieval and extraction. - Enhanced test coverage
with additional scenarios for error handling.
Refactoring
- Enhance modules classes; StructureSet, PET, Dose, with factory methods
([185](https://github.com/bhklab/med-imagetools/pull/185),
[`093eab0`](https://github.com/bhklab/med-imagetools/commit/093eab03f441049f9bec4b457e4e24185218f7d7))
Walkthrough
This pull request introduces significant refactoring across multiple modules in the image tools
library, focusing on DICOM reading and processing functions. The changes centralize image reading
functionality into a new `read_image` utility function in the `utils.py` module, rename several
method signatures to use a more generic `from_dicom` approach, and improve the handling of DICOM
metadata across different image types like Dose, PET, and StructureSet. The modifications aim to
standardize the DICOM reading process and enhance code modularity.
Changes
| File | Changes | |------|---------| | `src/imgtools/io/loaders/old_loaders.py` | - Updated
`read_dicom_rtstruct` with optional `roi_name_pattern` parameter<br>- Modified method calls for
`StructureSet`, `Dose`, and `PET` object creation | | `src/imgtools/modules/dose.py` | - Removed
local `read_image` function<br>- Renamed `from_dicom_rtdose` to `from_dicom`<br>- Imported
`read_image` from `.utils` | | `src/imgtools/modules/pet.py` | - Removed local `read_image`
function<br>- Renamed `from_dicom_pet` to `from_dicom`<br>- Imported `read_image` from `.utils` |
| `src/imgtools/modules/segmentation.py` | - Added new `from_dicom` class method<br>- Added
`from_dicom_seg` alias method | | `src/imgtools/modules/structureset.py` | - Added `from_dicom`
method as alias for `from_dicom_rtstruct`<br>- Reintroduced `roi_names` and `has_roi` methods<br>-
Renamed `_extract_metadata` to utilize new `RTSTRUCTMetadata` type | |
`src/imgtools/modules/utils.py` | - Added new `read_image` utility function for DICOM series
reading |
- Refactor find-dicom logic + docstring formatting, closes 149
([186](https://github.com/bhklab/med-imagetools/pull/186),
[`da363d6`](https://github.com/bhklab/med-imagetools/commit/da363d62d559d00d4714a25014b6d874de506456))
- **Documentation** - Improved docstring formatting for better readability in DICOM-related utility
functions - Enhanced parameter descriptions in documentation
- **Chores** - Reformatted code for improved readability - Slight modifications to code structure
without changing core functionality
- Remove unused imports for future re-introduction
([188](https://github.com/bhklab/med-imagetools/pull/188),
[`cf5cbd0`](https://github.com/bhklab/med-imagetools/commit/cf5cbd02581d30168e261aff37d45a1a2b12d720))