Skip to content

Latest commit

 

History

History
944 lines (566 loc) · 36 KB

CHANGELOG.md

File metadata and controls

944 lines (566 loc) · 36 KB

CHANGELOG

v2.0.0-rc.4 (2025-02-10)

Bug Fixes

  • Add function to handle out of bounds coordinates for a RegionBox in an image (#221, 9949a4f)

This works the same way as _adjust_negative_coordinates, but requires the image as an addition input and modifies the RegionBox object directly.

A message is logged in the debugger if a dimension is adjusted.

I also updated the crop_image function to call this before applying the crop.

v2.0.0-rc.3 (2025-02-07)

Chores

v2.0.0-rc.2 (2025-02-07)

Bug Fixes

  • Push release candidates to pypi (2120f9f)

Chores

  • Comment out PyPI publish step in CI workflow (c42f5eb)

  • Update pixi.lock file (e2c2c5e)

Features

  • Allow CI-CD workflow to run on development branch (d832db9)

  • Update docs and lockfile (6e07540)

v2.0.0-rc.1 (2025-02-07)

Chores

Features

  • Add optional import functionality and clean up dependencies (#217, 9efc491)

Introduce optional import functionality for h5py and pynrrd, while removing unused dependencies and refactoring the codebase for better maintainability.

  • Documentation • Updated installation instructions with new environment setup commands and streamlined guidance.

  • Refactor • Removed legacy imaging processing and indexing functionalities to simplify the toolset.

  • New Features • Enhanced error handling for optional dependencies to offer clearer messaging when modules are missing.

v1.21.1 (2025-02-06)

Bug Fixes

  • Refactor DICOM utilities and enhance documentation (#216, 1ed8de6)

Remove unnecessary sanitization functionality, improve DICOM exception handling, and introduce new utilities for loading and extracting ROI metadata. Update documentation to include references for the new DICOM utilities.

  • New Features - Enhanced support for processing various DICOM file formats with improved metadata extraction and robust error handling. - Introduced cross-platform support for determining optimal file path and filename lengths, along with secure filename sanitization.

  • Refactor - Streamlined DICOM processing by removing legacy parameters and simplifying function interfaces for consistent performance.

  • Tests - Updated the testing suite for improved type safety and reliability, ensuring smoother interactions when handling DICOM files.

Documentation

  • Enhance RegionBox with flexible padding options and module updates (#215, 5f38f49)

Introduce the BoxPadMethod enum for padding flexibility in RegionBox. Update import paths and remove deprecated modules to streamline the codebase.

v1.21.0 (2025-02-06)

Chores

Features

  • Improve AbstractBaseWriter with indexing and add docs (#176) (#189, e147629)

  • New Features - Introduced a unified file writing framework that streamlines saving image and array data across various formats (e.g., HDF5, NIFTI, NumPy). - Enhanced file handling with improved validations for naming, compression levels, and managing existing files, ensuring smooth data export and logging.

  • Tests - Added comprehensive testing to verify file saving operations, error handling, and file indexing, ensuring robust performance across different usage scenarios.

Refactoring

  • Remove Vector3D; update Coordinate3D and enhance RegionBox (#210, c16ae7c)

Remove the Vector3D class, integrating its functionality into Coordinate3D. Update documentation and improve the calculate_image_boundaries function to support world coordinates. Rename variables for clarity and consistency.

  • New Features - Introduced a cropping capability that allows simultaneous cropping of images and their corresponding masks. - Added an optional parameter to select the coordinate system when computing image boundaries. - Added new functions to retrieve example dataset paths and images.

  • Enhancements - Improved 3D coordinate operations to now support integer arithmetic as well as equality and ordering comparisons. - Updated documentation and diagrams to provide a clearer, simplified view of class relationships.

  • Refactor - Removed a legacy 3D vector type to streamline the available coordinate types.

  • Bug Fixes - Simplified exception handling and improved clarity in the BoundingBoxOutsideImageError class.

  • Tests - Expanded test coverage for the new Coordinate3D class, including equality and comparison operations, while removing tests for the deprecated Vector3D. - Added a new test for validating example dataset images.

v1.20.0 (2025-02-06)

Features

  • Add examples module for image dataset tools (#212, a882574)

  • New Features - Introduced new functions for streamlined access to example dataset resources, mapping key identifiers to their corresponding file paths and images. - Added a dynamic capability to conditionally include functionalities based on the availability of test data. - Bug Fixes

    • Enhanced error handling for missing dataset files. - Tests - Added a new test function to verify the integrity and presence of example dataset images.

v1.19.0 (2025-02-04)

Documentation

  • Example usage for functional.py (#190, c2befdc)

  • Chores - Adjusted internal error handling settings for improved type checking.

  • Documentation - Enhanced usage guides by adding examples to image processing functions to assist with proper implementation.

  • Refactor - Streamlined parameter annotations and updated return formats across image transformation operations for better clarity and consistency.

Features

  • Add custom exceptions and utility functions for RTSTRUCT DICOM handling (#211, 0739747)

Introduce custom exceptions and utility functions to improve error handling and data extraction for RTSTRUCT DICOM files.

  • New Features - Introduced enhanced capabilities for processing RTSTRUCT DICOM files, including streamlined load operations and extraction of region-of-interest metadata and identifiers. - Added robust error handling that clearly notifies users of issues during file processing, improving diagnostic feedback. - Expanded the publicly accessible tools to simplify interactions with structure set data, enabling more efficient DICOM workflow management. - New exception classes for better error categorization related to DICOM processing.

v1.18.0 (2025-01-31)

Documentation

  • Fix subheading README.md (18c41b9)

Features

  • Add helper types for 3D spatial operations (#203, ee344d1)

  • Documentation - Added a class inheritance diagram and explanation to the coretypes README. - Introduced detailed documentation for 3D spatial and image-related types.

  • New Features - Added new classes for 3D geometric operations: - Point3D - Size3D - Coordinate3D - Centroid - BoundingBox - Direction - ImageGeometry - MedImage

    • Introduced the RegionBox class for handling 3D bounding boxes.
  • Bug Fixes - Implemented error handling for bounding box operations to ensure valid dimensions.

  • Refactor - Removed existing Image class from types.py. - Restructured image and geometric type handling across multiple modules.

  • Tests - Introduced a comprehensive test suite for Vector3D, Size3D, Coordinate3D, and Spacing3D classes.

  • Chores - Updated linting configuration to include new paths and exclude deprecated files.

v1.17.1 (2025-01-30)

Bug Fixes

  • Mis-handling of string as roi_name for to_segmentation (#206, 358be55)

Remove unnecessary conversion of roi_names from string to list and fix handling when a string is passed to the to_segmentation function.

fixes #205

  • Improvements - Enhanced input handling for ROI names in the segmentation process. - Improved flexibility by allowing both string and list input types for ROI names. - New Features - Added new test cases to validate the functionality of converting ROI points to segmentation images. - Bug Fixes - Updated test data structures for consistency and accuracy.

v1.17.0 (2025-01-29)

Documentation

Features

  • tests: Add test dataset downloading and extraction helpers (#201, 95bfca6)

Release Notes

  • New Features - Enhanced dataset downloading functionality with progress tracking and timeout management - Improved dataset extraction with parallel processing support

  • Improvements - Refined GitHub release management - Updated test data handling and fixtures

    • Improved logging and error handling for dataset operations
  • Changes - Renamed GitHubReleaseManager to MedImageTestData - Updated variable names for better clarity in various modules - Adjusted DICOM file saving parameters

  • Testing - Added new test cases for dataset integrity and download processes - Enhanced type annotations and test fixtures

Refactoring

  • Improve code formatting and structure across multiple files (#198, 230235f)

  • Style - Reformatted code across multiple files to improve readability. - Updated method signatures to use multi-line formatting. - Adjusted import statements and docstring examples. - Enhanced clarity in error messages and logging statements.

  • Chores - Updated Ruff linting configuration. - Adjusted line length limits in configuration files. - Expanded files considered for linting. - Enhanced type clarity and readability in GitHub dataset management classes. - Modified mypy configuration to change file analysis scope and added new sections for specific modules.

  • Some changes that will propagate to all branches (#199, df23476)

  • Configuration Updates - Updated coverage configuration to exclude specific files from reporting - Adjusted pytest cache directory and coverage settings - Removed mypy unreachable code warnings

  • Error Handling - Enhanced pattern resolution with a new MissingPlaceholderValueError - Improved error messaging for missing placeholder values

  • Code Quality - Added type ignore annotations for specific library imports - Minor formatting improvements in string representations

v1.16.0 (2025-01-22)

Chores

  • Update .gitattributes for merge strategies and diff management (#184, 8fef781)

Continuous Integration

  • Update CI workflow and add JUnit test reporting (#192, 8ccc0c0)

  • 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, 3385682)

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, 093eab0)

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
- Modified method calls for StructureSet, Dose, and PET object creation | | src/imgtools/modules/dose.py | - Removed local read_image function
- Renamed from_dicom_rtdose to from_dicom
- Imported read_image from .utils | | src/imgtools/modules/pet.py | - Removed local read_image function
- Renamed from_dicom_pet to from_dicom
- Imported read_image from .utils | | src/imgtools/modules/segmentation.py | - Added new from_dicom class method
- Added from_dicom_seg alias method | | src/imgtools/modules/structureset.py | - Added from_dicom method as alias for from_dicom_rtstruct
- Reintroduced roi_names and has_roi methods
- 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, da363d6)

  • 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, cf5cbd0)

v1.15.0 (2025-01-17)

Features

  • Refactor io module, introduce new abstract base writer (#181, e04008d)

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

v1.14.0 (2025-01-17)

Features

v1.13.0 (2025-01-16)

Features

  • Refactor utility modules, add patternresolver, formt (#170, dcc5aad)

Introduce image utilities and a new PatternResolver class, along with updated dependencies and configuration adjustments. This enhances the project's capabilities for handling image processing and pattern resolution.

Release Notes

  • New Features - Added PatternResolver for parsing and resolving filename patterns. - Enhanced ImageGeometry with a spacing attribute. - Introduced a new method to extract ROI names from DICOM files.

  • Improvements - Updated dependency specifications for numpy, pandas, and rich. - Improved code formatting across multiple files. - Expanded linting coverage for additional Python files. - Enhanced error handling and flexibility in ROI extraction from DICOM files.

  • Documentation - Improved docstrings and code comments for better readability.

  • Chores - Updated CI/CD workflow to support additional branches. - Reformatted configuration files for consistency. - Removed unused import from the io module. - Deleted the common.py file, removing obsolete functionality.

v1.12.0 (2025-01-15)

Features

  • Improve structureset and crawl modules, Refactor tests and improve dataset handling (#165, 5333a80)

v1.11.2 (2025-01-15)

Bug Fixes

  • Replaced capturing regex terms with non capturing in datagraph (#162, 3237b21)

v1.11.1 (2025-01-11)

Bug Fixes

When output_size was not provided to resample function, the size was determined based on the spacing but was floored. This would sometimes incorrectly shrink the image size. Changed to use np.round instead.

Additionally, added the output_size argument to the resample call in the resize function. The output size is already available in the function as new_size, so it doesn't make sense to recalculate it in the resample function.

Summary by CodeRabbit

  • Bug Fixes - Improved image resampling and resizing functions with more precise rounding and type handling. - Enhanced parameter validation to ensure consistent integer conversion.

v1.11.0 (2025-01-02)

Features

Co-authored-by: Joshua Siraj [email protected]

Refactoring

  • Improve logging, logic, and type annotations (#151, ef4d0e7)

  • New Features - Enhanced logging flexibility with new parameters for specifying logger names. - Improved progress reporting in the folder crawling process with descriptive progress bars.

  • Bug Fixes - Updated error handling for invalid file actions and DICOM tag checks for clearer user feedback.

  • Documentation - Improved docstring clarity and formatting across multiple functions.

  • Refactor - Streamlined configuration files for testing and linting processes. - Restructured class and function definitions for better readability and maintainability.

  • Style - Consistent formatting applied to function signatures and docstrings.

  • Modules/datagraph.py (#153, 41a7c88)

v1.10.1 (2024-12-03)

Bug Fixes

  • Update .gitignore to exclude SQLite and database files (95a2179)

v1.10.0 (2024-12-03)

Features

  • Begin indexing database, update find-dicoms cli, add cli documentation (#148, 48598e7)

Release Notes

  • New Features - Enhanced find_dicoms function to support limiting results and filtering by search input.

  • Documentation - Updated installation instructions and expanded "Getting Started" section in the README. - Improved navigation structure in documentation, adding new entries for CLI reference.

  • Bug Fixes - Streamlined error handling and logging for various functions, ensuring clearer outputs and improved functionality.

  • Chores - Updated dependencies and configuration files for better management and performance.

v1.9.4 (2024-11-29)

Bug Fixes

  • Configure Git credentials for GitHub Actions and update documentation deployment step (adf4e04)

  • Update GitHub Actions workflow for concurrency and permissions; (45cddb4)

v1.9.3 (2024-11-29)

Bug Fixes

  • Improve logging maintainability and temporarily remove json logging configuration (#146, afdcc98)

Refactor logging code for improved maintainability by temporarily removing JSON logging functionality.

Update the .gitignore to exclude .dcm and .sqlite files.

Introduce an environment variable for debug logging and set the default log level based on this variable.

Summary by CodeRabbit

  • New Features - Introduced a new LoggingManager class for structured logging management. - Added support for JSON logging configuration (currently commented out). - Added a new environment variable for logging level configuration in development. - New entries in .gitignore to ignore .dcm and .sqlite files. - Enhanced CI/CD pipeline with new jobs for building and publishing documentation.

  • Improvements - Enhanced logging control by utilizing environment variables for log levels. - Updated logging directory structure and default log filename for better organization. - Improved management of logging levels based on verbosity settings.

  • Bug Fixes - Improved handling of logging level discrepancies with user-specified settings.

  • Documentation - Updated docstrings and comments for clarity on new logging setup and features.

v1.9.2 (2024-11-22)

Bug Fixes

  • Pipeline entry no longer needs to manually configure loglevel (66f8119)

Chores

  • deps: Update med-imagetools to version 1.9.1 and update sha256 checksum (ab77c58)

Refactoring

  • logging: Simplify logger configuration and enhance environment variable handling (c1f624b)

v1.9.1 (2024-11-22)

Bug Fixes

  • Downstream bug where datagraph.py was missing from wheel due to data* being ignored in .gitignore (2dbb245)

Documentation

v1.9.0 (2024-11-22)

Features

  • Dicom-finder cli tool, and improve documentation (#142, 2981baa)
  • docs: add mkdocs-include-markdown plugin for Markdown file inclusion

  • docs: add tag helpers documentation for DICOM utilities

  • docs: add documentation for finding DICOM files

  • Update src/imgtools/cli/dicomfind.py

  • feat: add regex filtering and improved logging for dicom_finder function

  • chore: exclude CLI files from coverage reporting

v1.8.2 (2024-11-21)

Bug Fixes

  • Update README with new CLI point and reorganize, and formatting (96c6ab6)

v1.8.1 (2024-11-21)

Bug Fixes

v1.8.0 (2024-11-21)

Features

  • Add dicomsorting cli entry (d435f93)

v1.7.0 (2024-11-19)

Features

  • Implement logging and some standards for ruff config (#134, 7c31019)
  • feat(logging): add structlog integration with custom processors and example logger

  • chore: remove star imports

  • feat(lint): update ruff configuration to include new linting rules and extend exclusions

  • refactor: update pixi.lock and pixi.toml for ruff command structure and remove unused betapipeline entry

  • refactor(logging): standardize string quotes and improve logger configuration handling

  • feat(logging): integrate structured logging and enhance debug information in AutoPipeline and StructureSet

  • fix: #134 (comment)

  • fix: #134 (comment)

  • fix: #134 (comment)

  • refactor(logging): streamline logging configuration and ensure log directory creation

  • chore: add log files to .gitignore to prevent tracking of generated logs

  • fix: Update src/imgtools/logging/init.py

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

  • fix: #134 (comment)

  • chore: update .gitignore to include log files in imgtools directory

  • feat(datagraph): integrate logging for edge table processing and visualization

  • feat(ops): add timing for graph formation and update DataGraph initialization

  • chore: rename workflow from Test to CI-CD and restrict push triggers to main branch

  • feat(crawl): integrate logging for folder crawling and data saving processes

  • fix(structureset): enhance logging for ROI point retrieval errors

  • fix(autopipeline): update logger level to use environment variable for flexibility

  • fix(logging): streamline error handling for log directory creation

  • fix: #134 (comment)

  • refactor(logging): enhance logging configuration and streamline JSON setup

  • chore(pixi.lock): add license_family field for clarity

  • refactor(logging): enhance LoggingManager with valid log levels and improve JSON logging setup

  • refactor(logging): enhance documentation and improve LoggingManager configuration options

  • refactor(logging): validate log level assignment before setting self.level

  • feat(logging): add mypy and type-checking support; refactor logging manager and improve error handling

  • refactor(logging): remove unused Optional import from typing


v1.6.0 (2024-11-15)

Features

  • feat: started port to pixi

  • feat: updated test suite for pixi and started refactor of cicd

  • build: added coverage to gha

  • fix: explicitly direct location of package code and update pixi in pipeline

  • fix: added linux to pixi

  • chore: update GitHub Actions workflow for improved deployment process

  • chore: clean up GitHub Actions workflow by removing commented-out jobs and updating dependencies

  • chore: update GitHub Actions workflow to deploy from both main and devel branches, and refresh dependencies in pixi.lock

  • chore(sem-ver): 1.6.0-rc.1

  • fix: update version_toml path in pyproject.toml for semantic release

  • chore(sem-ver): 1.6.0-rc.2

  • chore: remove requirements.txt file and poetry.lock

  • chore: update authors and maintainers in pyproject.toml, and add version in init.py

  • chore: remove setup.py file as part of project restructuring

  • chore: update pixi.lock and add ruff configuration for linting

  • chore: fix some recommendations from coderabbit


Co-authored-by: semantic-release

v1.5.8 (2024-10-25)

Bug Fixes

  • datagraph: Iteration through edge_types wasnt updated for seg (#131, e7cca2a)
  • fix(datagraph): update edge_types to 8 and handle new edge type for SEG->CT/MR mapping in final dataframe processing

  • fix(pyproject): update attrs version constraint to allow all 23.x versions and above

v1.5.7 (2024-10-23)

Bug Fixes

  • Ci-cd - add id in release for pypi step (7abd175)

v1.5.6 (2024-10-23)

Bug Fixes

  • Update ci to release to pypi (a92a41f)

v1.5.5 (2024-10-23)

Bug Fixes

  • Remove deprecated pydicom.dicomdir.DicomDir variable type option (#130, 56ef37e)
  • fix: remove deprecated pydicom.dicomdir.DicomDir variable type option

  • style: removed Union since dicom_data can only be a FileDataset

  • refactor: remove Union import for linting

  • Update ci to use semver bot (98e3bd0)

Chores

  • #126 update docstring for StructureSetToSegmentation (reopen) (#128, 272078c)
  • chore: bump artifact action version

  • refactor: update StructureSetToSegmentation docstring and remove unused dev group in pyproject.toml

  • chore: fix download action in workflow to use correct artifact version

  • chore: correct instantiation reference and update parameter description in StructureSetToSegmentation docstring

  • chore: enhance StructureSetToSegmentation docstring to support None as a roi_names option for loading all ROIs

v1.5.4 (2024-06-12)

Bug Fixes

v1.5.3 (2024-06-10)

Bug Fixes

v1.5.2 (2024-05-29)

Bug Fixes

  • Upload latest version to pypi (1debad3)

v1.5.1 (2024-05-29)

Bug Fixes

v1.5.0 (2024-05-29)

Features

v1.1.0 (2024-05-29)

Bug Fixes

  • Add codecov badge (f43d042)

  • Explicit module to track for code coverage (f15d45d)

Chores

Features

  • feat: semantic release

  • fix: if statement issue

v1.0.3 (2022-10-14)