Published December 20, 2023 | Version v0.5-beta
Software Open

pierpaolosichera/ZoneRW: v0.5-beta (7th IEEE CiSt'23)

Description

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.

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.

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.

  • 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.

  • 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.

  • 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.

  • 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.

Files

pierpaolosichera/ZoneRW-v0.5-beta.zip

Files (470.1 MB)

Name Size Download all
md5:a84d001240a842f762e7208099fabfcd
470.1 MB Preview Download

Additional details

Related works