-
Notifications
You must be signed in to change notification settings - Fork 267
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
DICOM Overlays #239
DICOM Overlays #239
Conversation
adds 'overlays' type returning an array of DICOM overlays http://dicom.nema.org/dicom/2013/output/chtml/part03/sect_C.9.html
@@ -121,6 +121,44 @@ function metaDataProvider (type, imageId) { | |||
} | |||
}; | |||
} | |||
|
|||
if (type === 'overlays') { |
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.
To be consistent w/ the other modules in this metaDataLoader
, this should probably be overlayPlaneModule
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.
done, also I comitted the change to createImage I forgot !
When enabled this tool will disable the DICOM overlays stored in `image.overlays` The overlays data is created by `cornerstoneWADOImageLoader` - see cornerstonejs/cornerstoneWADOImageLoader#239 Implements DICOM standard C.9 - http://dicom.nema.org/dicom/2013/output/chtml/part03/sect_C.9.html
When enabled this tool will disable the DICOM overlays stored in `image.overlays` The overlays data is created by `cornerstoneWADOImageLoader` - see cornerstonejs/cornerstoneWADOImageLoader#239 Implements DICOM standard C.9 - http://dicom.nema.org/dicom/2013/output/chtml/part03/sect_C.9.html
src/imageLoader/createImage.js
Outdated
if (overlays && overlays.length > 0) { | ||
image.overlays = overlays; | ||
} | ||
|
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.
If we leave this off of createImage
for now (we can discuss later), then I feel comfortable merging this after a quick gut check from @swederik. This should give us just enough to test an OverlayTool
-- we can iterate and clean this and the corresponding tool up after we get an example and working proof-of-concept.
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.
if you leave it off createImage how is it going to be available for the tool ?
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.
Tool's can grab metadata by asking registered metadata providers:
cornerstone.metaData.get('overlayPlaneModule', imageId);
You can see an example of us doing it in the current length tool src.
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.
got it ..
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.
removed createimage.js from the PR
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.
@kofifus, sorry for the misunderstanding. I meant the changes you made to createImage
could be scrapped.
Namely the addition of the overlay prop
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.
yeah that's what I understood
so I removed createimage.js changes from the PR - they are not needed
and added changes to your tool to read directly from metadata
Thanks! This is a frequently requested feature so I am sure the community will be happy to have it. It looks like the PR actually deletes the createImage file entirely though. Could you add that back in? This will add some overlay data for WADO-URI but doesn't address WADO-RS. I'm not sure how we want to handle that, since I think with WADO-RS we will have to retrieve it from the server via a separate bulk data URI (similar to the palette color lookup tables). That can be a separate step though. One comment: I don't see the reason why this provider should include
since those aren't pulled from the metadata. That should be set in the tool instead. |
ok I went down a github rabbit hole so ended up making a new PR I removed I added the wadors equivalent - the wadors part is untested but prob fine closing this now |
Adds 'overlayPlaneModule' type returning an array of DICOM overlays.
This array is then added the 'overlays' propertry of the image.
This is then read by the overlays tool see - cornerstonejs/cornerstoneTools#788
see issue cornerstonejs/cornerstoneTools#780
see DICOM overlays standard - http://dicom.nema.org/dicom/2013/output/chtml/part03/sect_C.9.html