Image Mapping Zones with the TEI Facsimile Plugin in oXygen - milnegeneseo/digital-scholarly-editing GitHub Wiki
The oXygen XML Editor has a helpful plugin tool to assist in defining zone coordinates by drawing directly on an image. To use it, you need to install it as a new add-on. Here's how to install it:
- In the oXygen XML Editor, go to the Help menu, and select "Install new add-ons".
- There's an entry box labeled: "Show add-ons from:" In the box, paste in the link to the TEI Facsimile Plugin from its GitHub source:
https://github.com/oxygenxml/TEI-Facsimile-Plugin/raw/master/addon/image-markup-plugin.xml
- You should see it appear in the big box below as a Plugin that "Can be installed." Click the check-box next to it to proceed. Then click "Next" to continue.
- Click the box to accept the end-user license agreements, and click Install.
- You may see a warning that "Not all selected add-ons have valid signatures." We are not usually worried about security threats from tools developed by oXygen, so go ahead and click "Continue anyway."
- Restart oXygen to start working with the new plugin. (Go to File > Exit to fully shut down oXygen, and then re-open it.)
To work with the image-mapping plugin, in the oXygen XML Editor, toggle the "Author" view. This is at the bottom of the screen where you will see "Text", "Grid", "Author". The Author view is an alternative way to view your coding, and it allows image URLs to be viewed in the document.
Look for an "Image-Markup Window along the right of your oXygen interface, and select "Open" to open the URL you wish to map. For our Walden manuscript project, we recommend viewing the Huntington Library's exceedingly high-resolution images at 10% in the oXygen viewer for mapping. Here is an example to show the format of the IIIF URL to open an image at 10%:
https://cdm16003.contentdm.oclc.org/digital/iiif/p16003coll16/232/full/pct:10/0/default.jpg
Here the pct:10
in the URL specifies that the image should be viewed at 10% of its full resolution.
When the image is open, use your mouse to draw a rectangle around a portion of an image you wish you isolate in its own TEI zone. As you draw the box, oXygen generates a <zone>
element in your TEI document at the point where you last left your cursor in the code. Look for a new <zone>
element in the TEI document with attributes @ulx
, @uly
, @lrx
, and @lry
with numerical values. These are referring to x and y (horizontal and vertical) pixel positions in the image for the upper left and bottom right corners of the rectangular zone you have demarked. Here is a screen capture of the process of isolating a marking in blue "p. 468" on a sample file:
In the screen capture: red box drawn around p. 468
on the image produces the following code:
<zone ulx="83" uly="111" lrx="158" lry="173"/>
Notice that the automatically generated <zone/>
element is self-closed. Open it to encode the contents of this zone you have delineated.
<zone ulx="83" uly="111" lrx="158" lry="173">
<!-- Add your markup of the contents of this zone here. -->
</zone>
When you are finished encoding your surface, the Digital Thoreau editors will run an XSLT script to add a IIIF URL pointing directly to the zone you mapped on the page surface image that you encoded, so that the URL for the image-mapped region is part of the TEI encoding. Running this script will add a little more detail to your encoding.