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">
</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