ImagingDataCommons / ViewersV3

OHIF zero-footprint DICOM viewer tracking V3 (CORE REPO)
https://docs.ohif.org/
MIT License
0 stars 0 forks source link

[Feature Request] Add toobar buttons to download study/series #62

Open fedorov opened 1 month ago

fedorov commented 1 month ago

What feature or change would you like to see made?

It will be helpful to have buttons in the viewer toolbar to instruct users how to down load specific series or studies. Pushing the download button would show a popup with the command(s) that can be copied to the clipboard:

  1. pip install idc-index --upgrade
  2. `idc download <SeriesInstanceUID/StudyInstanceUID>

Why should we prioritize this feature?

Discussed at the IDC OHIF coordination meeting

igoroctaviano commented 3 weeks ago

@pedrokohler I think we can update idc's mode to include a new toolbar button that reads the values from a config property from OHIF's configuration e.g.

...
idcDownloadCommandsDialog: {
  title: 'Download',
  description: 'Use the following commands to download study:',
  commands: [
    'pip install idc-index --upgrade', 
    'idc download <SeriesInstanceUID/StudyInstanceUID>'
  ]
}
...

Then the dialog would display:


Download Use the following commands to download study:

pip install idc-index --upgrade 
idc download <SeriesInstanceUID/StudyInstanceUID> 

@fedorov let me know if that works for you.

fedorov commented 3 weeks ago

I realized the wording may be a bit confusing....

Also, the idea is to put the actual Study/SeriesInstanceUID for the given study into the command that can be copied. Can we populate SeriesInstanceUID with the UID corresponding to the series in the active viewport?

igoroctaviano commented 3 weeks ago

I realized the wording may be a bit confusing....

  • idc download StudyInstanceUID will download study
  • idc download SeriesInstanceUID will download series

Also, the idea is to put the actual Study/SeriesInstanceUID for the given study into the command that can be copied. Can we populate SeriesInstanceUID with the UID corresponding to the series in the active viewport?

Sure, we can use something similar to i18n variables (curly braces):

...
idcDownloadCommandsDialog: {
  title: 'Download',
  description: 'Use the following commands to download study:',
  commands: [
    'pip install idc-index --upgrade', 
    'idc download {{SeriesInstanceUID}}'
  ]
}
...

They will be replaced by actual value during runtime.