API documentation

Exported functions

Modelling page layout

MiseEnPage.MSPage — Type

Model for analyzing layout of a page of a manuscript. Note that pagebounds is an image URN with region of interest showing position of the physical page within a documentary photograph. iliad_bbox is a bounding box for Iliad passages on the page, expressed in the same image-percent coordinates as image URNs.

source
MiseEnPage.msPage — Function

Collect all information needed to analyze the layout of a page. Optionally include a CEX data string; if not included, the current release data of the Homer Multitext project is retrieved from github and used.

msPage(pageurn; data)
source
MiseEnPage.iliadrange — Function

Compose a CTS URN for the range of Iliad lines on page mspage. Returns nothing if there are no Iliad lines on the page.

iliadrange(mspage)
source
MiseEnPage.textpairs — Function

Pairings of scholia with Iliad line they comment on appearing on page mspage.

textpairs(mspage)
source
MiseEnPage.page_bbox_roi — Function

Find a bounding box for the physical page mspage on a documentary image. Returns a named tuple of floats.

page_bbox_roi(mspage; digits)
source
MiseEnPage.iliad_bbox_roi — Function

Find a bounding box on a documentary image for the Iliad lines on page mspage. Returns a named tuple of floats.

iliad_bbox_roi(mspage; digits)
source

Analyzing page layout

MiseEnPage.score_by_proximity_y — Function

Score number of scholia correctly placed on page using proximity model. Optionally specify siglum of scholia to model. If siglum is nothing, include all scholia.

score_by_proximity_y(mspage; threshhold, siglum)
source
MiseEnPage.score_by_zones — Function

Score number of scholia correctly placed on page using model of placement by zone. Optionally specify siglum of scholia to model. If siglum is nothing, include all scholia.

score_by_zones(mspage; threshold, siglum)
source

Documentary images

MiseEnPage.load_rgba — Function

Instantiate an Image from a URN. Returns a matrix of RGBA values.

load_rgba(imgurn; w, alpha)
source

Load documentary image for page mspage.

load_rgba(mspage; alpha, w)
source
MiseEnPage.dimensions — Function

Find dimensions of image img, and format as a named tuple with :h and :w values.

dimensions(img)
source

Composing visualizations with Luxor

MiseEnPage.pagebox_luxor — Function

Create a Luxor box command to draw a box on image img around the physical page illustrated there.

pagebox_luxor(pg, img; luxoraction)
source
MiseEnPage.iliadbox_luxor — Function

Create a Luxor box command to draw a box on image img around the block of Iliad text on page pg.

iliadbox_luxor(pg, img; luxoraction)
source

Functions used internally

Working with page layout data

MiseEnPage.ScholionIliadPair — Type

A scholion paired with the Iliad line it comments on. Each text passage has a corresponding image with region of interest. lineindex is the relative position of the Iliad text on its page.

source
MiseEnPage.pairtexts — Function

Pair data for each scholion in scholialist with corresponding Iliad data as a ScholionIliadPair.

pairtexts(scholialist, commentarydata, dsedata, iliadreff)
source
MiseEnPage.iliadboundbox — Function

Get a containing rectangle for the Iliad lines on a page. iliadlines should be a Vector with Iliad lines on a single page; dse is a DSE collection covering those lines.

iliadboundbox(textpairs; digits)
source

Working with images and Luxor diagrams

CitableImage.imagefloats — Function

Extract region-of-interest string from an image URN, and convert to a vector of floats rounded to digits significant places. It is an error if the syntax of the URN's subreference is invalid.

imagefloats(imgu; digits)
MiseEnPage.boxscaled — Function

Scale percentage coordinate values in the named tuple boxtuple to pixels on the image rgba_img. Returns a named tuple of floats.

boxscaled(boxtuple, rgba_img)
source

Scale percentage coordinate values in the named tuple boxtuple to pixels on the image rgb_img. Returns a named tuple of floats.

boxscaled(boxtuple, rgb_img)
source

Scale percentage coordinate values in the named tuple boxtuple to pixels on an image with height imgheight and width imgwidth. Returns a named tuple of floats.

boxscaled(boxtuple, imgwidth, imgheight; digits)
source
MiseEnPage.pageboxscaled — Function

Find a bounding box for the physical page scaled to pixels on the image downloaded for the page RoI urn. Returns a named tuple of floats.

pageboxscaled(mspage; digits)
source

Find a bounding box for the physical page mspage scaled to pixels on the image rgba_img. Returns a named tuple of floats.

pageboxscaled(mspage, rgba_img; digits)
source
MiseEnPage.iliadboxscaled — Function

Find a bounding box for the Iliad text on page mspage scaled to pixels on the image rgba_img. Returns a named tuple of floats.

iliadboxscaled(mspage, rgba_img; digits)
source
MiseEnPage.pointscaled — Function

Scale point pt expressed in percentage values to a new Luxor Point scaled to fit image rgba_img

pointscaled(pt, rgba_img; digits)
source

Scale point pt expressed in percentage values to a new Luxor Point scaled to fit the given image dimensions.

pointscaled(pt, imgwidth, imgheight; digits)
source