Uploading very large dicom instance to orthanc causes crash

Hi there,

we have a very large DICOM wsi file of 5.84 Go
(https://drive.google.com/file/d/1RmNg4ByoDTK6RriUnd1X7Rods-z2a8Db/view?usp=sharing)

When uploading to Orthanc using POST on /instances, the orthanc container (from orthancteam) crashes without log errors.

A similar issue have been reported here Unable to upload DICOM file larger than around 500MB and was said it was related to 32bit version.

I guess the Orthanc-Team docker image is 64bits but there is still a limitation in DICOM instance size.

This DICOM has been generated by using the BigPicture WSI Dicomizer that doesn’t have DICOM concatenation capabilities. (GitHub - imi-bigpicture/wsidicomizer: Python library for converting WSI files to DICOM)

So we land with this 5.8 Gb DICOM instance.

In my opinion these large files should benefit from dicom contatenation and are prone of file manipulation issues in the DICOM backend (and i doubt that our 20y PACS in our hospitals can handle these kind of files)

However, the DICOM standard does not specify any limitation of size for compressed dicom (DICOM Whole Slide Imaging)

So in theory it should be possible to store any size of DICOM instance.

So my questions for community would be :

  • Is there a known limit of a DICOM instance (even unofficial) ?
  • What is preventing Orthanc to store this large file ? By monitoring the RAM I don’t see any memory leak, the Orthanc crash is not due to a RAM exhaustion
  • Did anyone already seen DICOM instance of several GBs (WSI, video ?), any experience on PACS handling of this kind of DICOMs (outside Orthanc)

Thanks for you help,

Best regards,

Salim

Dear Salim,

I have just been able to upload the provided DICOM file to Orthanc 1.12.7 (fresh build on Ubuntu 22.04) by typing:

$ curl -H "Transfer-Encoding: chunked" -X POST http://localhost:8042/instances -T 77bcebf4-ef29-4faf-b4ee-4364d742569f
{
   "ID" : "f1cde3c5-bef0a903-a2e4499e-b3e7ae1a-80d6cf97",
   "ParentPatient" : "da39a3ee-5e6b4b0d-3255bfef-95601890-afd80709",
   "ParentSeries" : "ee112a0f-d1eeeeb7-68bef47b-245cfd1f-f9eb31cf",
   "ParentStudy" : "e8e8a0a0-564476bf-8639cdef-5930d652-914c084f",
   "Path" : "/instances/f1cde3c5-bef0a903-a2e4499e-b3e7ae1a-80d6cf97",
   "Status" : "Success"
}

The upload works, as can be seen by the following call to the REST API:

$ curl http://localhost:8042/series/ee112a0f-d1eeeeb7-68bef47b-245cfd1f-f9eb31cf
{
   "ExpectedNumberOfInstances" : null,
   "ID" : "ee112a0f-d1eeeeb7-68bef47b-245cfd1f-f9eb31cf",
   "Instances" : 
   [
      "f1cde3c5-bef0a903-a2e4499e-b3e7ae1a-80d6cf97"
   ],
   "IsStable" : true,
   "Labels" : [],
   "LastUpdate" : "20250611T082137",
   "MainDicomTags" : 
   {
      "Manufacturer" : "mirax",
      "Modality" : "SM",
      "SeriesInstanceUID" : "1.2.826.0.1.3680043.8.498.89399840511820754133071782203251713576",
      "SeriesNumber" : "10"
   },
   "ParentStudy" : "e8e8a0a0-564476bf-8639cdef-5930d652-914c084f",
   "Status" : "Unknown",
   "Type" : "Series"
}

So, there is something else in play here.

Kind Regards,
Sébastien-

Thanks for your feedback,

I do not use the transfer encoding header, and I also tried to upload through orthanc web interface that may not implement it neither,

I’m going to explore that

Thx !

Hello,

I confirm that both Orthanc Explorer and Orthanc Explorer 2 do not support the upload of so large files. In such cases, the best option is to directly call the REST API of Orthanc using either the curl command above, or the OrthancImport.py sample script.

Sébastien-

Dear Sebastien,

Do you run Orthanc locally or through Docker ?
For now we still have the same issue but we are running on docker, i’m still investigating

Best regards,

Salim

Hello,

Locally, using the REST API.

If you are using DICOM C-STORE to transmit the DICOM file (e.g., storescu), you might be interested by this recent changeset.

Sébastien-