I am trying to extend the OHIF viewer to do AI classification on the current scan (specifically for CT scans) being displayed. How can I access this data? Is it part of the Cornerstone.js? Where can I locate this in the repo? Thanks!
Looking through the cornerstonejs Github, I found that there is a function called getPixelData and there’s also stuff like metadata. Is there a way I can call a function to access this? I want to be able to do this for all the images of the scan, not just the current slice being displayed. Thanks!
Usually it is better to let the AI service grab the data from the server itself than the client (OHIF) send data to the backend.
Having said that, we don’t have official API, but you can grab the viewport from the CornerstoneViewportService.getViewport, and then ask for getImageData, that will give you one imageData in stack viewport but the whole volume in the volume viewport
Thanks for the reply.
Usually it is better to let the AI service grab the data from the server itself than the client (OHIF) send data to the backend.
Can you explain what you mean by this and how I would go about doing it? Thanks!
I meant instead of the client (OHIF) post the data to the server, you can just send a link and server grab pull the data from your dicom store
How do I tell the server what data I need? imageID? How do I get the image IDs of the whole volume? Also, how do I set the viewer to use my own DICOM store? I need to create a PACS server, right? Sorry, I have very little experience in this domain.
Hi,
So you can learn more here
You don’t need to build PACS, you can use open source solutions like Orthanc and dcm4chee
https://www.dicomstandard.org/using/dicomweb/retrieve-wado-rs-and-wado-uri
So basically dicomweb has end points that you can get the studies in the server which we show in the worklist and when a study is clicked we use those end points to request UIDs and we build the imageIds ourselves. ImageId is something in cornerstone/OHIF and not in dicom standard.
I hope this helps