Weasis Dicom SR

120 views
Skip to first unread message

Andrea Ricci

unread,
Jun 21, 2019, 8:50:33 AM6/21/19
to dcm4che
Hello everybody,

I think there'is an error in display of "Measurement Units Code Sequence".

Measurement Units Code Sequence     (0040,08EA)     SQ     -1    
>Item #1
>Code Value     (0008,0100)     SH     2     1
>Coding Scheme Designator     (0008,0102)     SH     4     UCUM
>Coding Scheme Version     (0008,0103)     SH     2     01
>Code Meaning     (0008,0104)     LO     8     no units

In case like this the number "1" is shown as measurement unit (e.g. in calibration factor data).
I think the best solution would be to show nothing.
Another hint in all other cases it's better to show the value in "Code Meaning" instead of "Code Value".

Nicolas Roduit

unread,
Jun 29, 2019, 2:51:10 AM6/29/19
to dcm4che
Do you mean the unit rendered by the DICOM SR module here ?

What would be the conditions in pseudo-code for the unit display according to you?

There is a fix related to the unit in the next release.

Andrea Ricci

unread,
Jul 1, 2019, 3:26:49 AM7/1/19
to dcm...@googlegroups.com
This should works also instead of getExistingCodeValue() .
The Code Meaning is 1 so always present.

 
                    if (item != null) {
                        Code unit = new Code(item);
                        if (!unit.getCodeValue().equals("1")){
                            html.append(" "); //$NON-NLS-1$
                            html.append(EscapeChars.forHTML(unit.getCodeMeaning()));
                        }
                    }

Nicolas Roduit

unread,
Jul 6, 2019, 3:03:41 AM7/6/19
to dcm4che
I changed to:

                   Attributes item = val.getNestedDataset(Tag.MeasurementUnitsCodeSequence);
                   if (item != null) {
                       Code unit = new Code(item);
                       html.append(" ");
                       addCodeMeaning(html, unit, null, null);
                   }

I haven't found a reference that talks about the codeValue at 1 to define no value.

It is preferable to use codeMeaning instead of codeValue.

Andrea Ricci

unread,
Jul 8, 2019, 3:16:14 AM7/8/19
to dcm4che

Nicolas Roduit

unread,
Jul 8, 2019, 8:35:37 AM7/8/19
to dcm4che
Thanks, I finally found here.

Here is the final code (inverting the test because code value can be null)
                    Attributes item = val.getNestedDataset(Tag.MeasurementUnitsCodeSequence);
                    if (item != null) {
                        Code unit = new Code(item);
                        if (!"1".equals(unit.getCodeValue())) {
                            html.append(" "); //$NON-NLS-1$
                            addCodeMeaning(html, unit, null, null);
                        }
                    }


Reply all
Reply to author
Forward
0 new messages