Creating Custom Datasource

Hi everyone,

  • I would like to add a custom data source which is not necessarily a dicom web server, but has some custom endpoint to some medical images and data.
  • I am currently using the latest Ohif-v3 but the documentation is not that clear, I have also tried to look at the implementations of the same but it has not helped much can anyone help me or show me how this can be achieved if possible?

Hello and welcome to the forum.

Ultimately the internals of OHIF and Cornerstone3D are expecting to load DICOM images. So if your data is not DICOM you might need to first convert it to DICOM. What type/format is the data in your data source? OHIF currently supports data sources such as DICOMweb, DICOM JSON, static WADO and local DICOM. NIFTI is coming soon.

As you already have done, the best thing I can recommend to you is to look at the various data source implementations in extensions\default\src and mimic those implementations. Be sure to implement the various API methods:

{
  query,
  retrieve,
  store,
  reject,
  initialize,
  deleteStudyMetadataPromise,
  getImageIdsForDisplaySet,
  getImageIdsForInstance,
}

I hope this helps.

Yes, Thank you. i have chosen to connect first with Orthanc then customize Orthanc to my need s