openmicroscopy/bioformats — pull request #407 by rleigh-dundee (2013-03-04 16:28:22+00:00)
Title: ZVI: Parse ROIs correctly (develop)

ZeissZVIReader: Add layer early to avoid ROI loss if exception thrown

ZeissZVIReader: Correct use of offsets within the ROI block

Replace the existing two phases of detecting with ROI signatures and then processing each signature with a single loop to iterate over the ROI block. This prevents errors when the ROI signature is found in the ShapeAttrs sub-block or the points block, or anywhere else within an individual ROI. Also parse the total shape count for error checking. Additionally, rather than detecting the offsets for the name and font blocks and then seeking back, just parse these on the fly. Errors autodetecting the offsets were causing problems which this solves. Also parse out the ROI name in additional to text annotation.