fix: changeColorMap example#2812
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe colormap example now waits for the PT volume to load, configures CT and PT together with modality-specific transfer functions, enables fusion, and renders the combined viewport. ChangesFused volume colormap setup
Estimated code review effort: 2 (Simple) | ~10 minutes Sequence Diagram(s)sequenceDiagram
participant run
participant CTVolume
participant PTVolume
participant VolumeViewport
run->>CTVolume: create CT volume
run->>PTVolume: start load
run->>VolumeViewport: setVolumes with CT and PT actors
VolumeViewport->>VolumeViewport: apply CT and PET transfer functions
run->>VolumeViewport: enable fusion and render
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/tools/examples/changeColormap/index.ts`:
- Around line 204-215: Update the viewport setup flow around viewport.setVolumes
to await its asynchronous completion before setting fused and calling
renderingEngine.render(), ensuring rendering occurs only after both volume
actors are configured.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 69e4feef-5bf6-421b-9d73-80dcbda3f012
📒 Files selected for processing (1)
packages/tools/examples/changeColormap/index.ts
60b63eb to
849e7ae
Compare
Context
example is broken:
https://www.cornerstonejs.org/live-examples/changecolormap
this example demonstrate issue reported in #826 & #2384
depending on color map, there is an opacity "jump" between 99% and 100%
Changes & Results
Testing
Checklist
PR
semantic-release format and guidelines.
Code
etc.)
Public Documentation Updates
additions or removals.
Tested Environment
Summary by CodeRabbit