Trying the IIIF Content State API

Overview I had the opportunity to try the IIIF Content State API, so this is a memo of the process. https://iiif.io/api/content-state/1.0/ The IIIF Content State API is described in Current Awareness-R as follows: “The IIIF Content State API” can generate links that specify in detail how an object should be displayed, including rotation angle and display position on the page image. https://current.ndl.go.jp/car/45832 Trying It Out The “Shueitai / Letterpress Printing Digital Library” provides the IIIF Content State API. ...

September 21, 2023 · 3 min · Nakamura

Trying Cantaloupe Access Control

Overview This is a memo about trying Cantaloupe’s Access Control. https://cantaloupe-project.github.io/manual/5.0/access-control.html Bearer Authentication I referenced the following. https://cantaloupe-project.github.io/manual/5.0/access-control.html#Tiered Access All or Nothing Access This returns an error when the authentication information is incorrect. I configured it so that images are returned when the token is test, as shown below. d e f e n a h i e r } d u e f n e t a t i e d t h d h o f n u o e e k r d r ' ' r r a e t e n s c i d n o t t h z = e k u { a a e r = e r t l ( c & n n u l o o . h s e p n s e = t _ n t t t a = r c g i e . a d u o e o x s v r e " e d ' n t e a t r t e s [ l l _ [ e ' = ' e u w 7 s > = r c e i . t = e t s t . " > ' { q { . h h B } u f ? e 4 e ) e | i ( a 0 a s n r ' d 1 r t a s B e , e _ m t e r r h e a . e , r l c a e e h d v r n a e a g r r l t s s u h e ' e t ] | - = " n 1 U a ] T m F e - . 8 d " o ' w n c a s e = = ' a u t h o r i z a t i o n ' } I created a Google Colab notebook to verify the above behavior. ...

September 21, 2023 · 6 min · Nakamura

Adding Values to info.json in Cantaloupe

Overview Referring to the following, I tried adding values to the info.json returned by Cantaloupe. https://cantaloupe-project.github.io/manual/5.0/endpoints.html Method Referring to the page above, I modified extra_iiif3_information_response_keys as follows. d e f e n e { } d x t ' ' ] ' ' ' r r s , e i x a i e { } x p m _ g r i t p i h v ' ' ' ' f c ' i t i @ @ p l ' ' i s c i t r a f ' e d y o b = = = 3 ' ' p f e > > > _ = : e i l i > = ' l ' c c c n > ' : e : o o o f ' h ' n n n o h [ t ' : ' t t t r t t A L e e e m t p u ' o x x x a p s t h g t t t t : : h t . . . i / / C t I d d d o / / o p n i i i n e e o : ' g g g _ x x k ( ( ( r a a i / ' ' ' e m m e i m m m s p p S i e e e p l l e i t t t o e e r f a a a n . . v . d d d s o o i i a a a e r r c o t t t _ g g e / a a a k / / 1 a ' ' ' e l a ' p , , , y i u , i s c t / ' ' ' ( e h a e i x o n / u x p m p s l t i t p t e o h f c _ i . g / ' ' s o h i 1 ) ) t n t n / , , r s m ' l i l , o n = ' g g , i ' { n ) } ' ) , As a result, I was able to obtain the following info.json. ...

September 20, 2023 · 5 min · Nakamura

Trying Cantaloupe Overlays

Overview Let’s try the overlay feature provided by Cantaloupe. https://cantaloupe-project.github.io/manual/5.0/overlays.html BasicStrategy With BasicStrategy, overlays are applied based on the settings in cantaloupe.properties. As shown below, you can overlay an image on another image. I used the following image from Irasutoya. https://www.irasutoya.com/2020/12/blog-post_279.html Since I set position to bottom right in the configuration file described below, the specified image appeared in the bottom right as shown below. I modified overlays.BasicStrategy.enabled and overlays.BasicStrategy.image in cantaloupe.properties. ...

September 20, 2023 · 10 min · Nakamura

Enabling the Cantaloupe Admin Panel

Overview Here is how to enable the admin panel for Cantaloupe. I was able to view server information as shown below. Configuration Edit the following section in cantaloupe.properties. # e e e n n n E d d d n p p p a o o o b i i i l n n n e t t t s . . . a a a t d d d h m m m e i i i n n n C . . . o e u s n n s e t a e c r b r r o l n e l e a t d m P e = a = n = < e t パ l r a ス , u d ワ e m ー a i ド t # n > / f a a d l m s i e n . As a result, if you access a URL like the following and the Basic authentication screen appears, the setup is complete. ...

