From OpenWetWare
Revision as of 12:30, 9 March 2007 by Madhadron (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The jar file preprocessor-[date].jar below is the latest release of the preprocessor we're using for our image analysis. It has two stages. The first registers the image stack. The second cuts the background and does anisotropic diffusion on what remains. By default the second stage is disabled.


The usage instructions output by the program are:

java -jar mycopreprocesser-[date].jar [-sxdywchtren] filelist registeredDir
 -c N   : Percentage of contrast to use in edge enhancing diffusion (1-100, defa
          ult 20)
 -d VAL : File to write drift path from registration to
 -e VAL : Prefix for smoothed image files
 -h     : Print help and exit
 -k VAL : Do anisotropic diffusion and write images to given directory
 -n N   : Number of iterations for edge enhancing diffusion
 -r VAL : Prefix for registered image files
 -s N   : Number of sigma above histogram mode to cut as background
 -w N   : Sigma of filter for edge enhancing diffusion (measured in pixels)
 -x N   : x-pixel size for edge enhancing diffusion (measured in pixels)
 -y N   : y-pixel size for edge enhancing diffusion (measured in pixels)

You must have three other jars in your Java extensions directory which the preprocessor depends on: ImageJ's ij.jar, args4j (a commandline option processor) and FunctionalJ (for its tuple libraries).

filelist is a file containing a list of filenames (with full directories), one per line. The easiest way to generate this is (on Unix or Mac) to issue the command

$ ls /path/to/images/*.tif > filelist

The registeredDir is the path which the registered images should be written to. Give the -d option with a filename to have the preprocessor write the offsets of each image to that file. The offsets are all relative to the first image in the stack. To change the prefix put in front of registered images from "registered-" to something else, give the -r option with the new prefix.

To turn on the edge enhancing diffusion stage, give the -k option with the directory to write the smoothed images to. -e lets you set the default prefix for smoothed images (by default "smoothed-"). The -c, -n, -s, -w, -x, and -y options all set the details of the anisotropic diffusion.