JAI ImageIO plugins for ImageJ - API

net.sf.ij.jaiio
Class DescriptionStringCoder

java.lang.Object
  extended bynet.sf.ij.jaiio.DescriptionStringCoder

public class DescriptionStringCoder
extends java.lang.Object

Decodes and encodes description strings used by ImageJ to store extra image info in TIFF description field.

Version:
$Revision: 1.4 $
Author:
Jarek Sacha

Method Summary
static void decode(java.lang.String description, ij.ImagePlus imp)
          Decode the ImageDescription tag.
static java.lang.String encode(ij.ImagePlus imp)
          Creates an optional image description string for saving calibration data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

encode

public static java.lang.String encode(ij.ImagePlus imp)
Creates an optional image description string for saving calibration data. For stacks, also saves the stack size so ImageJ can open the stack without decoding an IFD for each slice.

Parameters:
imp - Image for which the decription string should be created.
Returns:
Description string.

decode

public static void decode(java.lang.String description,
                          ij.ImagePlus imp)
                   throws java.lang.Exception
Decode the ImageDescription tag. ImageJ saves spatial and density calibration data in this string. For stacks, it also saves the number of images to avoid having to decode an IFD for each image.

Parameters:
description - Description string.
imp - Image that will be adjusted using information stored in the decription string.
Throws:
java.lang.Exception - If information stored in the decription string is inconsistent with image size.

SourceForge.net Logo