error (Invalid Value) parsing file: SRc.xxx.yyy.zzz

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
tommydino93
Posts: 2
Joined: Thu, 2019-07-04, 10:12

error (Invalid Value) parsing file: SRc.xxx.yyy.zzz

#1 Post by tommydino93 »

Hi!

I am having issues converting a dsr file into xml using dsr2xml

When running from command line:

Code: Select all

cd path_to_folder_containing_dsr_file
dsr2xml SRc.my.report.file test.xml
I get the following warnings/errors:

Code: Select all

W: PerformedProcedureCodeSequence (0040,a372) absent in SRDocumentGeneralModule (type 2)
W: StudyInstanceUID (0020,000d) absent in CurrentRequestedProcedureEvidenceSequence (type 1)
W: Reading unknown/unsupported CompletionFlag (COMPLETED)
W: PersonName (0040,a123) empty in content item (type 1)
W: Reading invalid/incomplete content item PNAME "1.3"
E: Reading content item PNAME "1.3" (Invalid Value)
F: dsr2xml: error (Invalid Value) parsing file: SRc.my.report.file
Any suggestions on how to fix this?

Thank you very much in advance!

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

Re: error (Invalid Value) parsing file: SRc.xxx.yyy.zzz

#2 Post by J. Riesmeier »

The SR file seems to have multiple issues, both in the general DICOM header and in the SR document tree. Could you send this file by email to bugs/at/dcmtk/dot/org for further analysis? Also enabling the debug mode (option --debug) should give you more details.

By the way, which version of the DCMTK do you use?

tommydino93
Posts: 2
Joined: Thu, 2019-07-04, 10:12

Re: error (Invalid Value) parsing file: SRc.xxx.yyy.zzz

#3 Post by tommydino93 »

Thanks for the prompt response!

As suggested, I sent the case to bugs/at/dcmtk/dot/org.

I am using v.3.6.3 of DCMTK. Enabling debugging mode outputs:

Code: Select all

D: $dcmtk: dsr2xml v3.6.3 2018-02-05 $
D: 
D: DcmDataDictionary: Loading file: /home/localadmin/Logiciels/dcmtk-3.6.3-linux-x86_64-static/share/dcmtk/dicom.dic
D: DcmMetaInfo::checkAndReadPreamble() TransferSyntax="Little Endian Explicit"
D: DcmDataset::read() TransferSyntax="Little Endian Explicit"
D: Initializing all DICOM header attributes
D: Reading SR document from DICOM dataset
D: Value of SOP Class UID: 1.2.840.10008.5.1.4.1.1.88.33
W: PerformedProcedureCodeSequence (0040,a372) absent in SRDocumentGeneralModule (type 2)
W: StudyInstanceUID (0020,000d) absent in CurrentRequestedProcedureEvidenceSequence (type 1)
W: Reading unknown/unsupported CompletionFlag (COMPLETED)
W: PersonName (0040,a123) empty in content item (type 1)
W: Reading invalid/incomplete content item PNAME "1.3"
E: Reading content item PNAME "1.3" (Invalid Value)
D: ------------------------------- DICOM DATA SET -------------------------------
D: (fffe,e000) na (Item with explicit length #=4)          # 120, 1 Item
D:   (0040,a010) CS [HAS OBS CONTEXT]                        #  16, 1 RelationshipType
D:   (0040,a040) CS [PNAME]                                  #   6, 1 ValueType
D:   (0040,a043) SQ (Sequence with explicit length #=1)      #  62, 1 ConceptNameCodeSequence
D:     (fffe,e000) na (Item with explicit length #=3)          #  54, 1 Item
D:       (0008,0100) SH [121008]                                 #   6, 1 CodeValue
D:       (0008,0102) SH [DCM]                                    #   4, 1 CodingSchemeDesignator
D:       (0008,0104) LO [Person Observer Name]                   #  20, 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,a123) PN (no value available)                     #   0, 0 PersonName
D: (fffe,e00d) na (ItemDelimitationItem for re-encoding)   #   0, 0 ItemDelimitationItem
D: ------------------------------------------------------------------------------
F: dsr2xml: error (Invalid Value) parsing file: SRc.1.2.840.113704.7.1.0.892182816510755.1549456924.1

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

Re: error (Invalid Value) parsing file: SRc.xxx.yyy.zzz

#4 Post by J. Riesmeier »

I think the log output is rather helpful. Here are some more explanations:
W: PerformedProcedureCodeSequence (0040,a372) absent in SRDocumentGeneralModule (type 2)
The above mentioned sequence attribute has to be present in the DICOM dataset, at least it should be empty (type 2).
W: StudyInstanceUID (0020,000d) absent in CurrentRequestedProcedureEvidenceSequence (type 1)
The CurrentRequestedProcedureEvidenceSequence is present with an empty item, which violates the type 1C requirement (should either be absent or present with a non-empty value).
W: Reading unknown/unsupported CompletionFlag (COMPLETED)
The only allowed terms for this attribute (so-called Enumerated Value) are PARTIAL or COMPLETE - not COMPLETE_D_.
W: PersonName (0040,a123) empty in content item (type 1)
W: Reading invalid/incomplete content item PNAME "1.3"
E: Reading content item PNAME "1.3" (Invalid Value)
The attribute PersonName is mandatory for a PNAME content item, i.e. it should always have a non-empty value.

You can ignore this error (the others are only warnings) by starting dsr2xml with option -Ev (--invalid-item-value) or -Ee (--ignore-item-errors). However, then you get the following error:

Code: Select all

W: TextValue (0040,a160) contains invalid character(s) in content item
W: Reading invalid/incomplete content item TEXT "1.4.1"
F: dsr2xml: SpecificCharacterSet (0008,0005) element absent but extended characters used in file: SRc.1.2.840.113704.7.1.0.151651861711675.1549474209.0
This is because the TEXT content item at the referenced position of the document tree uses extended (i.e. non-ASCII) characters but the DICOM dataset does to declare the SpecificCharacterSet that was used. You can fix this omission with option "+Ca latin-1" (or --charset-assume "ISO_IR 100"), i.e. assume that ISO Latin-1 (ISO 8859-1) was used to encode the extended characters (which seems to be a good choice).

Bottom line: if you created the SR document, you should fix these issues. If not, you should inform the manufacturer (or author) accordingly.

Post Reply

Who is online

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