Cornerstone Development Meeting
- Erik Ziegler Merge current dev branches, then the rest of these PRs go into dev
Outstanding Pull Requests
Cornerstone
Issue | Reason | Plan |
---|---|---|
imageCache :: memory leak (critical) | Large DICOM files with sharedCacheKey will crash the browser | Merge into dev branch |
Fix #82: drawInvalidated() should pass true | Required for requestAnimationFrame support | |
Display the images that have only VOI LUT Sequence properly | Fixes bug with VOI LUT support |
|
Making the canvas, context and its rendering data specific to each enabledElement | Fixes race condition with rendering | Merge immediately |
WIP: Prototype of multi-layer composition | Development PR | Leave open |
Make cornerstone Promise/A+ compliant | Not sure we intend to make Cornerstone Promise compliant |
|
Rendering loop | Uses requestAnimationFrame. |
|
Add possibility to display image statically | Useful for Previews | Review / Merge |
Rendering using css transform instead of canvas transform | Development PR | Leave open (or close?) |
Added canvasToPixel function for easier use in cornerstoneTools | Helper function which will help us clean up Cornerstone Tools | Merge immediately |
WIP: WebGL rendering | Adds optional WebGL rendering path. This is stable and has been used in OHIF for months. |
|
CornerstoneTools
Issue | Reason | Plan |
---|---|---|
Purge image cache issue (stackPrefetch) | stackPrefetch should not trigger exceptions for disabled elements removed from cache | Merge immediately |
Setting a default value for resetPrefetchDelay | Required to fix issues with stackPrefetch for multi-frame instances during CINE play | Merge immediately |
Fix issues with rectangleRoi tool | Brings rectangleRoi to parity with other tools | Merge immediately |
Fix comments for the timeSeriesPlayer tool | Minor comment issue | Merge immediately |
Cornerstone playClip tool now supports playing variable frame rate instances | Necessary for multi-frame support | Merge immediately |
use buttons instead of which in the mouse event api | Minor change for Firefox support | Merge immediately |
for bower installation dev branch | Very minor change to fix bower installation of dev branch | Merge immediately |
WIP: Added simple paintbrush tool & example | Development PR, not to be merged | Leave open |
Level of Detail Window Level and Center | Alternative to WWWC tool which downsamples during window/level | Not sure? Useful for many users? |
dicomParser
Issue | Reason | Plan |
---|---|---|
New method to parse VR=AT fields + Tests | Required for multi-frame instance support since it enables Frame Increment Pointer (0028,0009) | Merge immediately |
Heap performance | Performance improvement | |
Don't include tag if not not needed | Unclear |
Cornerstone WADO Image Loader
Issue | Reason | Plan |
---|---|---|
Support for loading frames using WADO-RS (octet-stream) | Required for WADO-RS | Merge immediately |
wadors (loadimage) must return a deferred like wadouri does | Required for WADO-RS | Merge immediately |
Reject the promise if parsing the dicom file fails | Adds error handling | Merge immediately |
Add bitsStored into image object to be used for VOI LUT in cornerstone | Used for VOI LUT. Not certain if we want this in image object or in metadataProvider? | Review |
Speeds up RLE decoding significantly by replacing DataView by Int8Array (~10x speedup in Chrome) | Performance improvement | Merge? Rollback if issues arise? |
Add support for binary encoded DICOM Segmentation files | Used for DICOM Seg support | Merge immediately |
Fix CornerstoneImageLoadProgress for multi-frame images | Useful for multi-frame images | Review |
[DicomFile loader] multiframe loading broken | Useful for local dicom file multi-frame support | Not sure this is still relevant. Review |
Cornerstone Web Image Loader
Issue | Reason | Plan |
---|---|---|
gh-pages branch still exists | Delete branch, not necessary anymore |
Open Issues
Issue | Reason | Plan |
---|---|---|
Is there a way to pan a zoomed image, so we can only explore in the image (and not drag the image off the screen)? | Respond to user, | |
Cache Size Issue
If the cache size is set to 1GB and you load 1GB of data cornerstone will consume at least 2GB. That's because the dataset is cached by dataSetCacheManager and also a color/grayscale image will be created for each frame using a closure keeping the imageData (bytes) allocated in the memory (see getPixelData, getImageData and getCanvas methods). The problem is because imageCache doesn't count the images (frame) size but just the dataset size. Then if you load a 100MB dataset that contains 100 frames it will store 100MB (dataset) + 100 frames (1MB each approx). The size of the images created by wadouri image loader is set to the dataset size and we don’t know the real image size what makes it difficult to know how many MB there are in the cache.
Three ways to fix this issue:
- The dataset should have a different structure, storing only the header bytes (removing the pixel data) and the frames converted into a color/grayscale images instead of the raw pixel data. Then each image would re-use the same frame data instead of creating a copy of it. Cornerstone uses the dataset in too many places and maybe this will not be so easy to change.
- All caches (dataSetCacheManager, imageCache, etc) should add an entry to a Global Cache responsible for counting and removing items from these caches (like datasetCacheManager and imageCache do through decache method). This way we should be able to count dataset + image + anything else sizes. And also, to avoid removing the dataset before its images from the cache each cache entry could have a priority (property) then sorting by priority/timeStamp would solve this problem.
- The image should not create a copy of the bytes but creates the color/grayscale image on-the-fly whenever getCanvas is called. This process saves memory but results in a performance impact because these images would have to be re-created too many times (scroll / cine).
- Erik Ziegler Put this on the OHIF roadmap
- Figure out a way to make the Cache manager 100% accurate for how much memory Cornerstone is using.
- Look into color images
- Look into compressed images
- Look into CINE usage and cache involvement
RequestPoolManager Improvements
- Erik Ziegler Put this on the OHIF roadmap
Allow parallel downloads when loading multi frame instance
If a multi frame series starts loading using wadouri all frame promises will be added to the requestPoolManager but all threads will waiting for the same dataset. If you open Chrome DevTools and try to prefetch a different series (we developed a StudyPrefetcher on OHIF) you will see that only the first one will be in progress. The second series will be downloaded only when the first one is done and all its promises are resolved.
- Abort a download when its promise is rejected.
When a 100MB series is being loaded and user clicks on another series he/she will have to wait for the first one to be loaded before starting loading the second one what can result in a delay on UI impacting the user experience.
General Issues
- ES6 transition should start soon so that new code is cleaner
- https://groups.google.com/forum/?nomobile=true#!searchin/cornerstone-platform/es6%7Csort:relevance/cornerstone-platform/lCTBrKDt-Fo/p1uSn3lTCAAJ
- https://docs.google.com/document/d/1hIH1H0jyOz62q2KW9X6ONCZYCtfsHwcKgFc-Y7FSTkQ/edit
- https://github.com/OHIF/dicom-parser/pull/1
- Chris: Does the ES6 change change the API at all?
- Move 1.x to a 1.x branch where patches can be applied
- Master works off of the 2.0 branch
- Erik Ziegler Put this on OHIF roadmap: Start with dicomParser
- Axe the Meteor package, move towards NPM
- Get rid of bower and use NPM for everything
- Chris Hafey (Unlicensed) Move repo from /chafey/ to /OHIF/
- Check naming conventions for NPM
- Viewers / Cornerstone should use requestAnimationFrame loop to display images
- Multi-layer composition work is ongoing
Wow, that's me.. Can't remembre what I was thinking. It is closed.