Identifying largest DICOMs on Orthanc

Greetings,

My Orthanc system has grown quite large and I am interested in knowing how I can identify the largest DICOM objects on the database and how to archive or delete such objects.

My Orthanc instances are on Ubuntu 22.x and store images on PostgreSQL versions 10, 13 and 14.

Any assistance shall be much appreciated.

Best regards,

Charles

I would start by running a RestAPI query at the study level. Grab the list of study IDs and then loop over /studies/{id}/statistics to pull the stats for each study. The stats include things like the number of series, number of instances, size on disk, etc.

You could pull the instance IDs and run /instances/{id}/statistics, but that would likely take much longer to execute. Running at the studies level first should give you a good overview. The average size per instance (computed from the number of instances per study and the size on disk) would be a rough way to find some of the largest DICOM.

I tend to interact with the RestAPI through the requests module of python, but you could write a bash script with calls to curl or use any other method for scripting HTTP requests.

Best,
John.

1 Like