Comments (5)
I hope I have fixed most of the points now, except the selectable file group, which is quite difficult to implement (but absolutely worth it) and now handled in #9
Why should the initial view be restricted to pages contained in
OCR-D-IMG
The initial view file_group
is now determined by the algorithm outlined in my comment, point 1., the (quite dirty) implementation is here
So how about presenting all structMap entries sorted by their
@ORDER
(if present) or@ID
with the first fptr that shows up?
The page browser now uses all page_ids from ocrd_models.ocrd_mets.OcrdMets.physical_pages
(but without taking @ORDER
into account) to determine which pages "exist". It then tries to find matching image files from a given file_group to display. If no image is found for the page a "missing-image" icon is displayed.
from browse-ocrd.
That's a valid question, and I had the problem myself (original fileGrp not named OCR-D-IMG
).
Solutions to your questions:
- The fileGrp to display with
PageListStore
should not be hardcoded toOCR-D-IMG
, but should be selectable like inViewImages
. As a default it should try:
- The first of a (configurable) list of preferred fileGroups to display as images ( OCR-D-IMG, MAX, ORIGINAL) which have a mime-type matching
image/*
. - The first fileGroup (sorted by ???? maybe string length, because derived images usually have more complex name than the original?) which has a mime-type matching
image/*
. - If there is no match according to the
page_id in file_lookup
-logic you described, display a "missing image"-icon
View.use_file_group
is overridden inViewXml
andViewImages
.OCR-D-IMG
is just the default value for all possible views. Theuse_file_group
implementations in these views are actually quite robust and are taking the user selection and availability of the selected fileGrp into account. I think the way to go is to basePageListStore
on the same implementation.
What do you think?
from browse-ocrd.
2: Oh, I see! Yes, sounds reasonable to base the initial view on that as well.
1: Yes, this would be very intuitive behaviour and easy to use IMHO. Or (instead of the second criterion) one could even start with an empty view if the first criterion (fixed/configured list of preferred groups) does not yield any images.
from browse-ocrd.
I hope I have fixed most of the points now, except the selectable file group, which is quite difficult to implement (but absolutely worth it) and now handled in #9
Great work!
The initial view
file_group
is now determined by the algorithm outlined in my comment, point 1., the (quite dirty) implementation is here
Wow, you even have a heuristic for the length of the candidate fileGrps in there!
The page browser now uses all page_ids from
ocrd_models.ocrd_mets.OcrdMets.physical_pages
(but without taking@ORDER
into account) to determine which pages "exist". It then tries to find matching image files from a given file_group to display. If no image is found for the page a "missing-image" icon is displayed.
Works perfectly, many thanks!
from browse-ocrd.
I will close this now, for the rest see #9
from browse-ocrd.
Related Issues (20)
- make TextView and PageView searchable
- cannot run in Python pre 3.7.2 anymore HOT 2
- Feature Request: Scroll lock panels
- Integrate page-xml-draw HOT 4
- PageView: PNG-Export
- PageView: Additional information in tooltip HOT 1
- page view: add baselines if available HOT 1
- PageView: component menu not editable HOT 2
- Display / edit of GT labelling metadata HOT 1
- ViewPage: ignore AlternativeImage if not retrievable HOT 6
- support path names with spaces
- ViewPage: ReadingOrder display ignores tables
- AlternativeImage selection glitch
- False warning about number of images per grp/page
- Support remote images HOT 3
- AttributeError: 'EntryPoints' object has no attribute 'get' HOT 2
- use last fileGrp as default HOT 3
- add CLI options for better Dockerization HOT 2
- Application crashes on launch HOT 3
- show physical page ids instead of thumbnail image file ids
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from browse-ocrd.