-
Notifications
You must be signed in to change notification settings - Fork 44
Allow displaying different segments with different colors #326
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Here's the code health analysis summary for commits Analysis Summary
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements multi-color segment support for medical image segmentations, allowing users to display different segments with distinct colors instead of the previous uniform yellow appearance. This addresses issue #310 and significantly improves the ability to distinguish between multiple segments when viewing complex segmentation data.
Key changes include:
- Added comprehensive color utility functions for segment color generation and management
- Enhanced segment UI components with color picker controls and visual indicators
- Integrated DICOM color metadata extraction with fallback to generated colors
Reviewed Changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| src/utils/segmentColors.ts | New utility module providing color generation, DICOM metadata extraction, and color conversion functions |
| src/utils/tests/segmentColors.test.ts | Comprehensive test suite for the new color utilities |
| src/components/SlideViewer.tsx | Updated to apply segment colors and manage color state with enhanced error handling |
| src/components/SegmentItem.tsx | Enhanced with RGB color picker controls and visual color indicators |
| src/components/SegmentList.tsx | Modified to support color properties in segment style interfaces |
| src/components/SlideViewer/types.ts | Added customizedSegmentColors state property |
| docs/SEGMENT_COLORS.md | Documentation explaining the new multi-color segment feature |
| package.json | Added sonarqube-scanner dependency |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|



#310