NDP.image File Format

The NDPi format is the native format of the Hamamatsu NanoZoomer digital slide scanner and is based on the TIFF 6.0 international standard. Readers not already familiar with TIFF 6.0 should refer to the TIFF 6.0 specification in conjunction with this document. TIFF was chosen because it is a widely recognized standard format that is flexible enough to support virtual microscopy applications.

Source: ITU(International Telecommunication Union)

Image Structure and Viewing Performance

TIFF supports a variety of compression formats. Image data within an NDPi image can be compressed using JPEG. When JPEG is used, it is stored according to Technical Note 2 of the TIFF 6.0 specification as complete JFIF streams. An NDPi image contains several sub-images stored in a multi-page TIFF format (Figure 1).

 

To maximize the speed of decoding a region of interest, NDPi images typically contain multiple copies of the same image at lower resolutions, in addition to the source resolution image.
These images have lens magnification (tag: 65421 described below) calculated from the resolution and the source lens magnification at the time the original image was scanned.
This layered structure is referred to as a pyramid, where images of decreasing size are stacked to form a pyramid shape. There are no restrictions on the number of pyramid levels or the ratio between them. An NDPi reader simply selects the lowest resolution image that meets or exceeds the required resolution for the requested region.

Figure 1︓Structure of an NDPi Image

Advanced Image Data Support

NDPi images support multi-plane storage, meaning images can be captured at different focus (Z) positions (tag: 65424).

Each focal plane image also includes pyramid levels as described above.

Additional related images, such as overview images of the entire slide including labels, can optionally be stored within the file (described at tag: 65421).

TIFF supports both little endian (Intel) and big endian (Motorola) byte orders, but NDPi images are always stored using little endian.

Indexing for Fast Data Access

JPEG is a variable-length stream format, which means decoding even a small region can require parsing the entire stream. To reduce this overhead, NDPi images

include indexes that allow readers to skip directly to positions near the required data. Each MCU (minimum coding unit) in JPEG normally depends on the

previous MCU. NDPi avoids this requirement by using JPEG restart markers. These markers appear at fixed intervals and reset the encoder state, eliminating

dependencies between segments and aligning the bitstream to byte boundaries. Large NDPi images typically include an index that points to the position of each

restart marker. The interval between restart markers can be determined from the JFIF header. Smaller images may omit indexes and restart markers when they

provide little benefit.

Standard Metadata (TIFF Tags)

The size, resolution, and other properties of each sub-image are defined using standard TIFF tags, including:

Standard Tags
Item Tag Type Description
Image Width 256 SHORT / LONG The number of columns in the image
Image Height 257 SHORT / LONG The number of rows in the image
Make 271 ASCII Manufacturer of the scanner (e.g. "Hamamatsu")
Model 272 ASCII Scanner model number (e.g. "C13220-01MD")
X Resolution 282 RATIONAL Pixels per resolution unit (width direction)
Y Resolution 283 RATIONAL Pixels per resolution unit (height direction)
Resolution Unit 296 SHORT Measurement unit (centimeter)
Software 305 ASCII Software name and version
Date Time 306 ASCII Image creation date and time

Extended Metadata (Private Tags)

Information not supported by standard TIFF tags is managed using private tags that provide detailed, NDPi-specific information.

Basic Information
Item Tag Type Description
Version 65420 LONG NDPI version (currently 1)
Reference 65427 ASCII Slide reference
Image / Magnification
Item Tag Type Description
Lens/Image Type 65421 FLOAT Lens equivalent magnification (relative value)

※Notes

  • -1: Overview image
  • -2: Tissue map

Position & Focus
Item Tag Type Description
Physical X 65422 SLONG Center position (nm)
Physical Y 65423 SLONG Center position (nm)
Physical Z 65424 SLONG Focus position (nm)
Focus Points 65439 SLONG (array) Focus points (X, Y, Z)
Focus Point Regions 65440 SLONG Mapping of focus points and regions
Image Acquisition
Item Tag Type Description
Capture Mode 65441 SLONG Imaging mode
Exposure Ratio 65435 SLONG Exposure multiplier
Gain Multipliers 65436–65438 SLONG Channel gain
Exposure Time 65454 LONG Exposure time
Wavelength 65451 FLOAT Emission wavelength
Device / Scan Information
Item Tag Type Description
Hardware Serial Number 65442 ASCII Scanner serial number
Firmware Version 65448 ASCII Firmware version
Calibration Info 65449 ASCII Calibration data
Scan Time 65456 LONG Scan duration
Focus Time 65455 LONG Focus duration
Write Time 65457 LONG File writing time
Refocus Interval 65445 SLONG Refocus interval
Focus Offset 65446 SLONG Focus offset
Fully Automatic Focus 65458 LONG Fully automatic focus flag
Compression / Data Structure
Item Tag Type Description
JPEG Quality 65444 SLONG Compression quality
Restart Marker Index 65426 LONG (array) Restart marker offsets
Restart Marker Index High 65432 LONG (array) High-order offsets (for >4GB files)
Additional Information
Item Tag Type Description
Label Obscured 65450 LONG Label masking flag
Lamp Age 65453 LONG Lamp usage time
Identification / Regulation
Item Tag Type Description
Barcodes 65468–65475 ASCII Up to 8 barcode regions
Medical Regulation 65476 ASCII Regulation (RUO / IVR / USA)

Deviations from the TIFF Specification

TIFF is a highly versatile format that supports private tags, enabling NDPi images to include additional necessary information while remaining compliant with standard TIFF specifications. However, because NanoZoomer produces extremely large images, extensions beyond the original TIFF/JFIF standards were introduced.

JPEG Images Larger Than 64k Pixels

The JFIF header in a JPEG stream allocates only 16 bits for each image dimension, limiting sizes to 65,536 pixels. NanoZoomer images often exceed this limit.

When JPEG images are stored within a TIFF file (see TIFF Tech Note 2), dimensions are recorded in two places: the TIFF IFD entries and the JFIF header.

Normally, these values match; however, if an image exceeds the JFIF 16-bit limit, its header values are set to zero. The TIFF IFD entries use 32-bit values and

will always contain the correct width and height.

NDPi Files Greater than 4 GB

TIFF uses file offsets to locate data within the file. Since these offsets are stored as 32-bit unsigned integers, the format is limited to a maximum file size of 4

GB. While many NanoZoomer images fall within this limit, some, particularly those utilizing multi-level scanning, can exceed it. In such cases, the format is

extended as follows:

  • Directly after the TIFF File Header, an additional DWORD is included to represent the high-order portion of the file offset pointing to the first IFD (Image File Directory).
  • Immediately after each IFD, there is a DWORD that specifies the high-order part of the file offset to the next IFD.
  • Following this additional DWORD, a series of DWORDs, equal in number to the entries in the IFD, are provided. These represent the high-order parts of the offsets for corresponding IFD entries. For entries that contain actual data (rather than offsets), these values will be zero and should be ignored.

 

The benefit of this approach is that files under 4 GB remain compliant with the standard TIFF format. These extensions are only used when necessary (i.e. when

a file exceeds the 4 GB limit). The creator does not need to predict whether an image will exceed this threshold; it can simply write zeros in the extra fields,

knowing they will be ignored by standard readers. A reader should only check for these additional features if the file size is greater than 4 GB. For smaller files,

their presence should not be assumed, and an NDPi file under 4 GB without these extensions is still valid.

 

 

Short Strings

Standard TIFF stores strings consisting of three characters or less directly within the IFD. NDPi files always store strings outside of the IFD even if they are short

enough to fit inside it.

* Specifications is subject to change without notice.

Contact us for more information.

Contact us