## NDPITools Plugin Bundle for ImageJ (v. 1.7.1)

The NDPITools plugins allow to drive, from ImageJ, the NDPITools programs (especially `ndpisplit`) to preview NDPI files and extract all or part of the images they contain. There is also a function to open TIFF files (possibly more general than ImageJ's one: TIFF files with JPEG compression are supported).

The NDPITools plugins, which reuse part of Jarek Sacha's Image I/O plugins, make use of the Java Advanced Imaging (JAI) codecs released by SUN. The plugin bundle is completely self contained. All used codec classes are included in the bundle and there is no need to install JAI itself to use the bundle.

### 1. Plugins and locations

NDPITools plugins are inserted into ImageJ's menus in the following locations:

#### 1.1. Plugins / NDPITools

- Preview NDPI...: shows the standard ImageJ open dialog, uses the `ndpisplit` program to extract a preview image from the selected NDPI file and displays this image. The preview image is the image in the NDPI file which has the best magnification while not being wider nor higher than the computer screen. If there are several images at the same magnification but different z offsets (focus levels), they are all open as an ImageJ stack.

- Extract to TIFF...: assuming that the image in the active window of ImageJ exists and that it is a preview image of some NDPI file, uses the `ndpisplit` program to extract the portions of the NDPI file that correspond to the selected regions on the preview image (or, if there is no selected region, extracts the whole NDPI file, and if there is no active image or if it is not a preview image of some NDPI file, asks the user to select one then extracts the whole NDPI file). The extracted images are stored in TIFF files with JPEG compression (like in the original NDPI file). All available images (all magnifications and z offsets) are extracted. If only a selection of the image is extracted, the names of the file in which the selection is stored contain a suffix with the date and time at which the extraction begins, and the region number if several regions were selected.

- Custom extract to TIFF / Mosaic...: the same as Extract to TIFF, but displays before extraction a dialog box to choose the parameters of the extraction (type of files, suffix used in the file names...). If the active window of ImageJ contains a preview image of some NDPI file, one can choose which ones of the available magnifications and z offsets should be extracted (all by default). Especially, it is possible to require that, in addition to the mere extraction, a mosaic is made: the largest (or all) extracted images are divided into parts so that no part requires more than a given amount of memory to open and all parts, when glued together, build up the full image. The parts may have a chosen overlap with each other.

  With versions 1.6 and above of the NDPITools plugins, by default, the parameters are saved into ImageJ's preference file and will be restored the next time the dialog box is opened.

- Convert directory to TIFF / Mosaic...: displays a dialog box to choose a directory, then the same dialog box as for Custom extract to TIFF / Mosaic... (without the list of available magnifications and z offsets since it is unknown at this stage), then applies extraction to all NDPI files in the directory.

- Open TIFF...: opens the standard ImageJ open dialog and tries to open the selected file (assumed to be a TIFF file). This may work with TIFF tiles that the standard File / Open command of ImageJ is unable to open.

#### 1.2. Help / About Plugins

- NDPITools...: Information about the NDPITools plugin bundle similar to this page.

### 2. System Requirements

The NPDITools plugins bundle requires ImageJ 1.31s and Java 1.4 or later. It may work with 1.3. It was tested with ImageJ 1.33m, 1.46r, 1.47 and Java 1.6, on Mac OS X, Linux and Windows.

On Linux, there is a bug in at least some versions of OpenJDK 6 which prevents the opening of some TIFF files. Some workarounds:

- install ImageJ for Linux with the bundled JDK from the ImageJ download page ;
- use another JDK (e.g., under Debian/Ubuntu, install the `sun-java6-jre` non-free package and launch ImageJ with `JAVA_HOME=/usr/lib/jvm/java-6-sun imagej`) ;
- produce mosaics of JPEG files and work with them when the TIFF files can't be opened by ImageJ.

### 3. Installation

1. Download the latest binary release of the NDPITools ImageJ plugins from their home page: look for the file `NDPITools_.jar`.

2. Put the file `NDPITools_.jar` into ImageJ's plugins directory. You can find the location of ImageJ's plugins directory by selecting `Plugins / Utilities / ImageJ Properties` in ImageJ's menus. Look for the value of tag `Menus.getPlusInsPath` near the middle of the displayed `Properties` window.

3. Download the latest binary release of the `ndpisplit` program for your platform (e.g. `ndpisplit.exe` if you work under Windows). Put it in the same place as `NDPITools_.jar` above, or in any directory that belongs to the `PATH`.

4. Restart ImageJ to load the newly installed plugins.

### 4. Quoting

If you use the NDPITools ImageJ plugins for research, please quote the following reference: Deroulers et al., Analyzing huge pathology images with open source software, Diagnostic Pathology 8:92 (2013).

### 5. Links

- NDPITools' homepage (`http://www.imnc.in2p3.fr/pagesperso/deroulers/software/ndpitools/`)
- Image I/O plugins for ImageJ (`http://ij-plugins.sourceforge.net/plugins/imageio`) kindly published by Jarek Sacha; part of these plugins have been reused in the NDPITools plugins.
- List of additional input/output plugins for ImageJ (`http://rsb.info.nih.gov/ij/plugins`)
- Java Advanced Imaging (`http://download.java.net/media/jai/builds/release/1_1_3/`)