-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: merge all channel-specific attributes of the Image class (#…
…1191) Also make all except `data` arguments keyword only <!-- Generated by sourcery-ai[bot]: start summary --> ## Summary by Sourcery Refactor the Image class to consolidate channel-specific attributes into a unified channel_info attribute, enforce keyword-only arguments, and update tests accordingly. Enhancements: - Refactor the Image class to merge all channel-specific attributes into a single channel_info attribute, improving the organization and management of channel metadata. - Introduce decorators to handle deprecated arguments and enforce keyword-only arguments for the Image class, enhancing code clarity and future-proofing. - Add utility functions for color conversion from hex and named colors to RGB, supporting more flexible color specifications. Tests: - Update tests to accommodate the refactored Image class, ensuring compatibility with the new channel_info attribute and keyword-only arguments. <!-- Generated by sourcery-ai[bot]: end summary --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Release Notes - **New Features** - Introduced `ChannelInfo` and `ChannelInfoFull` classes for enhanced channel metadata management. - Updated image processing to use `spacing` instead of `image_spacing`, improving parameter clarity. - **Bug Fixes** - Corrected parameter names across various tests and functionalities to align with the updated `Image` class interface. - **Tests** - Updated numerous test cases to reflect changes in parameter names and structures, ensuring consistency throughout the test suite. - Added a new test for saving color images with specific channel information. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
- Loading branch information
1 parent
2f6c259
commit c417134
Showing
23 changed files
with
567 additions
and
231 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.