API documentation

Exported functions

Modelling page layout

MiseEnPage.MSPageType

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

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

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

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

textpairs(mspage)
source
MiseEnPage.page_bbox_roiFunction

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_roiFunction

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_yFunction

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_zonesFunction

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_rgbaFunction

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

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_luxorFunction

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_luxorFunction

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

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

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

pairtexts(scholialist, commentarydata, dsedata, iliadreff)
source
MiseEnPage.iliadboundboxFunction

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

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

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

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

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

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