DCM4CHEE - Coerce DICOM tags with Multiple Values (VM>1)

262 views
Skip to first unread message

Tim Leibovich

unread,
Oct 5, 2015, 4:30:18 PM10/5/15
to dcm...@googlegroups.com
I need to map the Pixel Spacing tag (0028, 0030) to the Imager Pixel Spacing field (0018, 1164), and I am running dcm4chee 2.18.0 with PSQL.

I added the below to the dcm4chee-attribute-filter.xml under <series>:

<attr tag="00181164" field="seriesCustomAttribute2"/> <!-- Imager Pixel Spacing -->

I also added the below to the cstorerq.xsl file within the <dataset> section:

<xsl:variable name="pixelsp" select="normalize-space(attr[@tag='00280030'])" /> 
<attr tag="00181164" vr="DS">
<xsl:value-of select="$pixelsp"/>
</attr>

In the case that the value of the Pixel Spacing (0028, 0030) tag is "0.1\0.1" the log shows the error: 
[org.dcm4cheri.data.StringElement] Illegal DS Value: 0.1\0.1

When I performed an dcm2xml on one of the images, it shows the below for the Spacing info:

<DicomAttribute keyword="PixelSpacing" tag="00280030" vr="DS">
<Value number="1">0.1</Value>
<Value number="2">0.1</Value>
</DicomAttribute>

I think what needs to happen is that I need to find a way using XSLT to alter the values separately.  But, since I'm new to XML/XSLT scripts, I am having trouble finding a way to do that.

Could someone help me figure out what XSLT code I could use within cstorerq.xsl to transform these values as needed?

Thanks,
Tim

Tim Leibovich

unread,
Oct 5, 2015, 5:59:59 PM10/5/15
to dcm4che
Nevermind on this post... Looks like it is mapping it properly even though it is throwing the warning.

Thanks,
Tim
Reply all
Reply to author
Forward
0 new messages