Hi,
I know how to import ( upload) multiple files from a folder into the Dicom server, but is it possible to import a folder or many folders into the Dicom server.
For example, if I have 300 folders all containing dicom files, I have to go into each folder, and then select all the files and then drag and drop them into Orthanc, but I would have to do this 300 times.
I have tried dragging the folder into Orthanc, but this fails to upload.
Is there a way editing a setting , which would upload dicom files from sub folders ?
Or may a utility that would copy all dicom files from multiple folders and place then into 1 folder ?
There is a python script on the contrib dir that allow you to do that … it goes throught a dir recursively and import all dicom files to the OrthanC server.
It is technically not possible to recursively explore a directory from an HTML5 Web interface, so this feature cannot be implemented into Orthanc Explorer, and you will have to use an external utility (such as this Python script).
There is no standard way to upload folders, but chrome and MS Edge both support a non standard way of doing this - google for ‘webkitdirectory’ for more info. Firefox has decided not to support this and is developing a standard way to do it, but its a ways off.
Hi,
Thanks so much for your reply.
It sounds like this Python script will do the job.
I've never ever used Pyhton before, and I'm not sure exactly what to do with the script.
Do I need to edit parts of the file, i.e. edit path names, AE Title names ?
Or do I just place this script into a folder ?
thanks a lot.
Any idea why there is no similar implementation on the front end? as importing a sorted data(each series in its own folder) is impossible unless user moves all the files together and import that way. Or maybe a user wants to import multiple patients at once…
Thanks again
One of the biggest challenges from a front end perspective is that browsers historically couldn’t access files in sub directories. That is beginning to change. Regardless, this is an advanced use case that is beyond the scope of the current ui.
If you have direct access to the server, you can you DCMTK Tools (https://dcmtk.org/dcmtk.php.en) to recursively push the files to the server, I did it last week and it worked like a charm.
I found it the fastest and most reliable way to do it.
If you are using Windows, there is a very handy workaround that I use quite often (unsure about other file managers on macOS and Linux… there’s probably something similar)
Navigate INSIDE the folder you wish to upload.
Press CTRL+F (or F3) and type . in the search box —> the contents of the directory are recursively listed
You can then select all of them (CTRL+A) and drop them to the Orthanc Explorer. The offending files and folders that cannot be imported (like text files, .DS_Store files, desktop.ini … will not import but will not hinder the uploading of the correct Dicom files)
If you are positive your files all have a .dcm extension, you can use *.dcm instead of . in the search box
wow. thank you guys. Very good ideas. The responses are overwhelming. I did play with a couple of them, but I like the one not listed here: OrthancToolsJs https://groups.google.com/g/orthanc-users/c/L1BqXbD900E/m/CB8wOnQ_AwAJ
Does folder upload from the interface and much more. Amazing work. I wish this was the default interface of Orthanc. I know it needs work, but it looks nice and responsive. User administration, PACS connection integration for import/export, DVD burn, anonymization, send to a FTP server. Just amazing
Emil
Just adding this here in case anyone else, like me, stumbles across this thread. I have build a “quick and dirty” docker image to import DICOMs from a specified location to the Orthanc server.
Thanks Alain, I did try uploading through the web ui, but 1.6TB of files was a little much for it to handle and I didn’t feel like processing multiple folders manually. The docker image is processing approx 600Gb per day on a Synology DS423+