View in #ohif on Slack
@suneetha_j: Hi is it possible that I can load the study from a local study folder directly to the viewer, instead of folder upload, I will just give the folder path, it may have n studies ?
@Bill_Wallace: Yes, if you run the viewer in a local embedded browser which you have given permissions to directly access file paths. However, by default it isn’t possible in something like Chrome due to security restrictions. It MIGHT be possible to do by putting hte entire OHIF instance in a directory, along with the images to view, and the JSON configuration file alongside that, then launch the file index.html with the configuration set to load the JSON URL from a relative file path.
That is actually a worthwhile example that we should think about demonstrating how to configure it.
You might come to OHIF office hours today and ask your question, can probably give you more details there.
@suneetha_j: Thanks, I will join today.
I am sorry that I could not able to catch out the ohif office hours, @Alireza_Sedghi @Bill_Wallace. Could you please suggest any approach for loading directly the local study into the viewer without uploading the file/folder in the browser. Let say, the folder path is c:/dicom is a folder which had n study folders with dcm files. If localhost:3000/local/?studyid=“1.2.3.4”, then based on studyid in the dicom folder , viewer should be loaded.
@Bill_Wallace: For that use case, no, there isn’t any good way of doing it - the closest you can come is opening up a file system access request dialog using https://developer.chrome.com/docs/capabilities/web-apis/file-system-access and then opening the file that way - which is nearly what the drag and drop file system does, and which could be extended to allow opening the file dialog.
Chrome for Developers: The File System Access API: simplifying access to local files | Capabilities | Chrome for Developers
If you are willing to package things as a local application, then you can resolve it. You can also cache in the browser at one point and then read the files later - so if you had a localhost:3000/cache-files application which stored into browser local file storage, then you could fetch files from there and use them in preference to getting the data remotely.