概要

IIIFのLinking to External ServicesにPhysical Dimensionsがあります。

https://iiif.io/api/annex/services/#physical-dimensions

以下のように説明されています。

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.

(機械翻訳)デジタル化された物体の場合、その物体の物理的な寸法を知ることはしばしば有用である。利用可能な場合、クライアントが定規やその他の物理的な縮尺をユーザーに提示することができます。

Mirador ver.2とver.3では、それぞれ以下のプラグインが存在します。

ver.2

https://github.com/dbmdz/mirador-plugins#physical-document-ruler

ver.3

https://github.com/ubleipzig/mirador-ruler-plugin

残念ながらver.3のプラグインをうまく導入することができませんでした。そこで、Mirador2を対象に、Physical Document Rulerを使用する方法を説明します。

結果、例えば東京大学史料編纂所所蔵の大型絵図である正保琉球国絵図写(請求記号:S島津 76-2-4、法量:354.1×731.0cm)を対象にした場合、以下のように定規を表示させることができます。

ソースコードの準備

以下のリポジトリからソースコードを取得できます。

https://github.com/nakamura196/mirador2

Mirador2のプラグインを格納する以下のフォルダmirador/pluginsに対して、以下で公開されているPhysicalRulerのソースコードをコピーしています。

https://github.com/dbmdz/mirador-plugins/tree/main/PhysicalRuler

そして、index.htmlで以下のように参照しています。

<b/o<<<<bddsssoyicccsd>vrrrcyiiir>ipppidtttp=t"sst>vrryiccpe==ew""=emm"riit"rre>aax<ddt/oo/drrji//avmpv>ilarusagcdironirsp./tmP"ih>ny.sjisc"a>l<R/uslcerri/ppth>y<s/isccarliRputl>er.js"></script>

データ

マニフェストファイルの各Canvasに対して、serviceを追記します。physicalScaleは実寸(cm)をピクセル数で割った値を用いています。

{"}canvas]e,s{}":""""}""""@@hs,iltw[itee""""mahidyir@pppabud"pgvchhrgemt:ehioyyoelbh"tcnssfs"n"":"etiii":a:h:"eccl:it":xaae"l4ts2tll"["9pc4{"SU:1:8s:2:cn.]9:C2ai","4/a1"lth,/n,hest.wvt""t,wat::pwsp:.":0"/h,/.c/i0mi.i1"iui4,i-i6ftf,.o.ikioyo/o/a.apapici/./ajanpnn/necexox/l/slseeercrvtviiicocenes/s/d/piphghyiystsdadilimgm"a/l1l/ecroyn/treyxutk.yjus/odna"t,a/iiif/0001/canvas/p1",

結果

以下で結果を確認できます。画面左上部の定規のアイコンをクリックすることで、ビューア上に定規が表示されます。

https://nakamura196.github.io/mirador2/?manifest=https://nakamura196.github.io/mirador2/data/examples/hi.json

まとめ

本プラグインは以下のように記載されています。

Due to technical limitations in the scanning process, the dimensions shown here are approximate. They are not suitable for purposes that demand scientific accuracy

(機械翻訳)スキャニングの技術的限界のため、ここに示された寸法はおおよそのものです。科学的な正確さを求める目的には適していません。

そのため、おおよその寸法である点に注意が必要ですが、実寸とともに画像を閲覧する際の参考になりましたら幸いです。