Recipe #299: Addressing a Spatial Region
Opened this issue ยท 11 comments
Links
- Original Issue: IIIF/cookbook-recipes#299
- Pull Request: IIIF/cookbook-recipes#307
- Preview: https://preview.iiif.io/cookbook/0299-region/recipe/0299-region/
Background and Summary
This is a recipe which is commonly requested on the IIIF training courses. It addresses the use case where you would like to use a region of a IIIF image to construct a canvas. This could be to collect articles or photographs from a Newspaper or to focus on only part of an image.
This is achieved by using a IIIF Image API selector which was introduced in the rotation recipe.
Voting and changes
We welcome comments on the recipe and as well as voting +1, confused face or -1 feel free to add comments to this issue. If this issue is approved then the author will take account of the comments before we merge the branch in to the master cookbook branch.
If the recipe is rejected by the TRC then we will make the changes requested and resubmit it to a future TRC meeting. If you feel that your comments are substantial enough that the recipe should be looked at again by the TRC after the changes have been made please vote -1 (thumbs down). A confused face is treated as abstaining.
Changes to the recipe will only be made after the TRC voting process has concluded.
Add reference to 261 in Restrictions when talking about SVG and in Related Recipes.
Code format ImageApiSelector
text in the Examples section
The only reason you are using SpecificResource
is because though there is an entire Image, you only ever intend to show a selected section of that image, and perhaps even further you want to viewers to ignore the rest of the image. Essentially you are replicating a permanent crop using Canvas sizing and ImageAPI Region Selection instead of cropping the resource.
If you intended to show the entire image, even if the target
were some kind of segment, you would just have the Image
and not the SpecificResource
. Is that correct? I haven't seen too many examples of the SpecificResource
in IIIF settings so I am hoping this conclusion is correct. If so, this makes sense, and makes it easier to Annotate with other Annotations down the road.
That is my understanding, @thehabes
Looks good. I left some wording suggestions in Hypothes.is.
After voting, I'll make some textual edits to "Copy and Crop" and "Static Image" to heighten contrast. I'd like to stay away from making explicit what Glen said about C&C being the only way to make it work right now (to address indirectly and feebly @cubap's good question about why are we telling people how to achieve things outside IIIF).
(Also, my conventional notice that I voted ๐๐ป for my own recipe.)
Hi @triplingual . I notice here that you have never actually scoped in a context for iiif:ImageAPISelector
. http://iiif.io/api/annex/openannotation/context.json, https://iiif.io/api/presentation/3/context.json, and even https://iiif.io/api/image/2/context.json do not define it.
In your selector @context
you can alleviate this linked data inconsistency by defining the link into Image API 2 for that term. It would be
"selector": {
"@context": {
"iiif":"http://iiif.io/api/image/2#",
"ImageAPISelector":"iiif:ImageAPISelector"
}
"type": "ImageApiSelector",
"region": "1768,2423,1768,2080"
}
The rest of your terms in the selector are handled by presentation 3 context.json because you say you are using an "ImageService3".
Oooooo I see what this can of worms is. the context.json for presi3 and presi2 have iiif:http://iiif.io/api/image/3#
and iiif:http://iiif.io/api/image/2#
in their context.json. However, neither of those APIs have vocabulary/ontology for "ImageApiSelector". What actually does define the vocabulary is https://iiif.io/api/annex/openannotation/#iiif-image-api-selector. But even http://iiif.io/api/annex/openannotation/context.json does not have an entry linking "ImageAPISelector" to that vocabulary. Yeesh.
New Plan.
"selector": {
"@context": {
"ImageAPISelector":"https://iiif.io/api/annex/openannotation/#iiif-image-api-selector"
}
"type": "ImageApiSelector",
"region": "1768,2423,1768,2080"
}
OOOOOOk Presi 2, Presi 3, Image 2, and Image 3 don't seem to define the property region
. The openannotation context.json vocabulary link http://iiif.io/api/image/2#regionValue
is disingenuous, as regionValue
is also not specifically defined there. The best definition for region is at https://iiif.io/api/image/3.0/#41-region.
I am feeling your pain.
Below is the best you could do, and it just may not be worth getting into this with a recipe, I get what you and Glen were trying to tell me. This is probably more genuine than https://iiif.io/api/annex/openannotation/context.json
New New Plan
"selector": {
"@context": {
"ImageAPISelector":"https://iiif.io/api/annex/openannotation/#iiif-image-api-selector",
"region":"https://iiif.io/api/image/3.0/#41-region"
}
"type": "ImageApiSelector",
"region": "1768,2423,1768,2080"
}
Issue 97 (Recipe #299: Addressing a Spatial Region)
+1: 23 [akrishnan15 cubap digitaldogsbody dlpierce eliotjordan glenrobson hadro irv jpadfield jtweed julsraemy ksclarke markpbaggett mixterj mposton-folger nfreire omaeazusa regisrob robcast thehabes tpendragon triplingual zimeon]
0: 0 []
-1: 0 []
Not TRC: 0 []
Ineligible: 1 [jcreel]
Result: 23 / 23 = 1.00
Super majority is in favor, issue is approved