ImagingDataCommons / slim

Interoperable web-based slide microscopy viewer and annotation tool
https://imagingdatacommons.github.io/slim/
Apache License 2.0
118 stars 36 forks source link

Add GCP url support #211

Closed igoroctaviano closed 4 months ago

igoroctaviano commented 4 months ago

208

Allow using the following URL formats:

GCP path to a study

http://localhost:3000/projects/idc-external-031/locations/us-central1/datasets/slim-bulk-ann-images/dicomStores/slim-bulk-ann-images/study/2.25.68803095896966276583382138924964839274/series/1.3.6.1.4.1.5962.99.1.1163866303.1057408148.1637546438847.2.0

GCP path to a study + GCP query param pointing to the derived data store (annotations)

http://localhost:3000/projects/idc-external-031/locations/us-central1/datasets/slim-bulk-ann-images/dicomStores/slim-bulk-ann-images/study/2.25.68803095896966276583382138924964839274/series/1.3.6.1.4.1.5962.99.1.1163866303.1057408148.1637546438847.2.0?gcp=https://healthcare.googleapis.com/v1/projects/idc-external-031/locations/us-central1/datasets/slim-bulk-ann-annotations/dicomStores/slim-bulk-ann-annotations/dicomWeb
github-actions[bot] commented 4 months ago

Visit the preview URL for this PR (updated for commit 9e8895a):

https://idc-external-006--pr211-feat-issue-208-7d5vksfw.web.app

(expires Mon, 03 Jun 2024 14:50:23 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 88aacecd98ba54d2f9c8d201a9444e43d1ad8307

igoroctaviano commented 4 months ago

@pedrokohler please review it and carefully test this against existent URL formats and the ones in the description.

igoroctaviano commented 4 months ago

I found a bug that you can reproduce as follows:

1- set your config file server to be https://proxy.imaging.datacommons.cancer.gov/current/viewer-only-no-downloads-see-tinyurl-dot-com-slash-3j3d9jyp/dicomWeb

2- open the worklist and find multiple studies from the dicom server above

3- now, in the same window, use your new feature and go to http://localhost:3000/projects/idc-external-031/locations/us-central1/datasets/slim-bulk-ann-images/dicomStores/slim-bulk-ann-images/study/2.25.68803095896966276583382138924964839274/series/1.3.6.1.4.1.5962.99.1.1163866303.1057408148.1637546438847.2.0

4- after load, go back to the worklist by clicking the worklist button on the menu (do not use the browser 'go back' button)

5- you'll see that all the studies from the original dicom server disappeared and you can only see the one from the server you set in the URL a moment before

I don't think this is expected behavior, it probably must be reset to the config file's url if you go back to the worklist

@fedorov I want to hear your thoughts before changing this: When using the GCP URL do you expect the data source to be the one from the URL going forward or do you want to reset back to the original data source from the configuration when changing routes like going back to worklist? I guess the worklist will be disabled anyways for this GCP use case

fedorov commented 4 months ago

That's an interesting question. I guess I would expect to see the worklist for the server specified in the URL, not the one from the original configuration. I personally would not expect it to reset to the original server. The intent of this feature is to switch to a new server, so I do not see a reason to go back to the one from the config.

igoroctaviano commented 4 months ago

That's an interesting question. I guess I would expect to see the worklist for the server specified in the URL, not the one from the original configuration. I personally would not expect it to reset to the original server. The intent of this feature is to switch to a new server, so I do not see a reason to go back to the one from the config.

@pedrokohler