Upload success, but Store failure

When i upload a desensitization dicom file with the orthanc web viewer, it’s success in browser, but i can’t find it in orthanc. Follow it the orthanc server’s log:

E1119 07:08:00.950217 OrthancException.h:76] Parameter out of range: Unsupported value representation encountered:
E1119 07:08:08.980953 ServerIndex.cpp:1012] EXCEPTION [Parameter out of range]
E1119 07:08:08.981918 ServerContext.cpp:520] Store failure

I use Orthanc 1.8.0

Please provide a sample DICOM file so that we can reproduce your issue:
https://book.orthanc-server.com/users/support.html#discussing-a-minimal-working-example

Please use the attachment dicom to reproduce the issue, i use Orthanc 1.8.0 with default configuration, thanks a lot.

CHEN_DAO_FU__63319_01_00_01 (670 KB)

There is no problem with your sample DICOM file, it is correctly displayed by the Orthanc Web viewer (see attachment).

Test done using Docker image “jodogne/orthanc-plugins:1.8.0”:
https://book.orthanc-server.com/users/docker.html#usage-with-plugins-enabled

viewer.png

I’m also use the docker image “jodogne/orthanc-plugins:1.8.0”, but i have fail upload.
What is the difference between my environment and yours? It’s weird.

I run docker 19.03.11 on Ubuntu 18.04.4 LTS,

The contents of config file orthanc.json:

{
“RemoteAccessAllowed” : true,
“AuthenticationEnabled” : false
}

follow are the outpu logs:

Orthanc /etc/orthanc/ --verbose

W1120 07:48:04.709839 main.cpp:1666] Orthanc version: 1.8.0
I1120 07:48:04.710367 main.cpp:1698] Architecture: 64-bit, little endian
W1120 07:48:04.710658 OrthancConfiguration.cpp:114] Scanning folder “/etc/orthanc/” for configuration files
W1120 07:48:04.711037 OrthancConfiguration.cpp:62] Reading the configuration from: “/etc/orthanc/orthanc.json”
I1120 07:48:04.711907 Toolbox.cpp:1462] Setting up the ICU common data
I1120 07:48:05.277899 Toolbox.cpp:1441] Using locale: “en_US.UTF-8” for case-insensitive comparison of strings
I1120 07:48:05.279586 FromDcmtkBridge.cpp:247] Using DCTMK version: 365
I1120 07:48:05.279716 FromDcmtkBridge.cpp:255] Loading the embedded dictionaries
I1120 07:48:05.295851 FromDcmtkBridge.cpp:267] Loading the embedded dictionary of private tags
I1120 07:48:05.305680 FromDcmtkBridge.cpp:2043] Registering JPEG Lossless codecs in DCMTK
I1120 07:48:05.305731 FromDcmtkBridge.cpp:2051] Registering JPEG codecs in DCMTK
I1120 07:48:05.305794 FromDcmtkBridge.cpp:2058] Registering RLE codecs in DCMTK
I1120 07:48:05.305849 Enumerations.cpp:2279] Default encoding for DICOM was changed to: Latin1
W1120 07:48:05.313034 OrthancInitialization.cpp:293] SQLite index directory: “/etc/orthanc/OrthancStorage”
W1120 07:48:05.313456 OrthancInitialization.cpp:370] Storage directory: “/etc/orthanc/OrthancStorage”
I1120 07:48:05.314438 SQLiteDatabaseWrapper.cpp:411] Version of the Orthanc database: 6
W1120 07:48:05.314511 HttpClient.cpp:1050] HTTPS will use the CA certificates from this file: /etc/orthanc/
I1120 07:48:05.314559 HttpClient.cpp:498] Setting the default timeout for HTTP client connections: 0 seconds
I1120 07:48:05.314609 HttpClient.cpp:482] Setting the default proxy for HTTP client connections:
I1120 07:48:05.314642 DicomAssociationParameters.cpp:141] Default timeout for DICOM connections if Orthanc acts as SCU (client): 10 seconds (0 = no timeout)
I1120 07:48:05.315100 ServerIndex.cpp:2086] Starting the monitor for stable resources (stable age = 60)
I1120 07:48:05.315133 LuaJobManager.cpp:79] Lua: DICOM associations will be closed after 5 seconds of inactivity
I1120 07:48:05.315349 LuaScripting.cpp:733] Initializing Lua for the event handler
I1120 07:48:05.315121 ServerIndex.cpp:496] Starting the database flushing thread (sleep = 10)
W1120 07:48:05.315542 LuaContext.cpp:93] Lua says: Lua toolbox installed
I1120 07:48:05.315670 LuaJobManager.cpp:79] Lua: DICOM associations will be closed after 5 seconds of inactivity
I1120 07:48:05.315718 LuaScripting.cpp:733] Initializing Lua for the event handler
W1120 07:48:05.315857 LuaContext.cpp:93] Lua says: Lua toolbox installed
I1120 07:48:05.315919 ServerContext.cpp:319] Automated transcoding of incoming DICOM instances is disabled
I1120 07:48:05.316008 DcmtkTranscoder.cpp:66] Quality for lossy transcoding using DCMTK is set to: 90
W1120 07:48:05.316050 ServerContext.cpp:390] Disk compression is disabled
I1120 07:48:05.316074 ServerContext.cpp:824] Storing MD5 for attachments: yes
W1120 07:48:05.316104 ServerIndex.cpp:1636] No limit on the number of stored patients
W1120 07:48:05.316137 ServerIndex.cpp:1653] No limit on the size of the storage area
W1120 07:48:05.316529 ServerContext.cpp:191] Reloading the jobs from the last execution of Orthanc
W1120 07:48:05.316751 JobsEngine.cpp:272] The jobs engine has started with 2 threads
I1120 07:48:05.316811 JobsEngine.cpp:125] Worker thread 0 has started
I1120 07:48:05.316881 JobsEngine.cpp:125] Worker thread 1 has started
I1120 07:48:05.316941 DicomServer.cpp:116] Setting timeout for DICOM connections if Orthanc acts as SCP (server): 30 seconds (0 = no timeout)
W1120 07:48:05.317536 main.cpp:1150] DICOM server listening with AET ORTHANC on port: 4242
I1120 07:48:05.317618 HttpServer.cpp:1491] This Orthanc server uses CivetWeb as its embedded HTTP server
I1120 07:48:05.317661 HttpServer.cpp:1832] The embedded HTTP server will use 50 threads
I1120 07:48:05.317705 HttpServer.cpp:1742] HTTP keep alive is enabled
W1120 07:48:05.317734 HttpServer.cpp:1781] HTTP compression is enabled
I1120 07:48:05.317783 HttpServer.cpp:1840] TCP_NODELAY for the HTTP sockets is set to true
I1120 07:48:05.317814 HttpServer.cpp:1855] Request timeout in the HTTP server is set to 30 seconds
W1120 07:48:05.317867 main.cpp:957] ====> Remote access is enabled while user authentication is explicitly disabled, your setup is POSSIBLY INSECURE <====
I1120 07:48:05.317555 DicomServer.cpp:51] DICOM server started
W1120 07:48:05.317910 main.cpp:1042] Remote LUA script execution is disabled
I1120 07:48:05.318022 HttpServer.cpp:1889] Branching WebDAV bucket at: /webdav
I1120 07:48:05.318056 HttpServer.cpp:1531] Starting embedded Web server using Civetweb
I1120 07:48:05.321008 OrthancWebDav.cpp:1665] Starting the WebDAV upload thread
W1120 07:48:05.321102 HttpServer.cpp:1656] HTTP server listening on port: 8042 (HTTPS encryption is disabled, remote access is allowed)
W1120 07:48:05.321200 main.cpp:833] Orthanc has started
I1120 07:48:05.321251 LuaScripting.cpp:792] Starting the Lua engine

