Unable to load image cone beam CT from Carestream

Hi Guys,

I’ve just got this problem when trying to upload Cone Beam images from a Carestream device, below the log.

Please let me know what I can do to get Orthanc v1.3.2 to accept such images.

Thanks in advance,
Roberto Fichera.

May 14 09:10:56 localhost Orthanc[649]: W: Found element (0009,11a0) with VR UN and undefined length, reading a sequence with transfer syntax LittleEndianImplicit (CP-246)
May 14 09:10:56 localhost Orthanc[649]: W: DcmItem: Length of element (0009,11a1) is odd
May 14 09:10:56 localhost Orthanc[649]: W: DcmItem: Dataset not in ascending tag order, at element (0000,0000)
May 14 09:10:56 localhost Orthanc[649]: W: DcmItem: Element (0000,0000) found twice in one data set or item, ignoring second entry
May 14 09:10:56 localhost Orthanc[649]: W: DcmItem: Element (0000,0000) found twice in one data set or item, ignoring second entry
May 14 09:10:56 localhost Orthanc[649]: W: DcmItem: Element (0000,0000) found twice in one data set or item, ignoring second entry
May 14 09:10:56 localhost Orthanc[649]: W: DcmItem: Element (0000,0000) found twice in one data set or item, ignoring second entry
May 14 09:10:56 localhost Orthanc[649]: W: DcmItem: Length of element (028f,028b) is odd
May 14 09:11:04 localhost Orthanc[649]: E: DcmElement: Unknown Tag & Data (028f,028b) larger (39846519) than remaining bytes (563228) in file, premature end of stream
May 14 09:11:04 localhost Orthanc[649]: W: DIMSE Warning: (KPServer,ORTHANC): DIMSE receiveDataSetInMemory: dset->read() Failed (Invalid stream)
May 14 09:11:04 localhost Orthanc[649]: E0514 09:11:04.644651 StoreScp.cpp:294] Store SCP Failed: DIMSE Failed to receive message

and below you can see the tags details show by python pydicom library

In [1]: from pydicom import dicomio
In [2]: i = dicomio.read_file(‘export.dcm’)
In [3]: i
Out[3]:
(0008, 0005) Specific Character Set CS: ‘ISO_IR 192’
(0008, 0008) Image Type CS: [‘DERIVED’, ‘PRIMARY’, ‘VOLUME’, ‘RESAMPLED’]
(0008, 0012) Instance Creation Date DA: ‘20180514’
(0008, 0013) Instance Creation Time TM: ‘111411’
(0008, 0016) SOP Class UID UI: X-Ray 3D Craniofacial Image Storage
(0008, 0018) SOP Instance UID UI: 1.2.250.1.90.2.772081700.20180514111411.5796.12204
(0008, 0020) Study Date DA: ‘20180406’
(0008, 0021) Series Date DA: ‘20180514’
(0008, 0022) Acquisition Date DA: ‘20180406’
(0008, 0023) Content Date DA: ‘20180514’
(0008, 0030) Study Time TM: ‘180549’
(0008, 0031) Series Time TM: ‘111411’
(0008, 0032) Acquisition Time TM: ‘180741’
(0008, 0033) Content Time TM: ‘111411’
(0008, 0050) Accession Number SH: ‘’
(0008, 0060) Modality CS: ‘DX’
(0008, 0070) Manufacturer LO: ‘Carestream Health’
(0008, 0080) Institution Name LO: ‘XXXXXXX’
(0008, 0090) Referring Physician’s Name PN: ‘XXXXXXX’
(0008, 1030) Study Description LO: ‘’
(0008, 103e) Series Description LO: ‘Exported Volume’
(0008, 1040) Institutional Department Name LO: ‘RADIOLOGY’
(0008, 1090) Manufacturer’s Model Name LO: ‘CS 9000’
(0008, 9206) Volumetric Properties CS: ‘VOLUME’
(0008, 9207) Volume Based Calculation Technique CS: ‘MPR’
(0009, 0011) Private Creator LO: ‘TROPHY’
(0009, 11a0) Private tag data 4 item(s) ----
(0009, 11a1) Private tag data LO: ‘3DACQ_FUNCTION_MODE’
(0009, 11a2) Private tag data UL: 6
(0009, 11a3) Private tag data UN: ‘Normal’

