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.
- Update lockfile
(
9069f4f
)
- Push release candidates to pypi
(
2120f9f
)
- Update lockfile
(
f3c4837
)
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.
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.
Introduce the BoxPadMethod enum for padding flexibility in RegionBox. Update import paths and remove deprecated modules to streamline the codebase.
- Update lockfile
(
3ff9ca1
)
-
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.
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 deprecatedVector3D
. - Added a new test for validating example dataset images.
-
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.
-
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.
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.
- Fix subheading README.md
(
18c41b9
)
-
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.
- Introduced the
-
Bug Fixes - Implemented error handling for bounding box operations to ensure valid dimensions.
-
Refactor - Removed existing
Image
class fromtypes.py
. - Restructured image and geometric type handling across multiple modules. -
Tests - Introduced a comprehensive test suite for
Vector3D
,Size3D
,Coordinate3D
, andSpacing3D
classes. -
Chores - Updated linting configuration to include new paths and exclude deprecated files.
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.
- Fix readme formatting
(
5c76c77
)
-
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
toMedImageTestData
- 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
-
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
-
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
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
andpixi.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.
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.
| 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
)
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
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.
-
New Features - Added
PatternResolver
for parsing and resolving filename patterns. - EnhancedImageGeometry
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 thecommon.py
file, removing obsolete functionality.
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.
- Bug Fixes - Improved image resampling and resizing functions with more precise rounding and type handling. - Enhanced parameter validation to ensure consistent integer conversion.
Co-authored-by: Joshua Siraj [email protected]
-
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.
- Update .gitignore to exclude SQLite and database files
(
95a2179
)
-
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.
-
Configure Git credentials for GitHub Actions and update documentation deployment step (
adf4e04
) -
Update GitHub Actions workflow for concurrency and permissions; (
45cddb4
)
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.
-
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.
- Pipeline entry no longer needs to manually configure loglevel
(
66f8119
)
- deps: Update med-imagetools to version 1.9.1 and update sha256 checksum
(
ab77c58
)
- logging: Simplify logger configuration and enhance environment variable handling
(
c1f624b
)
- Downstream bug where datagraph.py was missing from wheel due to data* being ignored in .gitignore
(
2dbb245
)
- Fix broken images
(
a7d0e3a
)
-
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
- Update README with new CLI point and reorganize, and formatting
(
96c6ab6
)
- Common prefix for tree
(
a940969
)
- Add dicomsorting cli entry
(
d435f93
)
-
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
-
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
-
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
- Ci-cd - add id in release for pypi step
(
7abd175
)
- Update ci to release to pypi
(
a92a41f
)
-
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
)
-
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
- Upload latest version to pypi
(
1debad3
)
- Format toml
(
269f55d
)
- Bump version
(
58ec67f
)
-
feat: semantic release
-
fix: if statement issue