core
core copied to clipboard
OcrdPage: also offer get_AllRegions on region level
trafficstars
We currently add our get_AllRegions() to the Page level only. But the PAGE-XML / generateDS API makes it complicated to enumerate all types or regions – not only on the page level, but also recursively. So we should generalize the implementation slightly (because ReadingOrder is only available at the top level), and then offer the same entry point in all region types as well.
For example, I may want to look at all text, separator and graphic regions contained in a table region of interest. Or all text lines somehow recursively contained in a music or map region of interest.