moloney/dcmstack — pull request #26 by kevlarkevin (2014-07-30 18:43:23+00:00)
Title: Verify element name before attempting translation

This pull request attempts to resolve an issue with Siemens dicoms that store something other than a ['CSA Image Header Info'] in tag (0x29,0x1010).

Some siemens dicoms, such as those of image_type ['DERIVED', 'SECONDARY', 'OTHER', 'CSA 3D EDITOR'], may include '[CSA Data Info]' at tag (0x29,0x1010), instead of '['CSA Image Header Info]'. The value of this tag is not a valid csa string, and is not parseable with nibabel.nicom.csareader.read().

The proposed fix is to have the each translate functions check the element name before translating. If the element has an incorrect name, then it returns an empty dictionary.