Skip to content
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

Closed
wants to merge 7 commits into from
Closed

DICOM Overlays #239

wants to merge 7 commits into from

Conversation

kofifus
Copy link
Contributor

@kofifus kofifus commented Jan 31, 2019

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

adds 'overlays' type returning an array of DICOM overlays

http://dicom.nema.org/dicom/2013/output/chtml/part03/sect_C.9.html
@kofifus kofifus changed the title Dicom Overlays DICOM Overlays Jan 31, 2019
@@ -121,6 +121,44 @@ function metaDataProvider (type, imageId) {
}
};
}

if (type === 'overlays') {
Copy link
Member

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

Copy link
Contributor Author

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 !

kofifus added a commit to kofifus/cornerstoneTools that referenced this pull request Feb 4, 2019
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
kofifus added a commit to kofifus/cornerstoneTools that referenced this pull request Feb 4, 2019
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
@dannyrb dannyrb self-assigned this Feb 5, 2019
if (overlays && overlays.length > 0) {
image.overlays = overlays;
}

Copy link
Member

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.

Copy link
Contributor Author

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 ?

Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

got it ..

Copy link
Contributor Author

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

Copy link
Member

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

Copy link
Contributor Author

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

@swederik
Copy link
Member

swederik commented Feb 7, 2019

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

fillStyle: 'yellow',
visible: true

since those aren't pulled from the metadata. That should be set in the tool instead.

@kofifus
Copy link
Contributor Author

kofifus commented Feb 7, 2019

ok I went down a github rabbit hole so ended up making a new PR

#240

I removed fillstyle and visible as requested

I added the wadors equivalent - the wadors part is untested but prob fine

closing this now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants