• Issue with dump2dcm and StudyInstanceUID, incorrect value specification

    From Stephen Douglas Scotti@21:1/5 to All on Mon Jun 21 16:31:10 2021
    I am converting a .txt file version of a MWL file to a .wl file. It actually was all working until just recently, and not sure what broke the procedure. I am generating the .txt template in a python script and then converting the .txt file to a .wl
    file using dcmtk. It looks like the issue is related to the packing null byte at the end of the StudyinstanceUID.

    Looks like I cannot attach a file, so I'm just pasting the offending tag in:

    # Dicom-Data-Set
    (0020,000d) UI [1.3.6.1.4.1.56016.0.1.1.44.1624317536 ] # StudyInstanceUID

    vs.

    # Dicom-Data-Set
    (0020,000d) UI [1.3.6.1.4.1.56016.0.1.1.44.1624317536] # StudyInstanceUID

    There should be a null byte at the end of the StudyInstanceUID in the first item.

    If I execute:

    dcmdump file.txt file.wl with the first set I get the incorrect value specification error, but no error, or just an assuming --write-xfer-little warning with the second. Not sure really what has changed.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Stephen Douglas Scotti@21:1/5 to All on Mon Jun 21 16:37:10 2021
    Actually, looks like maybe dcmtk dump2dcm adds the null byte automatically if it needs to ?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?J=C3=B6rg_Riesmeier?=@21:1/5 to All on Tue Jun 22 11:46:27 2021
    Actually, looks like maybe dcmtk dump2dcm adds the null byte automatically if it needs to ?

    Correct. dump2dcm adds a padding byte if needed. If you want to see the null byte, you could call dcmdump with option -dc (--disable-correction) and +Qo (--quote-as-octal). The latter is needed because a null byte is usually not displayed (invisible
    character).

    Regards,
    Jörg

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)