OHIF / Viewers

OHIF zero-footprint DICOM viewer and oncology specific Lesion Tracker, plus shared extension packages
https://docs.ohif.org/
MIT License
3.37k stars 3.41k forks source link

Can I get the apis for back-end? #1607

Closed Hynn01 closed 1 year ago

Hynn01 commented 4 years ago

Hello, I want to develop a back-end by myself to match the OHIF Viewer. I am wondering if it is possible to get all the apis a server need to match this front-end? Since I am not familiar with the front-end, I find it hard to find the restful api the front-end need, for example, the restful api for the the right panel part(Measurement). I can't find this information in the docs. Thanks!

JamesAPetts commented 4 years ago

OHIF primarily uses a dicom web server as its backend, the API for this is detailed here:

https://www.dicomstandard.org/dicomweb/

the restful api for the the right panel part(Measurement).

This is performing a STOW operation to store a DICOM-SR to the dicomweb server as defined above.

Its also possible to use a custom datasource, by just returning json from some backend in the form described here, under "JSON Launch" : https://github.com/OHIF/Viewers/issues/1500, e.g. /viewer?url=https://url/to/your/testJSON.json.

In this case you'd have to make some bespoke API to push to the DICOM-SR for the measurements back to.

Hynn01 commented 4 years ago

Thank you!

Hynn01 commented 4 years ago

Now I get information about the API, but I still don't know how to organize the response. image Is it the response follow this kind of forms? In addition, I get the information for DICOM-SR in this link http://dicom.nema.org/dicom/2013/output/chtml/part20/sect_A.3.html, but I have no idea that which Tag(or Attribute Name) in DICOM-SR represent the measurement...

I actually want to build a backend to run some deep learning algorithms and show the results as measurements in the Viewers. Could it be possible to implement?

Sorry to bother you again, I’ll be very appreciated if you could tell me more about these. Thank you! @JamesAPetts

pilacoepouco commented 4 years ago

@Hynn01, were you able to evolve into something? I have the same interest

PoyangLiu commented 4 years ago

Here is a live example of how OHIF gets a list of studies on study list.

  1. Open OHIF study list (https://viewer.ohif.org/)
  2. Open the browser dev console and goto the network tab
  3. Reload the browser to refresh the network requests
  4. Find the first xhr network request, this is the first GET | {s}/studies?... query the front-end made to the server for a list of studies image
  5. Preview the xhr request and you'll see this image
  6. Hopefully you can match the network request and DICOMWeb spec and figure out how the structure comes about. http://dicom.nema.org/medical/dicom/current/output/html/part18.html#sect_10.6
sedghi commented 1 year ago

You can look at the datasources to learn more https://docs.ohif.org/configuration/dataSources/introduction