[WIP] feat/decimated loading#6034
Open
mbellehumeur wants to merge 61 commits into
Open
Conversation
…mands and components
…ds for sample distance multiplier and volume reload with decimation
…on logic for improved performance and memory management
…h parsing from volumeId for improved clarity and maintainability
…nfig threshold and refactoring related functions
…s and display sets
…nt to use AllInOneMenu for improved layout and organization
…nality and update related components for improved clarity
… in display sets and enhance event broadcasting
…etrieve display set from volume ID
…umeLoader format and update IJK decimation parsing to handle baseVolumeId with colons
…cessary nesting and improving readability
…e volume ID generation logic for improved clarity and performance
…ommented code and unnecessary whitespace for improved readability. Add doc.
… and remove unused import for improved clarity
…RenderingPresets components by integrating props instead of hooks for improved flexibility and clarity
…ecimation messages in the viewport, enhancing user feedback on volume rendering changes
…omizationService for volume decimation settings, improving configuration flexibility and clarity
…bling volume-specific options and enhancing user interaction with volume rendering settings
…CompassMenu component for enhanced 3D viewport orientation control
…port3DCompassMenu with spin controls for improved 3D viewport interaction
…r center sphere and adjust layout for spin controls
…sMenu for accurate 3D viewport interaction
…nto VolumeOptionsMenu for enhanced volume manipulation features
… and integrate GPU performance testing utility for improved volume rendering settings
…stone tools and integrate it into volume3D tool group with configuration options
…tions for clipping plane rotation
…n, and yarn.lock for improved stability and performance
… feat/decimatedVolumeLoading
…d lerna for improved project management
…playSetFromVolume for improved clarity and functionality
… settings and broadcast updated viewport data
…g default volume options
…nd adjust default volume options
…js to netlify.js for improved configuration management
…lehumeur/Viewers into feat/decimatedVolumeLoading
…texture management
… is fixed in CS3D.
Co-authored-by: Dan Rukas <dan.rukas@gmail.com>
…ys.tsx Co-authored-by: Dan Rukas <dan.rukas@gmail.com>
…ys.tsx Co-authored-by: Dan Rukas <dan.rukas@gmail.com>
❌ Deploy Preview for ohif-dev failed. Why did it fail? →
|
…ving redundant conditions
…ts and simplify volume options
…r and enhance overlay visibility logic
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
Changes & Results
Testing
Checklist
PR
semantic-release format and guidelines.
Code
etc.)
Public Documentation Updates
additions or removals.
Tested Environment
Greptile Summary
This WIP PR introduces decimated volume loading for 3D rendering in OHIF: volumes exceeding a configurable voxel threshold are automatically downsampled via a new
decimatedVolumeLoader, a GPU benchmark runs at startup to calibrate sample-distance defaults, and a newSmartScrollbartracks per-slice load/viewed state with a visual progress fill.applyAutoDecimationIfNecessaryestimates voxel count from display-set metadata and selects an IJK decimation tuple;CornerstoneCacheServiceconstructs adecimatedVolumeLoader:…:I_J_Kvolume ID and passes it to Cornerstone's volume cache; anAutoDecimationOverlaybadge notifies the user when a volume has been reduced.gpuPerformanceTest): measures triangle throughput, texture upload, and buffer operations via a temporary off-screen WebGL canvas; stores ageneralPerformanceScoreinlocalStorageto setrotateSampleDistanceFactorandsampleDistanceMultiplieronce per browser session; Cypress/CPU-rendering paths skip the live test.useByteArraybatched updates; introducesViewedDataServiceto persist per-imageId viewed state across viewports.Confidence Score: 3/5
Not ready to merge — the PR is explicitly marked [WIP] and several unresolved issues from prior review rounds remain in the code.
Multiple issues flagged in earlier review rounds are still present: numImageFrames is overwritten for decimated volumes in volumeLoadedHandler, decimated volume cache entries are not purged during display-set invalidation, and the GPU result assigns level 'failed' outside the declared union type. New findings in this round are lower-impact but add to the overall debt.
init.tsx (volumeLoadedHandler still corrupts numImageFrames), CornerstoneCacheService.ts (stale decimated volumes survive invalidation, no-op delete calls), gpuPerformanceTest.ts (type-union mismatch on level, debug window assignment).
Important Files Changed
Comments Outside Diff (1)
extensions/cornerstone/src/services/CornerstoneCacheService/CornerstoneCacheService.ts, line 110-145 (link)invalidateVolumeiteratescandidateVolumeIds(baseVolumeId,…:volume3d,…:orthographic) but decimated volumes are stored under the keydecimatedVolumeLoader:${baseVolumeIdWithSuffix}:${i}_${j}_${k}. When a display set is invalidated (e.g. after a series reload), the stale decimated volume remains incs3DCacheand will be served on the next viewport render instead of the freshly-loaded data. A scan ofcs3DCache._volumeCachefor keys that start withdecimatedVolumeLoader:and contain the display set UID needs to be added to the purge loop.Prompt To Fix With AI
Prompt To Fix All With AI
Reviews (4): Last reviewed commit: "Add files to merge CornerstoneOverlays." | Re-trigger Greptile