September 20, 2023 · 1 min · Nakamura

Enabling HTTPS for Cantaloupe on EC2

Introduction In the following article, I described how to set up Cantaloupe on EC2. This time, I will configure a custom domain and enable HTTPS. Custom Domain Configuration This time, I will assign the domain cantaloupe.aws.ldas.jp to 54.172.71.20. When using Route 53, it can be configured as follows. Obtaining an SSL Certificate s a c u p e d t r o t b s i o u n t s t c a e l r l t o c n e l r y t b o - t s t a n d a l o n e - d c a n t a l o u p e . a w s . l d a s . j p r S E P h a ( W s p d E ( A R S C K T T C I o a n ( l t g Y o h a e F Y c e u e e h h e f o v t E e t r ) u a r v F ) c q c r y i e r t i e n a p e e l r t e e o u c t s s t y D D @ n r t s s e s d e n l n s u e e i i e b o o o i g e e : / e o e / n s s f s c o u n n p e r / i ( y y r p w ( t t s i e f t a a - d m r / n N o o s s N i f c s r i l t t 1 e a ' e l ) u u o , ) r n u a a t l h i i i 7 b i c a e o o r f C o e g l t v i e a k n n 2 u l ' d t r : b e c : g l e e f s s e g g - g s d e e t r a i a y d i 3 a t t e e Y m h t m Y s i c w s C t t 1 l d o h n r w a e b p t c r s a a i e e o o - o d e c i i o a e e e t t l t r 6 g r c r t l l L t i r r c s : e l t I E 2 e a T y o l e ? g e t e a u b S F - t s n e p i a t n d i i v e b p o R F 6 o s c r t r n d ' W s . f v e x e t G : 1 e m . e g d s e , i e d p a , : ( l s o g , r ' c d i u / v u ) r i e E d a a a r p s p h a s : o g s o s n n t c t e d c l L o r e f / t n s c l d e e : s a h e e m / d x d e c r i r t e a t e l x S o r e w y k w f t / / o e d s ' / o f x e c i p e a o i e e n d u e s u g @ r u w y t t y r f t t l b r g v m i o h t s i c c 2 w e c E u l m i e t u p o c c / / 0 h d o n n e u a c n h r t r t a a l l 2 e n c t t r i e t h o s o n t e e 3 n t s r u s g l s t f e j e t e t t - a i y # e e . a / h i e n s a . s s 1 t s d p n n c t L e r E c d u l e e 2 h k e t c c t o E s l t p o n n - e r : e r m - A t e y p u c c 1 t r y r S C c a o o p r r 9 c o s t p e A M c t n u r e y y . e u b t n - E e r d t . p p r a p h h o / e v r o e a t t t u p t t t l w 1 s t n t m d w / / i t o t t e a . e i i h a i s l l f o r p p c t l 3 r f c e i g . i i i m t s s e s - v i l i l v v c a i : : r e a S e c F n t d e e a t n / t n n e r a r o a a a / / t i g / o c d p . t o n b l s c c e c l e n r t e n - o . a a a o e f l y s e D t p u f j n n r l u t f y p e m o i i r t r p t t e l r s . t c b s e o e a a n y e o . u e y r f o e l l e w n r - l r r o s i u d o o w r o c g s o i - u u F t r o u u s e r r / t g t 2 c o m p p . n k y d a y 1 a c u o w . e e e p o n - g e n r o . . w b t n d n 2 r s d g r a a y . a a o 0 e s a a k w w t : o t l t 2 e f t n s s h r e o i 2 ? u i i e . . i g - n c . l o z n l l s / l e e p l n a c d d d e s d y , t r a a c o - ) f i y s s e n d . i a o p . . r a s n t j j t t c Y s f i p p i e a o u o t n / / f n u e u h g f p i t d n a u r c a m , d t t l i a l u i h l v t o s t n e c k e u t o g h e p w a y i e e i . n . b n p a , . e t w p m h s e e . m l b d a a c s k . g j r p o u n d . Web Server Configuration: Installing Nginx a v p i t / i e n t s c t / a n l g l i n n x g / i s n i x t e s - a v a i l a b l e / c a n t a l o u p e . a w s . l d a s . j p Configuration: ...

September 20, 2023 · 12 min · Nakamura

Created Notebooks Using NDLOCR and NDL Classical Japanese OCR ver.2

Notice 2026-02-24 ! The notebooks provided on this page will no longer be updated. For NDLOCR, “NDLOCR-Lite” has been released as a desktop application and command-line tool for easy use. Please use this going forward. https://github.com/ndl-lab/ndlocr-lite 2025-04-02 There is currently a bug. Please refrain from using it until the fix is complete. The bug has been fixed. 2025-03-21 For NDL Classical Japanese OCR, “NDL Classical Japanese OCR-Lite” has been released as a desktop application for easy use. Please use this going forward. ...

September 20, 2023 · 3 min · Nakamura

Launching Cantaloupe, a IIIF Image Server, on EC2

Overview This is a reference guide on how to launch Cantaloupe, a IIIF image server, on EC2. https://cantaloupe-project.github.io/ Additionally, this article introduces an example of Delegate Methods for restricting image download sizes. Specifically, it addresses cases where an error occurs when attempting to retrieve a full-size image via /full/full/. https://cantaloupe-project.github.io/manual/5.0/access-control.html Setting Up Cantaloupe Creating an EC2 Instance I created an EC2 instance with the platform set to Ubuntu, instance type set to t2.medium, and storage set to 8 GB. ...

September 19, 2023 · 19 min · Nakamura

Trying Mirador 2's Physical Document Ruler

Overview IIIF’s Linking to External Services includes Physical Dimensions. https://iiif.io/api/annex/services/#physical-dimensions It is described as follows. For digitized objects, it is often useful to know the physical dimensions of the object. When available, they allow a client to present a ruler, or other rendition of physical scale, to the user. For Mirador ver.2 and ver.3, the following plugins exist respectively. ver.2 https://github.com/dbmdz/mirador-plugins#physical-document-ruler ver.3 https://github.com/ubleipzig/mirador-ruler-plugin Unfortunately, I was unable to successfully introduce the ver.3 plugin. Therefore, I will explain how to use the Physical Document Ruler with Mirador 2. ...

August 29, 2023 · 5 min · Nakamura

Mirador 3 Plugin Development: Adding Vertical Text Support to the Text Overlay Plugin

Overview Text Overlay plugin for Mirador 3 is a Mirador 3 plugin that displays selectable text overlays based on OCR or transcription. https://github.com/dbmdz/mirador-textoverlay A demo page is available at the following link. https://mirador-textoverlay.netlify.app/ However, when trying to display vertical text such as Japanese, it didn’t display correctly, as shown below. So I forked the above repository and made it possible to display vertical text as well. The source code is published in the following repository. (I hope to consider a pull request in the future.) ...

August 22, 2023 · 9 min · Nakamura

Trying the mirador-annotations Plugin and SimpleAnnotationServer with Mirador 3

Overview mirador-annotations is a Mirador 3 plugin that adds annotation creation tools. https://github.com/ProjectMirador/mirador-annotations This time, I tried combining it with the following SimpleAnnotationServer, and this is a memorandum of the process. https://github.com/glenrobson/SimpleAnnotationServer Preparing SimpleAnnotationServer Follow the Getting Started guide below. https://github.com/glenrobson/SimpleAnnotationServer#getting-started When you access http://localhost:8888/index.html, the following screen is displayed. The endpoint appears to be http://localhost:8888/annotation/, which displays a list of registered annotations (initially empty). This endpoint will be used from Mirador 3. ...

August 18, 2023 · 15 min · Nakamura

[Omeka S Module Introduction] IiifPresentation: Adding IIIF Presentation API

Overview I tried the IiifPresentation module that adds IIIF Presentation API support, so here are my notes. https://omeka.org/s/modules/IiifPresentation/ As far as I could tell from a brief trial, there did not seem to be a significant difference from the features provided by the IIIF Server module below. https://omeka.org/s/modules/IiifServer/ One difference is that this module was developed by the Omeka Team, and it has the advantage of being usable without detailed configuration. ...

July 20, 2023 · 2 min · Nakamura

Updated Mirador to 2.7 in the Omeka Classic IIIF Toolkit

Overview I updated Mirador to 2.7 in the Omeka Classic IIIF Toolkit. You can check the source code on the following page. https://github.com/nakamura196/IiifItems You can also download the zip file from the following URL. https://github.com/nakamura196/IiifItems/releases/download/1.1.1/IiifItems-1.1.1.zip What This Enables By using Mirador 2.7, it becomes possible to display images in the viewer even if they do not support the IIIF Image API. This makes it possible to add and manage annotations using Mirador for publicly available images as well. ...

July 20, 2023 · 1 min · Nakamura

Batch Registering Data to Omeka Classic IIIF Toolkit

Overview This article explains how to batch register data to Omeka Classic IIIF Toolkit. For setting up Omeka Classic IIIF Toolkit, please refer to the following: This also builds on the content of the following article, making it easier to use by accepting Excel data as input. Preparing the Excel File Prepare an Excel file like the following: https://github.com/nakamura196/000_tools/blob/main/data/sample.xlsx Create three sheets: “collection,” “item,” and “annotation.” collection manifest_uri https://d1fasenpql7fi9.cloudfront.net/v1/manifest/3437686.json ...

July 20, 2023 · 3 min · Nakamura

Mirador 3 Plugin Development: Copying a Window

Overview I created a plugin for Mirador 3 that copies a window. Note that this functionality is already provided by the following plugin. https://github.com/ProjectMirador/mirador-plugin-demos Therefore, this plugin was created to learn the plugin development process. I hope this plugin serves as a useful reference from that perspective. Here is a screenshot. The source code is available here. https://github.com/nakamura196/mirador-copy-window-plugin The demo site is available here. https://nakamura196.github.io/mirador-copy-window-plugin/ Development Notes For developing this plugin, I first cloned the following repository and made modifications to it. ...

July 19, 2023 · 7 min · Nakamura

Guide to the IIIF Mirador 2 Annotation Interface

Overview This article explains (part of) how to use the annotation interface in IIIF Mirador 2. Creating Rectangle Annotations https://www.youtube.com/watch?v=jny09nLZvLU Creating Path (Polygon) Annotations To finish an annotation, double-click. https://www.youtube.com/watch?v=4cM-6-rXL9M Editing Existing Annotations https://www.youtube.com/watch?v=HlE36inbgq4 Deleting Existing Annotations https://www.youtube.com/watch?v=STk2vjLc_-k Summary I hope this is helpful when creating annotations using IIIF Mirador 2.

June 21, 2023 · 1 min · Nakamura

Creating PDF Files from IIIF Manifest Files

Overview I had the opportunity to create PDF files from IIIF manifest files. As a solution, I found the following repository, but was unable to get it working. https://github.com/jbaiter/pdiiif While the above repository uses JavaScript, this time I created a conversion tool using Python. Usage You can try it from the following notebook. https://colab.research.google.com/github/nakamura196/ndl_ocr/blob/main/iiif2pdf.ipynb During the initial installation, img2pdf is installed, but due to PIL version dependencies, a “RESTART RUNTIME” button will appear. Please click it and then re-run the same cell. ...

May 26, 2023 · 1 min · Nakamura

About the Image Server Configuration for Omeka S

Overview The Image Server for Omeka S is a module that enables image delivery compatible with the IIIF Image API. https://omeka.org/s/modules/ImageServer/ When used in combination with the IIIF Server module, it also enables delivery via IIIF manifests. The Image Server module allows various settings, including methods for creating tile images. This article shares the investigation results regarding these settings. Experimental Environment This time, I will use an Amazon Lightsail LAMP instance. I use a relatively low-spec environment with 2 GB RAM and 1 vCPU. ...

May 25, 2023 · 6 min · Nakamura

Drupal: Linking Content of Different Content Types to Each Other

Overview I investigated how to link content of different content types to each other, and here are my notes. Specifically, as shown below, item 1 is connected to a content item called image 1 through a field called iiif_image2. The goal is to add a link to item 1 on the image 1 page. I referenced the following article for this implementation. https://drupal.stackexchange.com/questions/255447/view-for-entity-reference-reverse-backwards-forwards Method Adding a View Navigate to /admin/structure/views and click “+ Add view” ...

April 20, 2023 · 2 min · Nakamura

Drupal: Creating Custom REST Resources

Overview I created a custom REST resource by following the instructions below. https://www.drupal.org/docs/drupal-apis/restful-web-services-api/custom-rest-resources By following the above article, I was able to obtain a JSON result from the following URL. /demo_rest_api/demo_resource { } " m e s s a g e " : " H e l l o , t h i s i s a r e s t s e r v i c e " REST UI Module The above article included the following note: ...

April 20, 2023 · 7 min · Nakamura