Dicom SR problem

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
gzhang
Posts: 50
Joined: Wed, 2015-09-02, 09:24

Dicom SR problem

#1 Post by gzhang »

Hi,

I have some DICOM SR files from an x-ray imaging system. When I tried to process it, for example, with "dsr2html.exe", it says:

Code: Select all

W: Reading invalid/incomplete content item IMAGE "1.11.5"
E: Reading content item IMAGE "1.11.5" (Invalid Value)
E: Reading content item CONTAINER "1.11" (Invalid Value)
F: dsr2html: error (Invalid Value) parsing file..
Alternatively, if I tried to insert/remove a tag with "dcmodify.exe", it always says "corrupted data".

I wonder if there is a way to correct or rewrite the SR file? Or simply drop those items "IMAGE" and "CONTAINER"? Thanks!

J. Riesmeier
DCMTK Developer
Posts: 2501
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: Dicom SR problem

#2 Post by J. Riesmeier »

First of all, what does the output show when the debug logger is enabled, i.e. when starting dsr2html with "-d" or "--debug"?

If you use dsr2html from a recent snapshot, there are options to disable some validity checks and/or skip invalid content items (including their subtrees).

You could also send the SR file to me for further analysis. Please use the email address "bugs/at/dcmtk/dot/org".

gzhang
Posts: 50
Joined: Wed, 2015-09-02, 09:24

Re: Dicom SR problem

#3 Post by gzhang »

Hi,

Here is what the logger says (More than 60000 characters, I had to cut it shorter to put it here):

Code: Select all

