Is it Possible to upload folders of dicom files ??

3,118 views
Skip to first unread message

nas...@gmail.com

unread,
Feb 11, 2016, 11:52:47 AM2/11/16
to Orthanc Users
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 ?

I hope someone can help.

Raúl Alexis Betancor Santana

unread,
Feb 11, 2016, 12:40:17 PM2/11/16
to nas...@gmail.com, Orthanc Users
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.

Sébastien Jodogne

unread,
Feb 11, 2016, 12:47:45 PM2/11/16
to Orthanc Users, nas...@gmail.com
Hello,

Here is the path to the Python script Raúl refers to:

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).

HTH,
Sébastien-

Chris Hafey

unread,
Feb 12, 2016, 10:53:52 AM2/12/16
to Orthanc Users, nas...@gmail.com
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.

nas...@gmail.com

unread,
Feb 12, 2016, 10:54:11 AM2/12/16
to Orthanc Users, nas...@gmail.com

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 ?


Regards,

Nash


pacur...@gmail.com

unread,
Oct 4, 2020, 11:38:16 PM10/4/20
to Orthanc Users

James Manners

unread,
Oct 4, 2020, 11:58:24 PM10/4/20
to Orthanc Users

pacur...@gmail.com

unread,
Oct 5, 2020, 12:14:10 AM10/5/20
to Orthanc Users
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

James Manners

unread,
Oct 5, 2020, 12:33:00 AM10/5/20
to Orthanc Users
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.

nick.f...@genesiscare.com

unread,
Oct 5, 2020, 1:28:59 AM10/5/20
to Orthanc Users
this is one way of sending a collection of dicom files. You could do it quite easily in Python too, but a shell script also suffices.
send_dicoms

Guilherme Tavares

unread,
Oct 5, 2020, 6:36:35 AM10/5/20
to nick.f...@genesiscare.com, Orthanc Users
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.

Att.

Guilherme A. C. Tavares
037 98833-6086


--
You received this message because you are subscribed to the Google Groups "Orthanc Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to orthanc-user...@googlegroups.com.

b...@osimis.io

unread,
Oct 5, 2020, 10:13:20 AM10/5/20
to Orthanc Users
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

HTH


pacur...@gmail.com

unread,
Oct 5, 2020, 1:39:20 PM10/5/20
to Orthanc Users
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 
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

Reply all
Reply to author
Forward
0 new messages