test the ReadTIFFpackage

Simon Chandler

4/4/95

version 1.2

This notebook shows examples of how to import the ReadTIFFpackage, then use it to read-in a TIFF format grayscale image.

For extensive documentation about the ReadTIFFpackage` package see comments in the introductory sections of the "ReadTIFFpackage" file.

Needs["graphics`ReadTIFFpackage`"]

Using the ReadTIFFg function

Basic use and timing

SetDirectory["/users/simonc/experiments/imageProc/l#.tif/"];

To read-in the bitmap data of an image simply use

image =  ReadTIFFg["l5.tif"];

For this 180 Kbyte image the reading-in took only 7 seconds.  To render the image use

ListDensityPlot[
   image,
   Mesh -> False
];

This is the slow part - taking 180 seconds. A slightly faster way to plot the image is to use

Show[Graphics[Raster[image/Max[image]]]];

which took 109 seconds for this image.

Options

There are two options.  With both toggled from the default state you get a dump of the file structure information.  This is useful if you know something about the TIFF format (for an introduction see documentation at start of the "ReadTIFFpackage").

SetDirectory["/users/simonc/experiments/imageProc/TIFF_format/grayscale"];

image = 
			ReadTIFFg[
			   "isobel_chandler.TIF",
			   report -> True,
			   ignoreNonBaseline->False
			];

Show[Graphics[Raster[image/Max[image]]],AspectRatio->247/176];

Note : reading this 108 Kbyte image took 17 seconds.

Usage Information

Starting with the most simple usage information,

? ReadTIFFg

? ReadTIFFpackage

? report

? ignoreNonBaseline

? tiff*

Each of these has comprehensive usage information, many of them substantial. For example,

? tiffCompression