Hello,

According to the Orthanc log, your DICOM file looks corrupted.

You can use the reference tool “dciodvfy” from David Clunie’s dicom3tools in order to check the validity of the file wrt. the DICOM standard:
http://www.dclunie.com/dicom3tools/dciodvfy.html

Please provide a sample (possibly anonymized) DICOM image if you want further support from the Orthanc community.

HTH,
Sébastien-

Hi Sébastien,

I think the problem is related to not standard tags present in the image

dciodvfy /TempData/export.dcm

(0x0009,0x11a0) ? - Warning - Unrecognized tag - assuming explicit value representation OK
(0x0009,0x11a1) ? - Warning - Private tag without owner - use owner of parent sequence “TROPHY”
(0x0009,0x11a1) ? - Warning - Unrecognized tag - assuming explicit value representation OK
(0x0009,0x11a2) ? - Warning - Unrecognized tag - assuming explicit value representation OK
(0x0009,0x11a3) ? - Warning - Unrecognized tag - explicit value representation is UN
(0x0009,0x11a1) ? - Warning - Private tag without owner - use owner of parent sequence “TROPHY”
(0x0009,0x11a1) ? - Warning - Unrecognized tag - assuming explicit value representation OK
(0x0009,0x11a2) ? - Warning - Unrecognized tag - assuming explicit value representation OK
(0x0009,0x11a3) ? - Warning - Unrecognized tag - explicit value representation is UN
(0x0009,0x11a1) ? - Warning - Private tag without owner - use owner of parent sequence “TROPHY”
(0x0009,0x11a1) ? - Warning - Unrecognized tag - assuming explicit value representation OK
(0x0009,0x11a2) ? - Warning - Unrecognized tag - assuming explicit value representation OK
(0x0009,0x11a3) ? - Warning - Unrecognized tag - explicit value representation is UN
(0x0009,0x11a1) ? - Warning - Private tag without owner - use owner of parent sequence “TROPHY”
(0x0009,0x11a1) ? - Warning - Unrecognized tag - assuming explicit value representation OK
(0x0009,0x11a2) ? - Warning - Unrecognized tag - assuming explicit value representation OK
(0x0009,0x11a3) ? - Warning - Unrecognized tag - explicit value representation is UN

Error - Functional Group Sequence already used in Shared Functional Groups Sequence - (0x0020,0x9113) Plane Position Sequence - in Per-frame Functional Groups Sequence Item #1
Error - Functional Group Sequence already used in Shared Functional Groups Sequence - (0x0020,0x9116) Plane Orientation Sequence - in Per-frame Functional Groups Sequence Item #1
Error - Functional Group Sequence already used in Shared Functional Groups Sequence - (0x0020,0x9113) Plane Position Sequence - in Per-frame Functional Groups Sequence Item #2

Error - Functional Group Sequence already used in Shared Functional Groups Sequence - (0x0020,0x9116) Plane Orientation Sequence - in Per-frame Functional Groups Sequence Item #356
Error - Functional Group Sequence already used in Shared Functional Groups Sequence - (0x0020,0x9113) Plane Position Sequence - in Per-frame Functional Groups Sequence Item #357
Error - Functional Group Sequence already used in Shared Functional Groups Sequence - (0x0020,0x9116) Plane Orientation Sequence - in Per-frame Functional Groups Sequence Item #357
Warning - Value dubious for this VR - (0x0008,0x0090) PN Referring Physician’s Name PN [0] = - Retired Person Name form
Error - Value invalid for this VR - (0x0020,0x0010) SH Study ID SH [0] = <1.2.250.1.90.1.772081700.1523030489.683> - Length invalid for this VR = 39, expected <= 16
Error - Dicom dataset contains invalid data values for Value Representations
XRay3DCraniofacialImage
Error - Unrecognized enumerated value for value 4 of attribute
Error - Missing attribute Type 1 Required Element= Module=


