-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
fix(rt): enhanced RT support, utilize SVGs for rendering. #4074
Conversation
✅ Deploy Preview for ohif-platform-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for ohif-dev ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #4074 +/- ##
==========================================
- Coverage 46.23% 44.41% -1.83%
==========================================
Files 78 80 +2
Lines 1276 1333 +57
Branches 312 327 +15
==========================================
+ Hits 590 592 +2
- Misses 548 588 +40
- Partials 138 153 +15 ☔ View full report in Codecov by Sentry. |
1 failed test on run #3886 ↗︎
Details:
cypress/integration/study-list/OHIFStudyList.spec.js • 1 failed test
Review all test suite changes for PR #4074 ↗︎ |
extensions/cornerstone/src/init.tsx
Outdated
cornerstoneTools.segmentation.config.setGlobalRepresentationConfig(labelmapRepresentation, { | ||
fillAlpha: 0.5, | ||
fillAlphaInactive: 0.2, | ||
outlineOpacity: 1, | ||
outlineOpacityInactive: 0.65, | ||
}); | ||
|
||
cornerstoneTools.segmentation.config.setGlobalRepresentationConfig(contourRepresentation, { |
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.
remove
Context
This PR changes the rendering process for RT contours, in the past we used to pass the
gemoteryIds
to our render function and create a VTK actor with the contour data.Now, this has changed, we are still passing the
gemotryIds
, however, we take thosegeomtryIds
, and callcache.getGeomtry(geomtryId)
on each one, and use its data to create annotations that represent the contour, which gets stored internally and generate anannotationsUIDsMap
This helps us render the contours using SVG which is much more reliable than VTK.
From a user point of view, nothing is changing in the RT loading process, because you are still creating and caching geometries, we just handle them differently internally to generate SVGs instead of a VTK actor.
You will notice your viewports only have 1 actor after loading an RT, which in the past would become 2 actors (1 for the scan,and 1 for RT).