Allow displaying different segments with different colors#326
Allow displaying different segments with different colors#326igoroctaviano merged 21 commits intomasterfrom
Conversation
|
Here's the code health analysis summary for commits Analysis Summary
|
There was a problem hiding this comment.
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