Unable to upload the DICOM CD/DVD which has the "DICOMDIR" file in the root directory. Getting "Inexistent tag" error.

1,435 views
Skip to first unread message

Deekshith Kirodian

unread,
Nov 19, 2021, 1:12:02 AM11/19/21
to Orthanc Users
Hi Team,

We're unable to upload the DICOM CD/DVD which has the "DICOMDIR" file in the root directory. Getting "Inexistent tag" error.

The Dicom Directory contains many files of which one of them does not contain one of the four tags required to exist in the DICOM file.

It appears Orthanc is rejecting all the files.

We're currently using "jodogne/orthanc-plugins 1.9.2" version in our Linux/amd64 system. 

Attached screenshot of the error for reference.
Please provide advice on a possible solution.

Thanks.
image_2021_11_18T10_31_41_778Z.png

Alain Mazy

unread,
Nov 19, 2021, 3:45:59 AM11/19/21
to Deekshith Kirodian, Orthanc Users
Hi,

Orthanc will not handle the DICOMDIR anyway so no need to upload it.
BTW, if you're uploading all files one by one, Orthanc will indeed reject the non DICOM files but will still accept the valid files.  

I'm just performing an import right now with a lot of garbage in the import folder, Orthanc is displaying a lot of errors but the DICOM files are going in.

HTH,

Alain.


--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/orthanc-users/3690ec1d-2fbf-4e23-bb40-7a7646cade4cn%40googlegroups.com.

Deekshith Kirodian

unread,
Nov 19, 2021, 6:18:38 AM11/19/21
to Orthanc Users
Hi Alain,

Thank you for your quick response.
We're using Orthanc REST API (API Endpoint used: "/instances") to upload scans from our web application.

End-user will upload the entire CD/DVD they received from hospitals, this CD/DVD will have DICOM files, DICOMDIR and other garbage files, when this CD/DVD uploading from our web application and we're converting the entire directory into ZIP and uploading the ZIP file using integrated Orthanc REST API. The response we're getting is HTTP error "Not Found ", Error is "Inexistent Tag" which is failing us to continue other tasks because we're not receiving a valid response from API such as Instance id, modality, etc...

Let me know how this can be fixed, such a way API should accept Zip without having this error for the DICOMDIR file.

Regards,
Deekshith

Alain Mazy

unread,
Nov 19, 2021, 8:32:56 AM11/19/21
to Deekshith Kirodian, Orthanc Users
Hi Deekshith,

Could you paste your logs in verbose mode.  I just tried to upload a zip with 2 dicoms and a txt file and both dicoms are uploaded into orthanc:

I1119 03:58:13.318677 HttpServer.cpp:1238] (http) POST /instances
I1119 03:58:13.318939 OrthancRestApi.cpp:173] (http) Receiving a DICOM file of 32144 bytes through HTTP
I1119 03:58:13.319332 OrthancRestApi.cpp:193] Uploading DICOM file from ZIP archive: CT_small.dcm
I1119 03:58:13.321841 FilesystemStorage.cpp:124] Creating attachment "5489291c-4fff-42e8-9b48-56e5e2bc65ea" of "DICOM" type (size: 1MB)
I1119 03:58:13.326311 FilesystemStorage.cpp:258] Deleting attachment "5489291c-4fff-42e8-9b48-56e5e2bc65ea" of type 1
I1119 03:58:13.326427 ServerContext.cpp:628] Already stored
I1119 03:58:13.327707 OrthancRestApi.cpp:193] Uploading DICOM file from ZIP archive: verbose_trace_logs.txt
W: DcmItem: Length of element (3157,3131) is odd
E: DcmElement: Unknown Tag & Data (3157,3131) larger (942743603) than remaining bytes (27438) in file, premature end of stream
E1119 03:58:13.327883 OrthancException.cpp:57] Bad file format: Cannot parse an invalid DICOM file (size: 27446 bytes)
E1119 03:58:13.327967 OrthancRestApi.cpp:212] Cannot import non-DICOM file from ZIP archive: verbose_trace_logs.txt

I1119 03:58:13.328104 OrthancRestApi.cpp:193] Uploading DICOM file from ZIP archive: eb564592-2806-4d7e-be71-3a34f4d707d8.dcm
I1119 03:58:13.333287 FilesystemStorage.cpp:124] Creating attachment "80be5d87-ee54-4a7e-a705-99a4b022721d" of "DICOM" type (size: 1MB)
I1119 03:58:13.336629 FilesystemStorage.cpp:258] Deleting attachment "80be5d87-ee54-4a7e-a705-99a4b022721d" of type 1
I1119 03:58:13.336713 ServerContext.cpp:628] Already stored


And, when uploading a zip with aDICOMDIR, other dicom files are uploaded correctly:
I1119 04:00:38.314810 OrthancRestApi.cpp:193] Uploading DICOM file from ZIP archive: IMAGES/IM96
I1119 04:00:38.317291 FilesystemStorage.cpp:124] Creating attachment "b1735c08-b55f-4e38-bfe2-1c341f1e821b" of "DICOM" type (size: 1MB)
I1119 04:00:38.320513 FilesystemStorage.cpp:258] Deleting attachment "b1735c08-b55f-4e38-bfe2-1c341f1e821b" of type 1
I1119 04:00:38.320641 ServerContext.cpp:628] Already stored
I1119 04:00:38.320976 OrthancRestApi.cpp:193] Uploading DICOM file from ZIP archive: DICOMDIR
E1119 04:00:38.321985 DicomMap.cpp:1010] Store has failed because all the required tags (PatientID, StudyInstanceUID, SeriesInstanceUID, SOPInstanceUID) are missing (is it a DICOMDIR file?)
E1119 04:00:38.322027 OrthancRestApi.cpp:221] Ignoring what is probably a DICOMDIR file within a ZIP archive: "DICOMDIR"





Sébastien Jodogne

unread,
Nov 24, 2021, 6:29:00 AM11/24/21
to Orthanc Users
Hello,

This issue has been fixed in Orthanc 1.9.7 by the following changeset:

Please upgrade Orthanc.

Sébastien-
Reply all
Reply to author
Forward
0 new messages