D: $dcmtk: dsr2html v3.6.0 2011-01-06 $
D: 
D: DcmItem::checkTransferSyntax() TransferSyntax="Little Endian Explicit"
W: Manufacturer (0008,0070) empty in EnhancedGeneralEquipmentModule (type 1)
W: ManufacturerModelName (0008,1090) absent in EnhancedGeneralEquipmentModule (type 1)
W: DeviceSerialNumber (0018,1000) absent in EnhancedGeneralEquipmentModule (type 1)
W: SoftwareVersions (0018,1020) absent in EnhancedGeneralEquipmentModule (type 1)
W: ReferencedSOPInstanceUID (0008,1155) empty in ReferencedSOPSequence (type 1)
W: Reading invalid/incomplete content item IMAGE "1.11.5"
E: Reading content item IMAGE "1.11.5" (Invalid Value)
D: ------------------------------- DICOM DATA SET -------------------------------
D: (fffe,e000) na (Item with explicit length #=4)          # 224, 1 Item
D:   (0008,1199) SQ (Sequence with explicit length #=1)      # 114, 1 ReferencedSOPSequence
D:     (fffe,e000) na (Item with explicit length #=4)          # 106, 1 Item
D:       (0008,1150) UI =XRayAngiographicImageStorage            #  28, 1 ReferencedSOPClassUID
D:       (0008,1155) UI (no value available)                     #   0, 0 ReferencedSOPInstanceUID
D:       (2001,0010) LO [Philips Imaging DD 001]                 #  22, 1 PrivateCreator
D:       (2001,10c1) LO [Referenced SOP Sequence]                #  24, 1 Unknown Tag & Data
D:     (fffe,e00d) na (ItemDelimitationItem for re-encoding)   #   0, 0 ItemDelimitationItem
D:   (fffe,e0dd) na (SequenceDelimitationItem for re-encod.) #   0, 0 SequenceDelimitationItem
D:   (0040,a010) CS [CONTAINS]                               #   8, 1 RelationshipType
D:   (0040,a040) CS [IMAGE]                                  #   6, 1 ValueType
D:   (0040,a043) SQ (Sequence with explicit length #=1)      #  56, 1 ConceptNameCodeSequence
D:     (fffe,e000) na (Item with explicit length #=3)          #  48, 1 Item
D:       (0008,0100) SH [113795]                                 #   6, 1 CodeValue
D:       (0008,0102) SH [DCM]                                    #   4, 1 CodingSchemeDesignator
D:       (0008,0104) LO [Acquired Image]                         #  14, 1 CodeMeaning
D:     (fffe,e00d) na (ItemDelimitationItem for re-encoding)   #   0, 0 ItemDelimitationItem
D:   (fffe,e0dd) na (SequenceDelimitationItem for re-encod.) #   0, 0 SequenceDelimitationItem
D: (fffe,e00d) na (ItemDelimitationItem for re-encoding)   #   0, 0 ItemDelimitationItem
D: ------------------------------------------------------------------------------
E: Reading content item CONTAINER "1.11" (Invalid Value)
D: ------------------------------- DICOM DATA SET -------------------------------
D: (fffe,e000) na (Item with explicit length #=5)          # 8614, 1 Item
D:   (0040,a010) CS [CONTAINS]                               #   8, 1 RelationshipType
D:   (0040,a040) CS [CONTAINER]                              #  10, 1 ValueType
D:   (0040,a043) SQ (Sequence with explicit length #=1)      #  70, 1 ConceptNameCodeSequence
D:     (fffe,e000) na (Item with explicit length #=3)          #  62, 1 Item
D:       (0008,0100) SH [113706]                                 #   6, 1 CodeValue
D:       (0008,0102) SH [DCM]                                    #   4, 1 CodingSchemeDesignator
D:       (0008,0104) LO [Irradiation Event X-Ray Data]           #  28, 1 CodeMeaning
D:     (fffe,e00d) na (ItemDelimitationItem for re-encoding)   #   0, 0 ItemDelimitationItem
D:   (fffe,e0dd) na (SequenceDelimitationItem for re-encod.) #   0, 0 SequenceDelimitationItem
D:   (0040,a050) CS [SEPARATE]                               #   8, 1 ContinuityOfContent
D:   (0040,a730) SQ (Sequence with explicit length #=30)     # 8470, 1 ContentSequence
D:     (fffe,e000) na (Item with explicit length #=4)          # 174, 1 Item
D:       (0040,a010) CS [HAS CONCEPT MOD]                        #  16, 1 RelationshipType
D:       (0040,a040) CS [CODE]                                   #   4, 1 ValueType
D:       (0040,a043) SQ (Sequence with explicit length #=1)      #  60, 1 ConceptNameCodeSequence
D:         (fffe,e000) na (Item with explicit length #=3)          #  52, 1 Item
D:           (0008,0100) SH [113764]                                 #   6, 1 CodeValue
D:           (0008,0102) SH [DCM]                                    #   4, 1 CodingSchemeDesignator
D:           (0008,0104) LO [Acquisition Plane]                      #  18, 1 CodeMeaning
D:         (fffe,e00d) na (ItemDelimitationItem for re-encoding)   #   0, 0 ItemDelimitationItem
D:       (fffe,e0dd) na (SequenceDelimitationItem for re-encod.) #   0, 0 SequenceDelimitationItem
D:       (0040,a168) SQ (Sequence with explicit length #=1)      #  54, 1 ConceptCodeSequence
D:         (fffe,e000) na (Item with explicit length #=3)          #  46, 1 Item
D:           (0008,0100) SH [113622]                                 #   6, 1 CodeValue
D:           (0008,0102) SH [DCM]                                    #   4, 1 CodingSchemeDesignator
D:           (0008,0104) LO [Single Plane]                           #  12, 1 CodeMeaning
D:         (fffe,e00d) na (ItemDelimitationItem for re-encoding)   #   0, 0 ItemDelimitationItem
D:       (fffe,e0dd) na (SequenceDelimitationItem for re-encod.) #   0, 0 SequenceDelimitationItem
D:     (fffe,e00d) na (ItemDelimitationItem for re-encoding)   #   0, 0 ItemDelimitationItem
D:     (fffe,e000) na (Item with explicit length #=4)          # 128, 1 Item
...
...
D:         (fffe,e00d) na (ItemDelimitationItem for re-encoding)   #   0, 0 ItemDelimitationItem
D:       (fffe,e0dd) na (SequenceDelimitationItem for re-encod.) #   0, 0 SequenceDelimitationItem
D:     (fffe,e00d) na (ItemDelimitationItem for re-encoding)   #   0, 0 ItemDelimitationItem
D:   (fffe,e0dd) na (SequenceDelimitationItem for re-encod.) #   0, 0 SequenceDelimitationItem
D: (fffe,e00d) na (ItemDelimitationItem for re-encoding)   #   0, 0 ItemDelimitationItem
D: ------------------------------------------------------------------------------
F: dsr2html: error (Invalid Value) parsing file..
I would love to send the file for further analysis, but the problem is I couldn't anonymize it easily because 'dcmodify' also fails.

J. Riesmeier
DCMTK Developer
Posts: 2501
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: Dicom SR problem

#4 Post by J. Riesmeier »

Code: Select all

W: ReferencedSOPInstanceUID (0008,1155) empty in ReferencedSOPSequence (type 1)
[...]
D:   (0008,1199) SQ (Sequence with explicit length #=1)      # 114, 1 ReferencedSOPSequence
D:     (fffe,e000) na (Item with explicit length #=4)          # 106, 1 Item
D:       (0008,1150) UI =XRayAngiographicImageStorage            #  28, 1 ReferencedSOPClassUID
D:       (0008,1155) UI (no value available)                     #   0, 0 ReferencedSOPInstanceUID
One problem with the SR document is: The ReferencedSOPInstanceUID is mandatory and should, therefore, not be empty.
I would love to send the file for further analysis, but the problem is I couldn't anonymize it easily because 'dcmodify' also fails.
What do you mean by fail? It might not be that easy to change nested element values with dcmodify but it's possible. See examples in the documentation.

Alternatively, you could use dcmdump/dump2dcm or dcm2xml/xml2dcm in order to modify the content of the SR document in a text editor.

gzhang
Posts: 50
Joined: Wed, 2015-09-02, 09:24

Re: Dicom SR problem

#5 Post by gzhang »

Hi,

dcmodify fails, for example, here is what it says when I tried to insert an institution name:
dcmodify -i "(0800,0080)=Test Institution" -d -ie SRd*

Code: Select all

I: Processing file: SRd.1.3.46.670589.28.96161007153120170117161734475881.2
I: Loading file into dataset manager: SRd.1.3.46.670589.28.96161007153120170117161734475881.2
D: DcmItem::checkTransferSyntax() TransferSyntax="Little Endian Explicit"
I: Getting dataset from loaded file: SRd.1.3.46.670589.28.96161007153120170117161734475881.2
I: Executing (option|path|value): i|(0800,0080)|Test Institution
E: modifying tag in file SRd.1.3.46.670589.28.96161007153120170117161734475881.2: Corrupted data
D: DcmFileFormat::checkMetaHeaderValue() Version of MetaHeader is ok: 0x0100
D: DcmFileFormat::checkMetaHeaderValue() use new TransferSyntaxUID [Little Endian Explicit] on writing following Dataset
D: DcmFileFormat: Found 8 Elements in DcmMetaInfo 'metinf'
I: Saving current dataset to file: SRd.1.3.46.670589.28.96161007153120170117161734475881.2
I: ------------------------------------
E: There was 1 error

J. Riesmeier
DCMTK Developer
Posts: 2501
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: Dicom SR problem

#6 Post by J. Riesmeier »

You probably mean (0008,0080), which is InstitutionName.

gzhang
Posts: 50
Joined: Wed, 2015-09-02, 09:24

Re: Dicom SR problem

#7 Post by gzhang »

Sorry, my fault. Now I have used 'dcmodify' to anonymize the SR.
Then, if I run 'dsr2html -d -Ee -Ei SRd* test.html', here is what the logger says:

Code: Select all

D: $dcmtk: dsr2html v3.6.0 2011-01-06 $
D: 
D: DcmItem::checkTransferSyntax() TransferSyntax="Little Endian Explicit"
W: Manufacturer (0008,0070) empty in EnhancedGeneralEquipmentModule (type 1)
W: ManufacturerModelName (0008,1090) absent in EnhancedGeneralEquipmentModule (type 1)
W: DeviceSerialNumber (0018,1000) absent in EnhancedGeneralEquipmentModule (type 1)
W: SoftwareVersions (0018,1020) absent in EnhancedGeneralEquipmentModule (type 1)
W: ReferencedSOPInstanceUID (0008,1155) empty in ReferencedSOPSequence (type 1)
W: Reading invalid/incomplete content item IMAGE "1.11.5"
W: ReferencedSOPInstanceUID (0008,1155) empty in ReferencedSOPSequence (type 1)
W: Reading invalid/incomplete content item IMAGE "1.16.5"
W: ReferencedSOPInstanceUID (0008,1155) empty in ReferencedSOPSequence (type 1)
W: Reading invalid/incomplete content item IMAGE "1.23.5"
W: ReferencedSOPInstanceUID (0008,1155) empty in ReferencedSOPSequence (type 1)
W: Reading invalid/incomplete content item IMAGE "1.25.5"
W: ReferencedSOPInstanceUID (0008,1155) empty in ReferencedSOPSequence (type 1)
W: Reading invalid/incomplete content item IMAGE "1.26.5"
W: ReferencedSOPInstanceUID (0008,1155) empty in ReferencedSOPSequence (type 1)
W: Reading invalid/incomplete content item IMAGE "1.27.5"
W: Rendering invalid/incomplete content item IMAGE
W: Rendering invalid/incomplete content item IMAGE
W: Rendering invalid/incomplete content item IMAGE
W: Rendering invalid/incomplete content item IMAGE
W: Rendering invalid/incomplete content item IMAGE
W: Rendering invalid/incomplete content item IMAGE
Since it's already anonymized, shall I send it to you for further analysis? Thanks!

J. Riesmeier
DCMTK Developer
Posts: 2501
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: Dicom SR problem

#8 Post by J. Riesmeier »

You could do... however, the reason for the problem should be obvious from the log output (also see my above comment):

Code: Select all

W: ReferencedSOPInstanceUID (0008,1155) empty in ReferencedSOPSequence (type 1)

gzhang
Posts: 50
Joined: Wed, 2015-09-02, 09:24

Re: Dicom SR problem

#9 Post by gzhang »

OK! May I take it that the problem of

Code: Select all

W: Reading invalid/incomplete content item IMAGE "1.11.5"
and

Code: Select all

W: Rendering invalid/incomplete content item IMAGE
will be solved if the corresponding 'ReferencedSOPInstanceUID (0008,1155)' is filled correctly, right?

J. Riesmeier
DCMTK Developer
Posts: 2501
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: Dicom SR problem

#10 Post by J. Riesmeier »

Right 8)

gzhang
Posts: 50
Joined: Wed, 2015-09-02, 09:24

Re: Dicom SR problem

#11 Post by gzhang »

Thank you very much! :)

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot], Google [Bot] and 1 guest