orthanc Auto-index ? is it possible ?

Hello
I’m a Radiologist. I want to try Orthanc as a small PACS server. We have two locations: due to bad internet connection in Location 1>> Location 1 uploads Dicom studies and files via FTP through FTP-Agent to Location 2 which has the server.
Orthanc is installed in Location 2.
how can i make Orthanc to copy or index files in the FTP folder automatically ?

Thank you
mohammad Abuhashish

If you absolutely have to use FTP to transfer studies from one place to another, you might look into:

Sending DICOM images

and other features of the REST API. Depending upon your setup, you might actually be able to create a REST API connection between the two facilities using a reverse proxy with an authentication mechanism setup on the site where the Orthanc server is located (Location 2). You then could probably write a script or CRON job script that would scan an “outgoing studies” folder that would send all of the images to Orthanc using the REST API. If you just keep the current FTP setup, you would just have to write a script on the Orthanc Server to scan the incoming FTP folder.

There is actually a sample Python script that might help with what you are suggesting:

Sample Python script

Hello,

You could for instance create a Python script that continuously monitors the content of the FTP server for new files using the “watchdog” module:
https://www.michaelcho.me/article/using-pythons-watchdog-to-monitor-changes-to-a-directory

Then, whenever the “created” event is triggered by “watchdog”, upload the DICOM file to Orthanc using the REST API of Orthanc:
https://book.orthanc-server.com/users/rest.html#sending-dicom-images

HTH,
Sébastien-

thank you very much

but the problem is that i don’t know programming. also i don’t know how to use Python file with Orthanc or with Windows
i’m using windows 10

Instead of FTP I just set up a VPN between a PC at one office and the Orthanc server at my other office. Then send the studies to the server IP with orthanc AE and port through VPN. Not sure if that helps…

i found a protable software called “Watch 4 Folder” which can monitor changes in folders, and execute a code or batch.
is there a code or batch to use for uploading files to orthanc ?

thank you in advance

For sure: The most direct way of uploading DICOM files to Orthanc is by using the “curl” command-line tool, as explained in the Orthanc Book:
https://book.orthanc-server.com/users/rest.html#sending-dicom-images
https://curl.haxx.se/windows/