# Presentation: 363820

## The djatoka JPEG 2000 image server

- Ryan Chute, Herbert Van de Sompel
- Digital Library Research & Prototyping Team
- Research Library
- Los Alamos National Laboratory
-  rchute@lanl.gov
-  herbertv@lanl.gov

## Presentation Based on the Paper

- 	Ryan Chute, Herbert Van de Sompel. Introducing djatoka: A Reuse Friendly, Open Source JPEG 2000 Image Server. D-Lib Magazine, Volume 14 Number 9/10. Available at <_[http:](http://dx.doi.org/10.1045/september2008-chute)__[//dx](http://dx.doi.org/10.1045/september2008-chute)__[.](http://dx.doi.org/10.1045/september2008-chute)__[doi](http://dx.doi.org/10.1045/september2008-chute)__[.org/](http://dx.doi.org/10.1045/september2008-chute)__[10.1045/september2008-chute](http://dx.doi.org/10.1045/september2008-chute)_>

## What is aDORe djatoka?

- Open-source JPEG 2000 image server and dissemination framework
- Java-based solution built around the Kakudu JPEG 2000 library
- Leverages existing standards and technologies
- Standards: ISO JPEG 2000 / NISO OpenURL
- APIs & Libraries
- NIH - ImageJ
- Sun Microsystems - Java Advanced Imaging
- Kakadu Software - JPEG 2000 SDK
- OCLC - OpenURL OOM
- Provides of an implementation agnostic (e.g. Kakadu, Aware, etc) framework for JPEG 2000 compression and extraction.
- Geared towards reuse through URI-addressability of all image disseminations including regions, rotations, and format transformations
- Provides an extensible service framework for image disseminations enabled by OCLC's Java OpenURL package

## Why aDORe djatoka? 

- Concrete need to introduce a solution to disseminate high-resolution images stored in our aDORe repository.
- Interest in repository interoperability, cf. involvement in OAI-PMH, NISO OpenURL, OAI-ORE
- Interest in digital preservation, cf. National Digital Information Infrastructure and Preservation Program (NDIIP)
- Lack of open source image server implementations.
- Lack of an easily extensible image dissemination service framework.
- Lack of standard syntax for the URI-addressability of image disseminations including regions, rotations, and format transformations.
- Desire to encourage the adoption of JPEG 2000 as a service and/or archival image file format.
- Desire to develop a community defined open source image dissemination server platform.

## Why JPEG 2000? 

- JPEG 2000's open specification and its rich feature set defined in a multi-part ISO standard provide a suitable image file format for archival and dissemination service uses.
- JPEG 2000 image format has attracted considerable attention in the geospatial, cultural heritage & archival, and medical imaging communities.
- Features of immediate interest in the JPEG 2000 format are:
- Multiple Resolutions & Quality Layers in a single file.
- Region Extraction: Random codestream access allows fast extraction of sub-regions and quality layers.
- Compression: Support for lossless and lossy compression.
- Self-containedness: Support for embedding XML metadata in file.
- Progressive Transmission: Stream information so that image quality improves progressively as the downloading proceeds.
- Our previous experience working with JPEG 2000 as a service format.

## Extraction: JPEG 2000 Features

**Resolution Extraction**

**Region Extraction w/ Rotation**

**Region Extraction**

## aDORe djatoka Framework

## Compression: Resolution Levels

- djatoka dynamically determines the number of DWT levels
- # of times an image can be halved from max(w,h) to 92 pixels or less.
- 92 pixels derived from Kodak PhotoCD Base resolution size.

## Compression: Quality

- Utilizes rate-distortion slope threshold values to achieve a specific level of "Image Quality”, regardless of subject matter. Also supports absolute rates.
- Number of quality layers and rate-distortion slope threshold values are configurable.

**23:1**

**8:1**

**5:1**

**9:1**

- William-Adolphe Bouguereau

- Baseball Guide (LoC)

- Ansel Adams - Manzanar War Relocation (LoC)

- Sargis Ptisak, Gospel of Mark

## Compression: Random Access Efficiencies 

- Uses precinct, instead of tiles, to handle random access efficiencies.
- Tiles are built into the codestream, while precinct data can be changed without recompressing the image. Both are supported for extraction.
- Packet Length-Tile (PLT) Markers are added to improve extraction times.
- A RPCL (Resolution-Position-Component-Layer) order is applied.

**Precinct Structure**

**Tile Structure**

## Extraction: djatoka Features 

- Application and API provides the current capabilities:
- Resolution & Region Extraction
- Rotation
- Support for a rich set of input/output formats
- e.g., BMP, GIF, JPG, PNG, PNM, TIF, JPEG 2000
- Extensible interfaces to perform image transformations
- e.g., watermarking

## Why OpenURL?

- Existing solutions provide URI-addressability of specified regions, but...
- Offer limited extensibility for identifier resolution / dissemination services
- Use home grown HTTP URI syntaxes
- Use Cases and Functionality not governed by the community.
- Recognized standardized syntax to request Regions or other services pertaining to JPEG 2000 images would be helpful.
- Since URIs clearly serve the purpose of (dynamically) requesting services pertaining to an identified resource (the entire JPEG 2000 image), the OpenURL Framework provides a standardized foundation that can be leveraged in this realm.
- OpenURL provides an easily extensible dissemination service framework.
- Availability and familiarity with OCLC's Java OpenURL package, an open source OpenURL Service Framework.
- Also, to present an alternate Use Case for the OpenURL Framework.

## aDORe djatoka OpenURL Service Framework

## OpenURL Services & Formats

- ContextObject carries information only about a Referent and a ServiceType
*info:lanl-repo/svc/getRegion*: the service to request a Region.
*info:lanl-repo/svc/getMetadata*: the service to request image metadata.
- JPEG 2000 Region Extraction Service Format
- Currently registered for Trial Use in the OpenURL Registry
- Matrix Definition:
- _[http://www.openurl.info/registry/docs/mtx/info:ofi/fmt:kev:mtx:jpeg2000](http://www.openurl.info/registry/docs/mtx/info:ofi/fmt:kev:mtx:jpeg2000)_

| Parameter | Description |
| --- | --- |
| format | String. Mime type of the image format to be provided as response. Default: image/jpeg |
| rotate | Integer. Rotates image by 90/180/270 degrees clockwise. Default: 0 |
| level | Integer. Where 0 is the lowest resolution with each increment doubling the image in size. Default: Max level of requested image, based on the number of Discrete Wavelet Transform (DWT) decomposition levels. |
| region | Format: Y,X,H,W. Y is the down inset value (positive) from 0 on the y axis at the max image resolution. X is the right inset value (positive) from 0 on the x axis at the max image resolution. H is the height of the image provided as response. W is the width of the image provided as response. All values may either be absolute pixel values (e.g. 100,100,256,256), float values (e.g. 0.1,0.1,0.1,0.1), or a combination (e.g. 0.1,0.1,256,256). |

## Service Request Walkthrough

- Ajax-based client reference implementation
- Tile-based viewer, similar to Google Maps
- HTML / CSS / Javascript
- Obtains metadata (e.g., width, height, DWT levels) from image server
- Logic to generate and request URLs for 256x256 pixel tiles at each level
- Asynchronous djatoka region requests

## Service Request Walkthrough

## Service Request Walkthrough

## Key Features

- Key Feature of aDORe djatoka Image Server:
- Compression of JPEG 2000 files using properties to improve extraction performance and provide good compression / quality balance.
- Dynamic extraction of multiple resolutions and regions.
- Serialization Plug-in Framework (e.g., BMP, GIF, JPG, JP2, PNG, TIF)
- Transformation Plug-in Framework (e.g., watermarking)
- A rich service framework to facilitate the transfer of service parameters via an OpenURL compliant HTTP GET request.
- Configurable File-based Caching for improved performance.
- Framework distributed as Open Source under LGPL License
- Kakadu libraries and executables are free for Non-Commercial Use.
- Binaries provided for Win32, Mac OS-X x86, Linux x86_32/64, Sparc32
- Technical Requirements
- Sun Java 2 Standard Edition 1.5+
- Tomcat 5.5+
- Ideal: +1GB RAM, Multiple CPUs/cores - Significant Parallel Processing Benefits

## aDORe djatoka: Live Demo

- <http://african.lanl.gov/adore-djatoka/viewer.html?rft_id=http://memory.loc.gov/master/gc/spalding/00172/00001.tif>

## aDORe djatoka: The Show

- <_[http:](http://african.lanl.gov/aDORe/projects/djatoka/djatoka_release.mov)__[//african](http://african.lanl.gov/aDORe/projects/djatoka/djatoka_release.mov)__[.](http://african.lanl.gov/aDORe/projects/djatoka/djatoka_release.mov)__[lanl](http://african.lanl.gov/aDORe/projects/djatoka/djatoka_release.mov)__[.](http://african.lanl.gov/aDORe/projects/djatoka/djatoka_release.mov)__[gov/aDORe/projects/djatoka/djatoka_release](http://african.lanl.gov/aDORe/projects/djatoka/djatoka_release.mov)__[.](http://african.lanl.gov/aDORe/projects/djatoka/djatoka_release.mov)__[mov](http://african.lanl.gov/aDORe/projects/djatoka/djatoka_release.mov)_>

## aDORe djatoka: The Download

- Available at:
-      <_[http://african.lanl.gov/aDORe/projects/djatoka](http://african.lanl.gov/aDORe/projects/djatoka)_>
- SourceForge effort at:
- 	<_[http:](http://sourceforge.net/projects/djatoka)__[//sourceforge](http://sourceforge.net/projects/djatoka)__[.net/projects/djatoka](http://sourceforge.net/projects/djatoka)_>
- Demonstrations at:
- 	<_[http://african.lanl.gov/adore-djatoka](http://african.lanl.gov/adore-djatoka)_>
- 	<_[http://www.](http://www.antifonarium-tsgrooten.be/highlights.htm)__[antifonarium-tsgrooten](http://www.antifonarium-tsgrooten.be/highlights.htm)__[.be/highlights.](http://www.antifonarium-tsgrooten.be/highlights.htm)__[htm](http://www.antifonarium-tsgrooten.be/highlights.htm)_>

## How can djatoka help you?

- Significant interest from major scientific and cultural heritage institutions.
- Please come to the BoF Session this afternoon to discuss...
- Your Use Cases
- Your Institutional Requirements & Mandates
- Your issues related to disseminating high resolution digital images.
- How we can collaborate to develop community defined, open-source...
- User Interface Applications (e.g. djatoka viewer)
- %Insert Community Needs Here%
- Please feel free to contact us and thank you for your support.