and other stuff.

I will anonymize the image and will post the link to it.

Thanks.
Roberto Fichera.

Hi Sébastien,

here is the link of the image https://www.dropbox.com/s/8kxuzi5bzyz880k/DX000000.dcm?dl=0

Orthanc is currently configured with LoadPrivateDictionary = false because I wasn’t able to import certain images due to Endian and also some private tags.
I’ve also tried to register via Dictionary the above private (0009,11a0) tags, but at moment I wasn’t able to make it correctly.

Hello,

Your DICOM file has “SOPClassUID” set to “1.2.840.10008.5.1.4.1.1.13.1.2”, which is a proprietary, non-standard DICOM class by Carestream:
https://www.dicomlibrary.com/dicom/sop/

In order to make Orthanc accept such files, you’ll have to set its “UnknownSopClassAccepted” configuration option to “true”:
http://book.orthanc-server.com/users/configuration.html

HTH,
Sébastien-

PS: For reference, here are the instructions to allow DCMTK’s storescu to send such files to Orthanc on Ubuntu 16.04:

cd /tmp/

sed ‘s/^(PresentationContext125).*$/\1 = 1.2.840.10008.5.1.4.1.1.13.1.2\JPEGLossless/’ /etc/dcmtk/storescu.cfg > storescu.cfg

storescu -xf storescu.cfg Default localhost 4242 ./DX000000.dcm

Check out the following page for more information:
https://carlo-hamalainen.net/2015/06/03/dcmtk-no-presentation-context-for-unknown-sop-class-1-3-12-2-1107-5-9-1/

Hi Sèbastien,

I’ve tried to set UnknownSopClassAccepted = true, but I still get the same problem

