/collection//document//gs-cantaloupe/iiif/2/::http-greenstone:////
var chosen_title = "untitled";
if (gs.variables.chosenTitle && !gs.variables.docNodeID) {
// simple doc
chosen_title = gs.variables.chosenTitle;
}
else {
var docNodeID = gs.variables.docNodeID;
var page_pos = docNodeID.indexOf('.');
chosen_title = (page_pos>=0) ? "page " + docNodeID.substring(page_pos+1) : docNodeID;
}
var iiif_doc_image = {
"id": document.location.origin + gs.variables.iiifImageRootIdentifier,
//"format": mime_type, // ???? or is it OK to always have this as image/jpeg and rely on IIIF Image Server coverting as/when needed???
//"chosen_title": gs.variables.chosenTitle,
"chosen_title": chosen_title,
"x_dim": gs.variables.imageWidth,
"y_dim": gs.variables.imageHeight,
};
IIIF_Doc_Images.push(iiif_doc_image);
load_gv_dococr_json(gs.variables.GVDocumentOCRJSON,gs.variables.docSectionID,display_gv_ocr_bounding_boxes);