ayselafsar / dicomviewer

DICOM Viewer in Nextcloud
https://apps.nextcloud.com/apps/dicomviewer
GNU Affero General Public License v3.0
221 stars 52 forks source link

Open with DICOM Viewer not available for shared links in v2 on NC28 #108

Open bsnipes opened 3 months ago

bsnipes commented 3 months ago

On NC 28.0.3 and running DICOM Viewer 2.1.1 the ability to choose "Open with DICOM Viewer" is not available for shared created via links. The only option is to Download. I do not know if this is a new limitation of NC 28 or simply a missing option in the DICOM Viewer v2.

On NC 27.1.7 running DICOM Viewer version 1.2.5, the option is available on shared links.

Nothing DICOM Viewer related shows up in my NC log when clicking the 3 dots on a folder that was shared via link for V2.

ayselafsar commented 3 months ago

@bsnipes Thanks for reporting. Do you expect to see that option for extensionless DICOM files? You can simply click on DICOM file you would like to open.

bsnipes commented 3 months ago

In my usage, it is only for opening a folder and it subdirectories in the viewer. The folder will almost always have a DICOMDIR and the DICOM files may or may not have have an extension.

ayselafsar commented 1 month ago

Opening a single file will load all files in the current folder and its sub folders as well. Did you have any chance to test that?

bsnipes commented 1 month ago

The medical discs we typically receive from hospitals and medical providers don't necessarily have .dcm extensions. When giving view access via a link, there aren't any options to open it in the dicom viewer app via a right-click nor by clicking on one of the files. If you click on one of the files, it is simply downloaded.

In addition, the files aren't ever in one folder. They are spread through a folder structure such as the below (actual example with the numbers furthest down the path being actual DICOM files and not subdirectories):

├── 9411
│   └── 9412
│       └── 9413
├── 9424
│   ├── 9425
│   │   └── 94236
│   ├── 9426
│   │   ├── 94212
│   │   ├── 942139
│   │   ├── 94214
├── 9451014
│   ├── 9451015
│   │   └── 9451050
│   ├── 9451016
│   │   └── 9451045
│   ├── 9451017
│   │   └── 9451043
│   ├── 9451018
│   │   └── 9451044
│   ├── 9451019
│   │   └── 9451042
│   ├── 9451020
│   │   └── 9451046
│   ├── 9451021
│   │   └── 9451056
├── DICOMDIR
loxK commented 3 weeks ago

I have the same issue, with same sort of disc. This used to work with previous version of the dicomviewer :https://github.com/ayselafsar/dicomviewer/issues/15#issuecomment-1499881520. But it doesn't anymore.

Opening the images folder with the viewer works. If you have accentuated characters in the path to that folder you'll face this issue : https://github.com/ayselafsar/dicomviewer/issues/119

skalteis commented 2 weeks ago

Possibly related: https://github.com/nextcloud-libraries/nextcloud-files/issues/964

StCyr commented 2 weeks ago

As far as I understand, this has nothing to do with https://github.com/nextcloud-libraries/nextcloud-files/issues/964

(code at https://github.com/ayselafsar/dicomviewer/blob/master/src/public.js doesn't use fileActions at all)

Do you have any error in your console when opening a public share?

skalteis commented 2 weeks ago

Hi @StCyr , my issue with opening DICOM files from folders shared via public links is, specifically, that there is no option to open an entire shared directory anymore by right-clicking on the directory entry and selecting "Open with DICOM Viewer". This option is present in the regular Files app, my guess was that public share links work somehow similar - so my naive assumption was it would be like the implementation in https://github.com/ayselafsar/dicomviewer/blob/master/src/utils/registerFileActions.js ... where the fileAction is set up. Since @susnux mentioned in https://github.com/nextcloud-libraries/nextcloud-files/issues/964 that the public share view is unfortunately not yet using the @nextcloud/files helpers but the "old way", my initial hunch was incorrect, sadly. :-) Thank you for replying, though! Best regards!

StCyr commented 2 weeks ago

@ayselafsar from what I can see here, the problem is likely to be caused by https://github.com/ayselafsar/dicomviewer/blob/master/src/utils/isDicom.js