May 25 19:20:49 puma Orthanc[218672]: W0525 19:20:49.398946 main.cpp:1298] Orthanc version: 1.3.2
May 25 19:20:49 puma Orthanc[218672]: W0525 19:20:49.399935 OrthancInitialization.cpp:168] Scanning folder “/etc/orthanc/” for configuration files
May 25 19:20:49 puma Orthanc[218672]: W0525 19:20:49.399976 OrthancInitialization.cpp:120] Reading the configuration from: “/etc/orthanc/orthanc.json”
May 25 19:20:49 puma Orthanc[218672]: W0525 19:20:49.400169 OrthancInitialization.cpp:120] Reading the configuration from: “/etc/orthanc/worklists.json”
May 25 19:20:49 puma Orthanc[218672]: W0525 19:20:49.400215 OrthancInitialization.cpp:120] Reading the configuration from: “/etc/orthanc/serve-folders.json”
May 25 19:20:49 puma Orthanc[218672]: W0525 19:20:49.407317 FromDcmtkBridge.cpp:164] Loading the external DICOM dictionary “/usr/share/dcmtk/dicom.dic”
May 25 19:20:49 puma Orthanc[218672]: W0525 19:20:49.413632 FromDcmtkBridge.cpp:164] Loading the external DICOM dictionary “/usr/share/dcmtk/private.dic”
May 25 19:20:49 puma Orthanc[218672]: W0525 19:20:49.423836 main.cpp:671] Loading plugin(s) from: /usr/share/orthanc/plugins/
May 25 19:20:49 puma Orthanc[218672]: W0525 19:20:49.424013 PluginsManager.cpp:269] Registering plugin ‘worklists’ (version 1.3.2)
May 25 19:20:49 puma Orthanc[218672]: W0525 19:20:49.424025 PluginsManager.cpp:168] Sample worklist plugin is initializing
May 25 19:20:49 puma Orthanc[218672]: W0525 19:20:49.424095 PluginsManager.cpp:168] Worklist server is disabled by the configuration file
May 25 19:20:49 puma Orthanc[218672]: W0525 19:20:49.424211 PluginsManager.cpp:269] Registering plugin ‘serve-folders’ (version 1.3.2)
May 25 19:20:49 puma Orthanc[218672]: W0525 19:20:49.424350 PluginsManager.cpp:168] ServeFolders: Empty configuration file: No additional folder will be served!
May 25 19:20:49 puma Orthanc[218672]: W0525 19:20:49.424363 OrthancInitialization.cpp:1004] SQLite index directory: “/var/lib/orthanc/db-v6”
May 25 19:20:49 puma Orthanc[218672]: W0525 19:20:49.424460 OrthancInitialization.cpp:1074] Storage directory: “/var/lib/orthanc/db-v6”
May 25 19:20:49 puma Orthanc[218672]: W0525 19:20:49.424704 HttpClient.cpp:691] HTTPS will use the CA certificates from this file: /etc/orthanc/
May 25 19:20:49 puma Orthanc[218672]: W0525 19:20:49.425108 ServerScheduler.cpp:135] The server scheduler has started
May 25 19:20:49 puma Orthanc[218672]: W0525 19:20:49.425244 LuaContext.cpp:103] Lua says: Lua toolbox installed
May 25 19:20:49 puma Orthanc[218672]: W0525 19:20:49.425275 ServerContext.cpp:182] Disk compression is disabled
May 25 19:20:49 puma Orthanc[218672]: W0525 19:20:49.425282 ServerIndex.cpp:1403] No limit on the number of stored patients
May 25 19:20:49 puma Orthanc[218672]: W0525 19:20:49.425291 ServerIndex.cpp:1420] No limit on the size of the storage area
May 25 19:20:49 puma Orthanc[218672]: W0525 19:20:49.425297 main.cpp:651] Installing the Lua scripts from: /etc/orthanc/send_image.lua
May 25 19:20:49 puma Orthanc[218672]: W0525 19:20:49.426632 main.cpp:863] DICOM server listening with AET ORTHANC on port: 8000
May 25 19:20:49 puma Orthanc[218672]: W0525 19:20:49.426669 MongooseServer.cpp:1075] HTTP compression is enabled
May 25 19:20:49 puma Orthanc[218672]: W0525 19:20:49.427107 main.cpp:796] HTTP server listening on port: 8001
May 25 19:20:49 puma Orthanc[218672]: W0525 19:20:49.427122 main.cpp:683] Orthanc has started
May 25 19:21:04 puma Orthanc[218672]: W: Found element (0009,11a0) with VR UN and undefined length, reading a sequence with transfer syntax LittleEndianImplicit (CP-246)
May 25 19:21:04 puma Orthanc[218672]: W: DcmItem: Length of element (0009,11a1) is odd
May 25 19:21:06 puma Orthanc[218672]: E: DcmElement: PrivateCreator (0dff,00e0) larger (4261412864) than remaining bytes (209010253) in file, premature end of stream
May 25 19:21:06 puma Orthanc[218672]: W: DIMSE Warning: (KPServer,ORTHANC): DIMSE receiveDataSetInMemory: dset->read() Failed (Invalid stream)
May 25 19:21:06 puma Orthanc[218672]: E0525 19:21:06.282193 StoreScp.cpp:294] Store SCP Failed: DIMSE Failed to receive message

Hello,

I have checked again, and your file works properly.

Here are the full steps to reproduce using Docker. Open a command-line terminal 1:

cd /tmp/

sudo docker run -p 4242:4242 -p 8042:8042 --rm jodogne/orthanc:1.3.2

Open a command-line terminal 2:

cd /tmp/

sed ‘s/^(PresentationContext125).*$/\1 = 1.2.840.10008.5.1.4.1.1.13.1.2\JPEGLossless/’ /etc/dcmtk/storescu.cfg > storescu.cfg

storescu -xf storescu.cfg Default localhost 4242 ./DX000000.dcm

I: checking input files …
I: Requesting Association
I: Association Accepted (Max Send PDV: 16372)
I: Sending file: ./DX000000.dcm
[…]

I: Received Store Response (Success)
I: Releasing Association

The issue is thus to be searched in your DICOM SCU client.

Sébastien-