error importing certain dicom file

  • Hi,


    We sometimes get DICOM images that Conquest can't import.

    Error with original DICOM file:

    ***Explicit_ParseRaw encountered an invalid element length during load of DCM file (in 49534d45)

    ***Length = 8275

    ***Continuing parsing

    ***(Exp) Encountered an invalid group order during load of DCM file (after 49534d45)


    I had some trouble making an anonymized version because some anonymizers corrected the error in the DICOM file :)

    The error changes to:

    ***Length exceeds remaining file size: 00002053


    When i dump the original DICOM header with DCMTK i get the following warning that i believe is the problem in these files:

    W: Found element (0029,1140) with VR UN and undefined length, reading a sequence with transfer syntax LittleEndianImplicit (CP-246)


    if i remove this tag (sequence) the problem goes away.

    Is there anything that can be done on the Conquest side to make Conquest read these DICOM files?


    Attached the anonymized version.



    Regards,

    Robert

  • Hi Marcel,


    i've added to the dgate.dic:


    (0029,0010) VERS="4" VR="LO" VM="1" Keyword="SiemensMedcomHeader" Name="Siemens Medcom Header"

    (0029,1041) VERS="4" VR="CS" VM="1" Keyword="SiemensApplicationHeaderType" Name="Siemens Application Header Type"

    (0029,1042) VERS="4" VR="LO" VM="1" Keyword="SiemensApplicationHeaderID" Name="Siemens Medcom Application Header ID"

    (0029,1043) VERS="4" VR="LO" VM="1" Keyword="SiemensApplicationHeaderVersion" Name="Siemens Application Header Version"

    (0029,1044) VERS="4" VR="OB" VM="1" Keyword="SiemensApplicationHeaderInfo" Name="Siemens Application Header Info"

    (0029,1140) VERS="4" VR="SQ" VM="1" Keyword="SiemensApplicationHeaderSequence" Name="Siemens Application Header Sequence"



    but i still get the same error.


    Regards,

    Robert

  • Hi,


    The 0029,1140 has a DIFFERENT coding than other sequences in the same file. If you look at the hex dump, you that before SIEMENS MEDCOM there is no typecode, while elsewhere there are type codes. I think this happened because an implicit code object was changes to explicit, while 29,1140 was not recognised as a sequence. This may be in your anomymiser or in other software that processed this image. It will happen in conquest as well, before you added the definition.


    Marcel

  • Robbert,


    are you Linux or windows?


    These lines seem to help:



    After the Pack() line around line 1024 in trnsyn.cxx.mixed_encoding_dgate.zip


    Let me knwo if you need a windows exe. Cant attach it here.


    Marcel

  • Hi Marcel,


    found some new files that will not import into Conquest.

    Error: ***(Exp) Encountered an invalid group order during load of DCM file (after 70079107)


    When i do a dicomdump with DCMTK i get the following warnings:

    W: Found element (7005,110a) with VR UN and undefined length, reading a sequence with transfer syntax LittleEndianImplicit (CP-246)

    W: Found element (7005,110b) with VR UN and undefined length, reading a sequence with transfer syntax LittleEndianImplicit (CP-246)

    W: Found element (7005,110c) with VR UN and undefined length, reading a sequence with transfer syntax LittleEndianImplicit (CP-246)


    I tried entering those sequences in de dictionary:

    (7005,110a) VERS="4" VR="SQ" VM="1" Keyword="CanonPrivateSequence1" Name="Canon Private Sequence 1"

    (7005,110b) VERS="4" VR="SQ" VM="1" Keyword="CanonPrivateSequence2" Name="Canon Private Sequence 2"

    (7005,110c) VERS="4" VR="SQ" VM="1" Keyword="CanonPrivateSequence3" Name="Canon Private Sequence 3"


    but still the same error.

    can i send you a example file?


    Regards,

    Robert

  • File: dgate64_mixencoding2.exe


    in the same folder. Refined the check for an incorrect typecode. Works for your sample, may not work for others still....


    // invalid typecode, may be unexpected implicit coding

    if (s1[0]<'A' || s1[0]>'Z' || s1[1]<'A' || s1[1]>'Z')


    Marcel

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!