I1120 07:48:36.075154 OrthancWebDav.cpp:1248] Cleaning up the empty WebDAV upload folders
I1120 07:48:36.655387 HttpServer.cpp:1165] POST /instances
I1120 07:48:36.665682 OrthancRestApi.cpp:116] Receiving a DICOM file of 685966 bytes through HTTP
I1120 07:48:36.675008 FilesystemStorage.cpp:107] Creating attachment “15cc63c5-0bdb-4edf-a1c4-347174da0aab” of “DICOM” type (size: 1MB)
I1120 07:48:36.686142 FilesystemStorage.cpp:107] Creating attachment “b35dfade-aeff-4281-bded-6072b15a42e3” of “JSON summary of DICOM” type (size: 1MB)
E1120 07:48:36.696714 OrthancException.h:76] Parameter out of range: Unsupported value representation encountered:
E1120 07:48:36.697175 ServerIndex.cpp:1012] EXCEPTION [Parameter out of range]
I1120 07:48:36.697309 FilesystemStorage.cpp:218] Deleting attachment “15cc63c5-0bdb-4edf-a1c4-347174da0aab” of type 1
I1120 07:48:36.697990 FilesystemStorage.cpp:218] Deleting attachment “b35dfade-aeff-4281-bded-6072b15a42e3” of type 2
E1120 07:48:36.698334 ServerContext.cpp:520] Store failure

After more investigation, the issue occurs if using the REST API to upload your sample DICOM file (I was using storescu from DCMTK):

$ curl -u orthanc:orthanc http://localhost:8042/instances --data-binary @CHEN_DAO_FU__63319_01_00_01

The problem is that your file has a meta-header that is encoded using “Little Endian Implicit” transfer syntax, whereas the DICOM standard imposes the meta-header to be encoded using “Little Endian Explicit”: “The File Meta Information shall be encoded using the Explicit VR Little Endian Transfer Syntax (UID=1.2.840.10008.1.2.1)”
http://dicom.nema.org/medical/dicom/current/output/html/part10.html#sect_7.1

So, your file is invalid. Check out with the support team of your Philips Brilliance 64 modality:
https://book.orthanc-server.com/faq/proprietary.html

Sébastien-

Thanks a lot.

I try to use the parameter in orthanc.json
“IngestTranscoding” : “1.2.840.10008.1.2.1”

then i upload use the api again, it’s ok.
the output log are:

I1120 08:59:44.813661 HttpServer.cpp:1165] POST /instances
I1120 08:59:44.857233 OrthancRestApi.cpp:116] Receiving a DICOM file of 538548 bytes through HTTP
I1120 08:59:44.862572 DcmtkTranscoder.cpp:292] DCMTK transcoding from 1.2.840.10008.1.2 to one of: 1.2.840.10008.1.2.1
W: DcmFileFormat: Unknown Version of MetaHeader detected: 0x0100, supported: 0x0001
I1120 08:59:44.863027 FromDcmtkBridge.cpp:1306] Transcoded an image from transfer syntax 1.2.840.10008.1.2 to 1.2.840.10008.1.2.1
I1120 08:59:44.870736 FilesystemStorage.cpp:107] Creating attachment “fdae3793-4b5c-4256-b99f-efcf41aa066e” of “DICOM” type (size: 1MB)
I1120 08:59:44.881819 FilesystemStorage.cpp:107] Creating attachment “57c27791-dac8-44cc-9892-0aae9e4df5c0” of “JSON summary of DICOM” type (size: 1MB)
I1120 08:59:44.900623 ServerContext.cpp:512] New instance stored