Why check Dictionary for non UN VR after reading the length?

25 views
Skip to first unread message

Aerik Sylvan

unread,
Jun 17, 2014, 3:20:33 PM6/17/14
to fo-d...@googlegroups.com
In DicomReader.ParseDataset, there is a section with the comment, 

"check dictionary for VR after reading length to handle 16-bit lengths"

but this happens in the ParseState.Value block, after the _length has already been set.  What is the rationale for that?  I do not see the length being reset.

I'm asking because I have some files with sequences marked as UN VRs, and they break because the length is read incorrectly.  I'm going to try putting that check earlier in the code, *before* the length is read.

Any input?

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