Most of my work invloves using an existing DICOM file as a template. Thus, I've reasoned that I can probably make of the modifications I would ever need to using XPaths.
I was interested if there is a convention for defining an XPath such that it always refers to a unique element.
I've considered that the 2-byte tag is unique and can only be repeated in different groups or sequences
Excerpt from dcm2xml.dtd
Code: Select all
<!ATTLIST element tag CDATA #REQUIRED > # This is a unique key
<!ATTLIST sequence tag CDATA #REQUIRED > # This is a unique key
Code: Select all
/child::file-format/child::data-set/child::sequence[attribute::tag="0054,0410"]/child::item[position()=1]/child::sequence[attribute::tag="0054,0412"]/child::item[position()=1]/child::element[attribute::tag="0008,0100"]