Skip to content

v0.5-beta (7th IEEE CiSt'23)

Latest
Compare
Choose a tag to compare
@pierpaolosichera pierpaolosichera released this 20 Dec 09:03
· 2 commits to main since this release

ZoneRW

ZoneRW is a WYSIWYG tool that, starting from the declaration of the surfaces with the relative graphic and zone tags, shows the zones encoded in the TEI file with the relative xml: id attributes, allowing them to be modified on the fly (updating the coordinates, adding or removing zone) generating the relative TEI code. The result on the screen can be exported to images.

Environment

ZoneRW is developed using 4th Dimension.
Among the many features of the 4D platform, the native XML support with the Apache Foundation's Xerces library, the access to the structure through the DOM (Document Object Model) standard, the management of the SVG (Scalable Vector Graphics) format, both as visualization that creation and modification.

Installation

on Windows

download the Windows folder, unzip the archive you downloaded and run ZoneRW.exe

on MacOSX

download the MacOSX folder and unzip the compressed archive contained in "Installer 4D". Install 4D.18.6. Once 4D is installed, use the 4D application to open ZoneRW (probably located in /Applications/4D v18.6/ folder); open the 4D.app file; then choose "File -> Open -> Local application ->" and open the ZoneRW.4dbase package you downloaded.

XML-TEI specifications

In the start window, click on the "XML folder" space to select the folder containing the XML files, and on the "Picture folder" space to select the folder containing the images. The chosen settings will be stored for subsequent program starts.
https://github.com/pierpaolosichera/ZoneRW/blob/main/README_images/01_Home.gif

After clicking on "Start", ZoneRW shows the list of files from the folder set at startup.
When the user chooses a file, ZoneRW shows the images recalled in the file.
Once an image has been chosen, ZoneRW loads it from the folder set for image search.
ZoneRW searches for the image:

  • in the folder set at startup;
  • in a subfolder having the same name as the image file;
  • in a subfolder having the same name as the XML file without the extension;
  • in a subfolder having the same name as the XML file without the extension by replacing the "." with the "_" character.

If the image has been found, ZoneRW looks for the <surface> tag related to the chosen page; intercepted the <surface> element, ZoneRW searches among the children

  • the <graphic> tag to find the corresponding image (@url attribute);
  • the declared size (@width attribute), in order to calculate a possible scale ratio between image and coordinates;
  • all <zone> tags (even nested) to draw the zones on the screen.

The list of zones is populated with the values of the attributes @xml:id, @rendition, and the coordinates with @Points, @ulx, @uly, @lrx and @lry.
The relative id is shown in the upper left corner of each area.
https://github.com/pierpaolosichera/ZoneRW/blob/main/README_images/02_Start.gif

Functionality

How to use the ZoneRW main window.

  • The "Aggiungi zona" and "Elimina zona" buttons respectively add or delete a zone.

  • The "Genera TEI" button inserts the text containing the zones in XML-TEI format on the clipboard.

  • The "Export image" button exports a file with the image shown.

  • It is possible to modify the zone data manually by entering the coordinates.

  • When the cursor is in the zone list, you can move between the lines with the up/down arrow keys.

  • When the cursor is in the ulx or uly columns, clicking on the image, the coordinates of the point at the top left are automatically updated based on the click. Same thing when the cursor is on lrx and lry.

  • The "Edit" check box hides the lists of documents and images in order to avoid changing pages when editing zones.
    https://github.com/pierpaolosichera/ZoneRW/blob/main/README_images/03_Modify.gif

  • When clicking on the image in order to update one of the ulx, uly, lrx or lry coordinates, the cursor remains in the coordinate field. By activating the "Click & validate" check box, the cursor automatically moves to the next coordinate or creates a new zone if necessary.
    https://github.com/pierpaolosichera/ZoneRW/blob/main/README_images/04_Modify2.gif

https://github.com/pierpaolosichera/ZoneRW/blob/main/README_images/05_Hotspot.gif

https://github.com/pierpaolosichera/ZoneRW/blob/main/README_images/06_Rendition.gif

  • When the cursor is in the points column, each click generates a new vertex for the irregular polygon defined by the points in the points field.
    https://github.com/pierpaolosichera/ZoneRW/blob/main/README_images/07_Line.gif

  • Area currently being edited is colored yellow

  • Areas defined as coordinates of a rectangle are colored red.

  • Areas defined as coordinates of a polygon are colored purple.

  • A horizontal thermometer allows you to change the zoom level of the image.

  • It is possible to export zones in XML-TEI text.
    https://github.com/pierpaolosichera/ZoneRW/blob/main/README_images/08_ExportTEI.gif

  • It is possible to export zones in images.

Usage tips

  • The use of the "Click & validate" check box is very useful when entering zones. For fine correction operations it is more useful to keep the check box deactivated so that you can click several times on the same coordinate until you find the correct position.
  • Clicking on the image scroll bar is a click, so if the cursor is on ulx, uly, lrx, lry or points the click will be intercepted as a new coordinate. Then to scroll, go to one of the other elements of the zone list or use the mouse/trackpad scroll function.