Difference between revisions of "Software"

From Wiki
Jump to navigation Jump to search
Line 1: Line 1:
 +
<div style="float:left;">__TOC__</div>
  
 
= Software Programs and Narratives =
 
= Software Programs and Narratives =
Line 341: Line 342:
 
     file is name of source image file (.i2i is optional)
 
     file is name of source image file (.i2i is optional)
  
== EPR ==
+
== 3D Deconvolution (EPR) ==
  
 
Exhaustive Photon Reassignment (EPR) is a method for Image Restoration, developed by the Biomedical Imaging Group at the University of Massachesetts Medical School.   
 
Exhaustive Photon Reassignment (EPR) is a method for Image Restoration, developed by the Biomedical Imaging Group at the University of Massachesetts Medical School.   

Revision as of 19:08, 26 September 2016

Software Programs and Narratives

Click here for an itemized list of some software programs with help.

Narratives about some of the BIG software with descriptions, images, and references can be gotten to by clicking here..

Susan both thumb.jpg

More Software Components

Image-File-Type-Conversion

These programs convert mulitple image file formats into our I2I format.


alltiftoi2i

Repeatedly calls cstoi2i to convert 2D and 3D TIFF files to I2I format.

Syntax: alltiftoi2i [options] files...

Options: -h Prints this message.

        -z n      Number of planes (default is 1)
        -u        Data is 16-bit unsigned (see cstoi2i, note 2)
        -2        Divide 16-bit data by two (same as -u)
        -4        Divide 16-bit data by four
        -8        Divide 16-bit data by eight
        -v        Verbose mode.
        -D        Debug mode.

allzeisstoi2i

Repeatedly calls zeisstoi2i to convert 2D and 3D TIFF files to I2I format.

Syntax: allzeisstoi2i [options] files...

Options: -h Prints this message.

        -z n      Number of planes (default is 1)
        -u        Data is 16-bit unsigned (see zeisstoi2i, note 2)
        -2        Divide 16-bit data by two (same as -u)
        -4        Divide 16-bit data by four
        -8        Divide 16-bit data by eight
        -v        Verbose mode.
        -D        Debug mode.

Biorad3D

Syntax: % Biorad3d <rootname> nx ny nz channels timepoints

 outputfile is 4-D image file named <root><channel>.i2i

Biorad3Db

Syntax: % Biorad3d <rootname> nx ny nz channels timepoints

 outputfile is 4-D image file named <root><channel>.i2i

cstoi2i

Converts CELLscan or Metamorph(note 1) TIFF format images file to I2I format. Can be used for other TIFF formats with -z and -u options.

Syntax: % cstoi2i [options] [TIFF_file] [ < TIFF_file] [ > I2I_file]

 TIFF_file   TIFF format filename with extension
 I2I_file    UMASS I2I format filename (must include .i2i)
 [ ... ] implies optional parameter.
 Input is from either filename or stdin(<).
 Output is only to stdout(>).

Options:

 -h        Prints this message.
 -z n      Number of planes (default is 1)
 -u        Data is 16-bit unsigned (note 2)
 -2        Divide 16-bit data by two (same as -u)
 -4        Divide 16-bit data by four
 -8        Divide 16-bit data by eight
 -v        Verbose mode.
 -D        Debug mode.
 -T        Print ASCII text IFDs.

Notes:

 1) Hacked (12/3/97) to determine the number of z-planes
 2) Data is converted to 16-bit signed by dividing by two
 3) Hacked to include comments 7/23/98
 4) Hacked to better parse Metamorph comments 3/11/2002

Disclaimer:

 This is not a completely robust TIFF implimentation 
 and can fail if the IFDs are not ordered as expected.
 If the user fails to enter a comment, you will get a 
 blank history line.                                                              

imformat

Formats a binary input image as .i2i file input pixels are 16-bit signed integers

Usage: imformat n x y z e <image >image

 n  is decimal number of bytes in header
 x  is decimal size of the X dimension
 y  is decimal size of the Y dimension
 z  is decimal size of the Z dimension
 e  is the data endian type {L or B}

Fixed on 5/9/2013 to handle truncated input files correctly

                 by filling out the missing pixels with zeros

imformatb

Formats a binary input image as .i2i file input pixels are 8-bit unsigned integers

Usage: imformat n x y z <image >image

 n  is decimal number of bytes in header
 x  is decimal size of the X dimension
 y  is decimal size of the Y dimension
 z  is decimal size of the Z dimension

imformatR

Formats a binary input image as .i2i file input pixels are 16-bit signed integers

Usage: imformat n x y z e <image >image

 n  is decimal number of bytes in header
 x  is decimal size of the X dimension
 y  is decimal size of the Y dimension
 z  is decimal size of the Z dimension
 e  is the data endian type {L or B}

imformatrgb

Formats a binary input image as .i2i file input pixels are 8-bit unsigned integers

Usage: imformat n x y z <image >image

 n  is decimal number of bytes in header
 x  is decimal size of the X dimension
 y  is decimal size of the Y dimension
 z  is decimal size of the Z dimension

putalltiftoi2i

Repeatedly calls cstoi2i to convert 2D and 3D TIFF files to I2I format.

Syntax: putalltiftoi2i dest [options] files...

Options: -h Prints this message.

        -z n      Number of planes (default is 1)
        -u        Data is 16-bit unsigned (see cstoi2i, note 2)
        -2        Divide 16-bit data by two (same as -u)
        -4        Divide 16-bit data by four
        -8        Divide 16-bit data by eight
        -v        Verbose mode.
        -D        Debug mode.

rgbtifftoi2i

Syntax: rgbtifftoi2i newfilename[.i2i] red|green|blue file.TIF [file.TIF ...]

where: newfilename[.i2i] is the file name for the created i2i stack image red|green|blue is the color channel to use from the TIF files file[.TIF] is|are the sequence, in desired stack order, of the TIFF files


tifftoi2i

Syntax: tifftoi2i file1[.tif] [file2[.tif] ...]

Create I2I format image(s) from 16-bit 2-D TIFF. Image name(s) are the retained with .i2i extension.


xmgrtoi2i

Syntax: %xmgrtoi2i infile outfile
  infile    xmgrace-style (& separated) data-set file name.
  outfile   new image file name.
Options:
  -size nx ny  Size of image to create (required)
The xmgrace file is ACSII text.
Data sets have one intensity value per line(record).
Data sets are separated by "&".
The image file has one set per row (x) starting at x=0.
Each "&" starts a new row (y)

zeisstoi2i

Converts CELLscan or Metamorph(note 1) TIFF format images file to I2I format. Can be used for other TIFF formats with -z and -u options.

Syntax: % cstoi2i [options] [TIFF_file] [ < TIFF_file] [ > I2I_file]

 TIFF_file   TIFF format filename with extension
 I2I_file    UMASS I2I format filename (must include .i2i)
 [ ... ] implies optional parameter.
 Input is from either filename or stdin(<).
 Output is only to stdout(>).

Options:

 -h        Prints this message.
 -z n      Number of planes (default is 1)
 -u        Data is 16-bit unsigned (note 2)
 -2        Divide 16-bit data by two (same as -u)
 -4        Divide 16-bit data by four
 -8        Divide 16-bit data by eight
 -X        Divide 16-bit data by 256 (byte shift)
 -v        Verbose mode.
 -D        Debug mode.
 -T        Print ASCII text IFDs.

Notes:

 1) Hacked (12/3/97) to determine the number of z-planes
 2) Data is converted to 16-bit signed by dividing by two
 3) Hacked to include comments 7/23/98

Disclaimer:

 This is not a completely robust TIFF implimentation 
 and can fail if the IFDs are not ordered as expected.
 If the user fails to enter a comment, you will get a 
 blank history line. 								 

Image-Corrections

These programs perform various spatial and intensity-based manipulations.


autoscalexy

Autoscales each Z plane individually to 1 - 255 

Usage: autoscalexy [options] image1 outimage options:

note: To view image use play. autoscalexy test - | play -


badpixel

Usage: % badpixel [options] inputfile outputfile
  inputfile   image file name
  outputfile  corrected image file name
Options:
         Replace pixel (x,y) with
  -a x y      average of the 8 neighbors
  -m x y      median of the 8 neighbors
  -p x y      root of the sum of the squares of the 8 neighbors
  -r x y      square of the sum of the roots of the 8 neighbors
         Replace each pixel of column (x,y1->y2) with
  -A x y1 y2  average of the 6 neighbors
  -M x y1 y2  median of the 6 neighbors
  -P x y1 y2  root of the sum of the squares of the 6 neighbors
  -R x y1 y2  square of the sum of the roots of the 6 neighbors

bgcor3d

bgsub3d   Subtract Correct 3D (Z or time) bg from data
  Input file    3D data image file
  Output file   The actual 3D data (above bg)
Options:
  -Z n          Z plane for BG
  -E            BG subtract each Z plane separately
  -C x y        Center of ROI
  -R n          Radius of ROI
  -S n          Number of sigmas(std.dev.) above mean bg (default=0)
  -N sf         Normalize by mean bg: image=sf*(image-bg)/bg (exclusive of -S)
  -V value      Subtract value from image (exclusive of other options)
  -M n {file|-} Subtract the mode (histogram peak) of each Z plane (exclusive of other options).
                  n is stdev for histogram Gaussian smoothing (default=0, no smoothing)
                  file is filename for mode value(s), or - for stderr

bleachima

Usage:
 % bleachima [options] input_file output_file
Exponential bleaching correction for 2-D times series
Options:
 -sets n   Specifies the number of 3-D image sets
 -A A0 A1  Single exponential: A0*exp(-z/A1)
 -B B0 B1  Optional 2nd exponential: A0*exp(-z/A1)+B0*exp(-z/B1)
 -C A0 A1 B1   (where B0 = 1 - A0)
 -Z z1 z2  Fit z-planes z1-z2 with A0*exp(-z/A1)
           Can be used repeatedly to specifiy disjoint sets of planes
           (overrides -A and -B)
 -R x1 x2 y1 y2
           Restrict -Z to region (x1,y1) to (x2,y2)
 -D n      Image background value(baseline, def=0)
 -V        Verbose operations(def=not verbose)

flip

Flips image about X and/or Y, or Z axes
Usage: % flip [options] input_image output_image
where
  input_image   Image file to flip
  output_image  Flipped image file
options:
   -sets n      Specifies the number of 3-D image sets.
   -X           Flip along X axis
   -Y           Flip along Y axis
   -Z           Flip along Z axis
   -T           Transpose X and Y axes
Use flip -Y to display images right-side-up.
Flipping modes are mutually exclusive.

imsets

Sets the number of images sets in an image file.

Usage: % imsets imagefile.i2i #


scratchng

Usage: % tranima [options] inputfile outputfile
  Input file   ScratchNG image file name
  Output file  black-level and gain corrected image file name.
Options:
   -gains B4 B3 B2 B1 A4 A3 A2 A1
      where the ports are labeled:
             +-------------------+
          2  | A4 | A3 | A2 | A1 |
             |----+----+----+----|
          1  | B4 | B3 | B2 | B1 |
             +-------------------+
                1    2    3    4  
   -nogains    Sets all port gains to 1
Notes:
   in-place corrections (12/05/2005)
   default gains as of 8/10/2010:
          1.000  0.947  0.942  0.966  1.018  1.055  1.035  1.024
   replaces bad columns x=[160,481] with average of adjacent columns (3/24/2011)

updown3d

Syntax: updown3d file[.i2i] zsize [plateau]

    file is name of source image file (.i2i is optional)

3D Deconvolution (EPR)

Exhaustive Photon Reassignment (EPR) is a method for Image Restoration, developed by the Biomedical Imaging Group at the University of Massachesetts Medical School. All versions of the program are based on the algorithm originally developed by Walter Carrington(1-3) with Kevin Fogarty (1-3) and Fay Fay (2,3). Basically, it is an iterative, least-squares reconstruction method with tikhonov regularization and a non-negativity constraint (no negative fluorescence). The micropscope (the forward problem) is modeled as a shift-invariant linear system (convolution).

The inputs are a series of optical section images of fluorescence acquired with a suitably equipped microscope (i.e. the data), a 3-D point spread function image, either theoretical or empirical (the PSF), and a "smoothness" parameter ("alpha"). The algorithm finds the object (true 3-D fluroescence distribution) that minimizes a weighted sum of the least-squares fit to the data and the "smoothness" (total energy) of the object. As the algorithm as constructed is minimizing a strictly convex function, it is garranteed to converge to a single global minimum (a unitque object).

The data optical sections do not have to be sampled on a regular grid, in x or y (laterally) or in z (axially). The object can be reconstructed on a finer grid than the data (sparsedata, binsample, superresolution-epr). When ER is combined with Structured Light epi-fluorescence microscopy (SLeEPR) it can achieve resolutions of 50nm in x,y and 150 nm in z.

(1) Carrington WA, Fogarty KE. 3D molecular distribution in living cells by deconvolution of optical sectioning using light microscopy.

   In: Foster KR, editor. Proceedings of the Thirteenth Annual Northeast Bioengineering Conference. Vol. 1.
   New York: IEEE; 1987. pp. 108–110

(2) Three-dimensional molecular distribution in single cells analysed using the digital imaging microscope.

   Fay FS, Carrington W, Fogarty KE.
   J Microsc. 1989 Feb;153(Pt 2):133-49

(3) Superresolution three-dimensional images of fluorescence in cells with minimal light exposure.

   Carrington WA, Lynch RM, Moore ED, Isenberg G, Fogarty KE, Fay FS.
   Science. 1995 Jun 9;268(5216):1483-7

binsample

BINSAMPLE bins pixels n x,y and z while maintaining the original sampling
  Input file    Image file name.
  Output file   Image file name.
Options:
   -bin x y z   Specifies the spatial binning factor (default is 1)
Notes:
   The output image size is n-1 smaller where n is the binning factor for each axis
   Pixels are averaged when binned

epr_i2i

epr                              UMMC/BIG                          Jul 12 2012
NAME
   epr - Exhaustive Photon Replacement (EPR) restores contrast by removing 
   residual out-of-focus light and improves resolution while maintaining 
   numerical accuracy of 3-D images of specimens obtained with serial 
   optical sectioning from wide-field or confocal light microscopy.
SYNOPSIS
   epr [options] before-image[.tif] after-image[.tif]
DESCRIPTION
   epr performs regularized, iterative image restoration with a non-
   negativity constraint.  The before-image is a three dimensional (3-D) 
   TIFF image composed of rectangular, regularly spaced, optical sections.
   Large images are decomposed into smaller, overlapping (in x and y only) 
   image segments for restoration, and the restored segments are recomposed.
   The after-image is the restored 3-D image. All options must appear 
   before the image file names, but the order of options is not important.
   epr has the following options:
   -h                Prints basic help on syntax and available options.
                             Required Parameters
   -psf file[.tif]   The 3-D point spread function image file. The psf must 
                     match the optical configuration used for the before-
                     image.  The psf depth (number of z-planes) need only be 
                     less-than or equal-to twice that of the before-image.
                     Extra z-planes are symmetrically discarded.
   -smoothness alpha The alpha value where alpha is typically 0 < alpha < RNL.
   -sm alpha         RNL is the residuals noise limit as reported by prepdata
                     (see also). Smaller values of a correspond to less 
                     smoothing.  (RNL)^2 is usually a good starting choice for
                     alpha.
   -iterations n     Maximum number of iterations to perform.  Iterating may 
   -it n             terminate earlier if convergence is detected. (see 
                     -convergence)
                             Control Parameters
   -scaling n        where n is after image scaling factor. Used to prevent
   -sc n             integer overflow when saving after image to file.
                     Default=1.0
   -convergence n    Criteria for terminating iteration, where n is << 1.
   -co n             0.00001 represents true convergence. 0.001 usually
                     achieves 90-95% convergence in about half the number
                     of iterations.  Values of n larger than 0.001 are not
                     generally recommended. Default=0.001
   -axial n1 n2      The z-axis object extrapolation beyond the sectioned
   -ax n1 n2         image data where n1 is before first plane and n2 is
                     after last plane. n is in planes.  By default, 
                     extrapolation extends +-1/2 the z-axis extent of the point
                     spread function image and should be sufficient. Smaller
                     values of n1 or n2 have the effect of spatially
                     constraining the restored object and should be applied
                     carefully.
   -time n1          The timepoint where you want the restoration to occur (0 indexed)
   -t n1 
   -threads n        The number of threads FFTW should use. Default=1
   -th n 
   -transverse n     The x-axis and y-axis object extrapolation in pixels.
   -tr n             The epr process extrapolates the restoration beyond the
                     bounds of each image segment in order to account for
                     exterior out-of-focus contributions. Default = 1/4 of X or Y 
                     dimsenion PSF width, which ever is larger.
EXAMPLES
   To see the command line syntax
     % epr
   or
     % epr -h
   Given specimen image mycell_.i2i and point spread function image mypsf_.i2i
     let smoothness equal 0.0005, maximum number of iteration equal 250
     and convergence equal 0.001. Perform single-resoltion(default) EPR:
     % epr -psf mypsf_ -smoothness 0.0005 -iterations 250 mycell_ mycell_r
FAQ (Frequently Asked Questions)
     see  http://...
FILES
       xcomp:/home/epr/epr
       xcomp:/home/epr/cs_epr.lo
SEE ALSO
       prepdata
       preppsf

Usage:

%epr [options] before-image after-image

For help on syntax and available optionos:

%epr -h

epr_gpu

epr                              UMMC/BIG                          Aug  8 2012
NAME
   epr - Exhaustive Photon Replacement (EPR) restores contrast by removing 
   residual out-of-focus light and improves resolution while maintaining 
   numerical accuracy of 3-D images of specimens obtained with serial 
   optical sectioning from wide-field or confocal light microscopy.
SYNOPSIS
   epr [options] before-image[.tif] after-image[.tif]
DESCRIPTION
   epr performs regularized, iterative image restoration with a non-
   negativity constraint.  The before-image is a three dimensional (3-D) 
   TIFF image composed of rectangular, regularly spaced, optical sections.
   Large images are decomposed into smaller, overlapping (in x and y only) 
   image segments for restoration, and the restored segments are recomposed.
   The after-image is the restored 3-D image. All options must appear 
   before the image file names, but the order of options is not important.
   epr has the following options:
   -h                Prints basic help on syntax and available options.
                             Required Parameters
   -psf file[.tif]   The 3-D point spread function image file. The psf must 
                     match the optical configuration used for the before-
                     image.  The psf depth (number of z-planes) need only be 
                     less-than or equal-to twice that of the before-image.
                     Extra z-planes are symmetrically discarded.
   -smoothness alpha The alpha value where alpha is typically 0 < alpha < RNL.
   -sm alpha         RNL is the residuals noise limit as reported by prepdata
                     (see also). Smaller values of a correspond to less 
                     smoothing.  (RNL)^2 is usually a good starting choice for
                     alpha.
   -iterations n     Maximum number of iterations to perform.  Iterating may 
   -it n             terminate earlier if convergence is detected. (see 
                     -convergence)
                             Control Parameters
   -scaling n        where n is after image scaling factor. Used to prevent
   -sc n             integer overflow when saving after image to file.
                     Default=1.0
   -convergence n    Criteria for terminating iteration, where n is << 1.
   -co n             0.00001 represents true convergence. 0.001 usually
                     achieves 90-95% convergence in about half the number
                     of iterations.  Values of n larger than 0.001 are not
                     generally recommended. Default=0.001
   -axial n1 n2      The z-axis object extrapolation beyond the sectioned
   -ax n1 n2         image data where n1 is before first plane and n2 is
                     after last plane. n is in planes.  By default, 
                     extrapolation extends +-1/2 the z-axis extent of the point
                     spread function image and should be sufficient. Smaller
                     values of n1 or n2 have the effect of spatially
                     constraining the restored object and should be applied
                     carefully.
   -time n1          The timepoint where you want the restoration to occur (0 indexed)
   -t n1 			
   -cuda n1          The cuda device that you would like to use (1 indexed).
   -cu n1            The highest device number would be your display card.

FFTW will be used if a cuda device isn't specified or less than 1.

      		Restoration will fail if there isn't enough free memory on
      		your cuda device.
   -threads n        The number of threads FFTW should use. Default=1
      		Only applicable if using FFTW, and not CUDA.
   -th n 			
   -transverse n     The x-axis and y-axis object extrapolation in pixels.
   -tr n             The epr process extrapolates the restoration beyond the
                     bounds of each image segment in order to account for
                     exterior out-of-focus contributions. Default = 1/4 of X or Y 
                     dimsenion PSF width, which ever is larger.
EXAMPLES
   To see the command line syntax
     % epr
   or
     % epr -h
   Given specimen image mycell_.i2i and point spread function image mypsf_.i2i
     let smoothness equal 0.0005, maximum number of iteration equal 250
     and convergence equal 0.001. Perform single-resoltion(default) EPR:
     % epr -psf mypsf_ -smoothness 0.0005 -iterations 250 mycell_ mycell_r
FAQ (Frequently Asked Questions)
     see  http://...
FILES
       xcomp:/home/epr/epr
       xcomp:/home/epr/cs_epr.lo
SEE ALSO
       prepdata
       preppsf

EPR

EPR is a shell script that checks to see if you are logged into either zirconium (the workstation in the analysis room) or barium (in Roughua's office). If yes, then it runs the CUDA version of epr using either the GTX 680 (zirconium) with 2Gb of memory, or the GTX 480 (barium) with 1.5 GB of memory, with options to show you iteration by iteration results. If you're using any other computer then it runs the Intel-cpu only version of epr. It passes the remainder of your command line on to the chosen epr program.

To see the help for the epr program itself

 % EPR -h

Usual syntax:

 % EPR  -it 999  -sm #  -co 0.003  -psf your_psf_file[.i2i]  input[.i2i]  output[.i2i]

Put 999 for iterations to make sure it doesn't stop too early. The smoothness value is whatever you would usually choose. I recommend using 0.003 for the convergence (rather than 0.001 or smaller) when using the NVIDIA version (zirconium or barium) as the lack of double-precision calculations can make it hard to squeeze the last bit out of the algorithm, and sometimes it will stop converging and you won't get an output image. If this happens anyway, then either try 0.005 for convergence and/or make the smoothness value a little larger, or ask Kevin for help.

If your image is really large then it might not fit into the memory of the NVIDIA systems. An image of 1300 x 1000 with fewer than 20 slices will work on zirconium (with 2GB), but to do more slices than this you will need to segment the image to something like 960 x 960 first (the reason has to do with allowable FFT sizes and the dimensions of the PSF, but this is a guideline).

You CAN to run more than one NVIDIA version of EPR at a time if there is enough available memory on the graphics board. Otherwise you'll get the error:

 CUDA: out of memory error in file 'epr.cu' at line 1020

It's first-come first-serve.


linux_epr_fftw3_sse_z

epr                              UMMC/BIG                          03/30/95
NAME
   epr - Exhaustive Photon Replacement (EPR) restores contrast by removing 
   residual out-of-focus light and improves resolution while maintaining 
   numerical accuracy of 3-D images of specimens obtained with serial 
   optical sectioning from wide-field or confocal light microscopy.
SYNOPSIS
   epr [options] before-image[.tif] after-image[.tif]
DESCRIPTION
   epr performs regularized, iterative image restoration with a non-
   negativity constraint.  The before-image is a three dimensional (3-D) 
   TIFF image composed of rectangular, regularly spaced, optical sections.
   Large images are decomposed into smaller, overlapping (in x and y only) 
   image segments for restoration, and the restored segments are recomposed.
   The after-image is the restored 3-D image. All options must appear 
   before the image file names, but the order of options is not important.
   epr has the following options:
   -h                Prints basic help on syntax and available options.
                             Required Parameters
   -psf file[.tif]   The 3-D point spread function image file. The psf must 
                     match the optical configuration used for the before-
                     image.  The psf depth (number of z-planes) need only be 
                     less-than or equal-to twice that of the before-image.
                     Extra z-planes are symmetrically discarded.
   -smoothness alpha The alpha value where alpha is typically 0 < alpha < RNL.
   -sm alpha         RNL is the residuals noise limit as reported by prepdata
                     (see also). Smaller values of a correspond to less 
                     smoothing.  (RNL)^2 is usually a good starting choice for
                     alpha.
   -iterations n     Maximum number of iterations to perform.  Iterating may 
   -it n             terminate earlier if convergence is detected. (see 
                     -convergence)
                             Control Parameters
   -scaling n        where n is after image scaling factor. Used to prevent
   -sc n             integer overflow when saving after image to file.
                     Default=1.0
   -convergence n    Criteria for terminating iteration, where n is << 1.
   -co n             0.00001 represents true convergence. 0.001 usually
                     achieves 90-95% convergence in about half the number
                     of iterations.  Values of n larger than 0.001 are not
                     generally recommended. Default=0.001
   -axial n1 n2      The z-axis object extrapolation beyond the sectioned
   -ax n1 n2         image data where n1 is before first plane and n2 is
                     after last plane. n is in planes.  By default, 
                     extrapolation extends +-1/2 the z-axis extent of the point
                     spread function image and should be sufficient. Smaller
                     values of n1 or n2 have the effect of spatially
                     constraining the restored object and should be applied
                     carefully.
   -time n1          The timepoint where you want the restoration to occur (0 indexed)
   -t n1 			
   -threads n        The number of threads FFTW should use. Default=1
   -th n 			
   -transverse n     The x-axis and y-axis object extrapolation in pixels.
   -tr n             The epr process extrapolates the restoration beyond the
                     bounds of each image segment in order to account for
                     exterior out-of-focus contributions. Default=16 pixels
   -OP wavelength NA n dx dz ideal 
                     The optical configuration of the data and psf where 
                     wavelength, dx and dz are in microns, n is one of 
                           1.0     air 
                           1.33    water 
                           1.47    glycerin 
                           1.515   oil 
                     and ideal is < 1 for spherically aberrated systems.
   -znear n          The z-axis distance to first resolution reduction stage. 
   -zn n             Default=1.25 microns.
EXAMPLES
   To see the command line syntax
     % epr
   or
     % epr -h
   Given specimen image mycell_.i2i and point spread function image mypsf_.i2i
     let smoothness equal 0.0005, maximum number of iteration equal 250
     and convergence equal 0.001. Perform single-resoltion(default) EPR:
     % epr -psf mypsf_ -smoothness 0.0005 -iterations 250 mycell_ mycell_r
FAQ (Frequently Asked Questions)
     see  http://...
FILES
       xcomp:/home/epr/epr
       xcomp:/home/epr/cs_epr.lo
SEE ALSO
       prepdata
       preppsf

linux_epr_pentium4

epr                              UMMC/BIG                          03/30/95
NAME
   epr - Exhaustive Photon Replacement (EPR) restores contrast by removing 
   residual out-of-focus light and improves resolution while maintaining 
   numerical accuracy of 3-D images of specimens obtained with serial 
   optical sectioning from wide-field or confocal light microscopy.
SYNOPSIS
   epr [options] before-image[.tif] after-image[.tif]
DESCRIPTION
   epr performs regularized, iterative image restoration with a non-
   negativity constraint.  The before-image is a three dimensional (3-D) 
   TIFF image composed of rectangular, regularly spaced, optical sections.
   Large images are decomposed into smaller, overlapping (in x and y only) 
   image segments for restoration, and the restored segments are recomposed.
   The after-image is the restored 3-D image. All options must appear 
   before the image file names, but the order of options is not important.
   epr has the following options:
   -h                Prints basic help on syntax and available options.
                             Required Parameters
   -psf file[.tif]   The 3-D point spread function image file. The psf must 
                     match the optical configuration used for the before-
                     image.  The psf depth (number of z-planes) need only be 
                     less-than or equal-to twice that of the before-image.
                     Extra z-planes are symmetrically discarded.
   -smoothness alpha The alpha value where alpha is typically 0 < alpha < RNL.
   -sm alpha         RNL is the residuals noise limit as reported by prepdata
                     (see also). Smaller values of a correspond to less 
                     smoothing.  (RNL)^2 is usually a good starting choice for
                     alpha.
   -iterations n     Maximum number of iterations to perform.  Iterating may 
   -it n             terminate earlier if convergence is detected. (see 
                     -convergence)
                             Control Parameters
   -scaling n        where n is after image scaling factor. Used to prevent
   -sc n             integer overflow when saving after image to file.
                     Default=1.0
   -convergence n    Criteria for terminating iteration, where n is << 1.
   -co n             0.00001 represents true convergence. 0.001 usually
                     achieves 90-95% convergence in about half the number
                     of iterations.  Values of n larger than 0.001 are not
                     generally recommended. Default=0.001
   -axial n1 n2      The z-axis object extrapolation beyond the sectioned
   -ax n1 n2         image data where n1 is before first plane and n2 is
                     after last plane. n is in planes.  By default, 
                     extrapolation extends +-1/2 the z-axis extent of the point
                     spread function image and should be sufficient. Smaller
                     values of n1 or n2 have the effect of spatially
                     constraining the restored object and should be applied
                     carefully.
   -time n1          The timepoint where you want the restoration to occur (0 indexed)
   -t n1 			
   -threads n        The number of threads FFTW should use. Default=1
   -th n 			
   -transverse n     The x-axis and y-axis object extrapolation in pixels.
   -tr n             The epr process extrapolates the restoration beyond the
                     bounds of each image segment in order to account for
                     exterior out-of-focus contributions. Default=16 pixels
   -OP wavelength NA n dx dz ideal 
                     The optical configuration of the data and psf where 
                     wavelength, dx and dz are in microns, n is one of 
                           1.0     air 
                           1.33    water 
                           1.47    glycerin 
                           1.515   oil 
                     and ideal is < 1 for spherically aberrated systems.
   -znear n          The z-axis distance to first resolution reduction stage. 
   -zn n             Default=1.25 microns.
EXAMPLES
   To see the command line syntax
     % epr
   or
     % epr -h
   Given specimen image mycell_.i2i and point spread function image mypsf_.i2i
     let smoothness equal 0.0005, maximum number of iteration equal 250
     and convergence equal 0.001. Perform single-resoltion(default) EPR:
     % epr -psf mypsf_ -smoothness 0.0005 -iterations 250 mycell_ mycell_r
FAQ (Frequently Asked Questions)
     see  http://...
FILES
       xcomp:/home/epr/epr
       xcomp:/home/epr/cs_epr.lo
SEE ALSO
       prepdata
       preppsf

prepdata

prepdata                          UMMC/BIG                          06/19/02
NAME
   prepdata - prepares a 2-D, 3-D or 4-D image data sets, acquired using a
   Digital Imaging (light) Microscope, for further processing (e.g. image
   restoration/3-D reconstruction)
SYNOPSIS
   prepdata [options] before-image after-image
DESCRIPTION
   prepdata performs all necessary corrections on a image data set based on
   the fluorescence D.I.M image formation/acquisition model, and can be
   used to perform basic imaging corrections to many forms of digitally
   acquired image data. The before-image argument is the name of a 3-D image
   set as acquired (DIM-1, DIM-2, CELLscan, UFM, or other). The after-image
   argument is the file name for the corrected image set, ready for further
   processing. The normal order of application of corrections (see -before)
   is basic[->background[->temporal]]. All calculations are performed using
   single-precision floating-point arithmetic. All options must precede
   input and output image file names.


Usage:

%prepdata [options] before-image after-image

For help on syntax and available options:

%prepdata -h

preppsf

preppsf                           UMMC/BIG                          12/20/02
NAME
   preppsf - prepares a 3-D point spread function (psf) image data set, 
   acquired using a Digital Imaging (light) Microscope, for use with image
   restoration/3-D reconstruction. Normally psf images are first processed
   using prepdata (see below) to apply basic corrections and any background
   corrections, but not temporal corrections.
SYNOPSIS
   preppsf [options] before-image after-image
DESCRIPTION
   preppsf performs further corrections on a psf image data set based on
   the fluorescence D.I.M image formation/acquisition model. The before-
   image argument is the name of a 3-D psf image set, acquired (DIM-1,
   DIM-2, CELLscan, UFM, or other)  and processed using prepdata (see below)
   without the -norm option. The psf is extracted as a symmetric sub-region
   (square in XY) centered at the psf origin (-center), optionally
   normalized for constant total intensity (-norm), and optionally masked
   (-mask) to exclude any extramural data. The after-image argument is the
   file name for the processed psf image set. All options must precede
   input/output image files

Usage:

%preppsf [options] before-image after-image

For help on syntax and available optionos:

%preppsf -h

SNR

Usage: SNR [options] imagefile
  imagefile  data for SNR calculation
Options:
  -gain n          CCD gain (e/ADU)
  -read n          CCD readout noise (e RMS)
  -bias n          CCD bias value (ADUs)
  -dark imagefile  dark current image
  -flat imagefile  flatfield image
  -offset dx dy    offset of lower-left corner of data image
                   from lower-left corner of flatfield image

sparsedata

sparsedata                         UMMC/BIG                            01/29/97 
 
NAME 
     sparsedata - re-formats sparsely sampled images for EPR interpolation 
     and/or extrapolation 
 
SYNOPSIS 
     sparsedata [-{h,sets,magnify|interpolate,extrapolate,z] 
                source-image[.i2i] destination-image[.i2i] 
 
DESCRIPTION 
     The source image is re-formatted for EPR(see also) interpolation 
     and/or extrapolation by creating a "sparse" destination image sampled  
     on a finer(integer multiple), regularly-spaced spatial grid. Existing 
     data are placed in their corresponding sample positions. The 
     remaining grid positions are set to a unique value (-32768) that 
     indicates missing data to EPR. sparsedata is normally applied 
     following prepdata(see also) and before EPR. EPR must be provided 
     with a corresponding PSF (see note 1 below). For 4-D images, 
     re-formatting is repeated for each 3-D image set. 
 
     sparsedata has the following options: 
 
     -h                  Prints basic help on syntax and available 
                         options. 
      
     -sets n             Specify the number of 3-D image sets in 
			 source-image. Overrides the sets number (if) 
			 present in source-image and assigns the sets 
			 number in new-image. 
      
     -magnify x y z      Create intervening voxels between existing 
     -mag x y z          voxels for each spatial axis. A value of 1 
			 indicates no magnification for that axis, a 
			 value of 2 doubles the sampling (equivalent to 
			 -interpolate 1), etc. 
      
     -interpolate x y z  Create intervening voxels between existing 
     -int x y z		 voxels for each spatial axis. A value of 0 
			 indicates no interpolation for that axis, a 
			 value of 1 create one intervening voxel 
			 (equivalent to -magnify 2), etc. 
      
     -extrapolate x y z  Create surrounding voxels outside the bounds of 
     -ext x y z          the existing voxels for each spatial axis. The 
			 new voxels are created symmetrically (+/-axis). 
			 A value of 0 indicates no extrapolation for that 
			 axis. 
      
     -zed file[.zed]     Re-format the z-axis based on sampling protocol 
                         described in the named file (see note 2 below). 
			 Any z-axis interpolation (-interpolate or 
			 -magnify) is applied AFTER -zed re-formatting 
			 and cumulatively. 
      
     The -magnify and -interpolate options describe the same process and 
     are thus mutually exclusive. Use of both results in an error. 
 
EXAMPLES 
     1) Interpolate one optical section between existing sections: 
 
      %  sparsedata -int 0 0 1 in_image.i2i out_image.i2i 
 
     which is equivalent to doubling the magnification in z: 
 
      %  sparsedata -mag 1 1 2 in_image.i2i out_image.i2i 
 
     2) Now also extrapolate four sections, two before and two after 
     the data: 
 
      %  sparsedata -int 0 0 1 -ext 0 0 2 in_image.i2i out_image.i2i 
 
     3) Re-create a z-axis sampling protocol (7 optical sections at  
     -5,-3,-1,0,1,3,5) positioned so that -5 becomes the first 
     plane: 
 
       protocol.zed  (see note 2 below) 
       +------------ 
       | 6 
       | -5 1 
       | -3 1 
       | -1 1 
       | 0 1 
       | 1 1 
       | 3 1 
       | 5 1 
       +------------ 
 
       % sparsedata -zed protocol.zed in_image.i2i out_image.i2i 
 
     The out_image has 11 optical sections (-5,-4,-3,...,5) . 
 
     4) Now also double the original z-axis spacing: 
 
       % sparsedata -zed protocol.zed -mag 1 1 2 in_image.i2i out_image.i2i 
 
     The out_image has 21 optical sections (-10,-9,-8,...,10). 
 
FILES 
 
SEE ALSO 
     prepdata 
     preppsf 
     epr 
 
NOTES 
     1) The PSF must have the same sampling grid as new-image. However, 
     CCD detectors (generally) integrate over the entire area of a 
     pixel, as compared to optical sectioning, which measures at 
     discrete positions in z. The PSF in x and y must be sampled at the 
     new grid spacing, but the new pixels should be area integrations 
     corresponding to the original (source-image) pixel area. 
 
     2) The .zed files are simple text files describing the optical 
     sectioning protocol used for acquisition. They have the following 
     format: 
 
	   The first line is the "origin" in z. This is added to all 
	   following z positions to create an index(plane number) 
	   greater than or equal to one. 
 
	   Subsequent lines have two value separated by a (white)space: 
	   the relative z position and the relative exposure time for 
	   the corresponding image plane. 
	    
     For 4-D images, the protocol is repeated for each 3-D image set. 
 
     3.  A - in place of an image name means stdin or stdout.

superresolution-epr

Usage: superresolution-epr [-h|H] image[.i2i] psf[.i2i] smoothness XY-fold Z-fold

Description:

 Superresolution EPR is a technique for restoring (deconvolving) an image using a finer pixel sampling

than the original image. This gets around the limitation on acheivable resolution imposed by the imaged pixel size.

Example: Given the command

 $ superresolution-epr  foo.i2i  psf.i2i  1e-3  3  2

The program creates these files in your directory:

 psf_3x3x2.i2i (interpolated psf.i2i)
 psf_3x3x2_sr.i2i (interpolated psf convolved with a 2-D square of the original pixel size)
 foo_3x3x2.i2i (foo.i2i resampled with NODATA (-32768) at new pixel positions)
 foo_3x3x2_sr1e-3.i2i (the restored image with the new pixel count and size)

The arguments XY-fold and Z-fold are the pixel sampling increase; e.g. a value of 2 means double the number of pixels in the restored image and half the pixel spatial size (double the sampling resolution). It is limited to 1, 2 or 3 in XY and Z for reasons of calculation time (proportional to fold increase) and storage space (it uses lots of random access memory).

Notes:

 The program takes care of everything.  You give it properly prepared image and psf files ready for regular EPR,

and it handles all the things need to make it work. I only recommend running this on large RAM machines and on images where the resulting superres (original size times the requested XY and Z fold increases) image will be under 1000x1000x100. And run it on the fastest CPU you can (that would be the new mizar and alcor).

Authors:

 Karl D. Bellve <karl.bellve@umassmed.edu>
 Kevin E. Fogarty <kevin.fogarty@umassmed.edu>
 Walter A Carrington

References:

 Superresolution three-dimensional images of fluorescence in cells with minimal light exposure.
 WA Carrington, RM Lynch, ED Moore, G Isenberg, KE Fogarty, and FS Fay
 Science 9 June 1995: 268 (5216), 1483-1487

Copyright:

 © 2014 Biomedical Imaging Group, Univ. of MA Medical School, Worcester MA, USA

See also:

 epr_i2i
 sparsedata
 preppsf
 preppdata

SLeEPR

Usage: superresolution-epr [-h|H] image[.i2i] psf[.i2i] smoothness XY-fold Z-fold

Description:

 Superresolution EPR is a technique for restoring (deconvolving) an image using a finer pixel sampling

than the original image. This gets around the limitation on acheivable resolution imposed by the imaged pixel size.

Example: Given the command

 $ superresolution-epr  foo.i2i  psf.i2i  1e-3  3  2

The program creates these files in your directory:

 psf_3x3x2.i2i (interpolated psf.i2i)
 psf_3x3x2_sr.i2i (interpolated psf convolved with a 2-D square of the original pixel size)
 foo_3x3x2.i2i (foo.i2i resampled with NODATA (-32768) at new pixel positions)
 foo_3x3x2_sr1e-3.i2i (the restored image with the new pixel count and size)

The arguments XY-fold and Z-fold are the pixel sampling increase; e.g. a value of 2 means double the number of pixels in the restored image and half the pixel spatial size (double the sampling resolution). It is limited to 1, 2 or 3 in XY and Z for reasons of calculation time (proportional to fold increase) and storage space (it uses lots of random access memory).

Notes:

 The program takes care of everything.  You give it properly prepared image and psf files ready for regular EPR,

and it handles all the things need to make it work. I only recommend running this on large RAM machines and on images where the resulting superres (original size times the requested XY and Z fold increases) image will be under 1000x1000x100. And run it on the fastest CPU you can (that would be the new mizar and alcor).

Authors:

 Karl D. Bellve <karl.bellve@umassmed.edu>
 Kevin E. Fogarty <kevin.fogarty@umassmed.edu>
 Walter A Carrington

References:

 Superresolution three-dimensional images of fluorescence in cells with minimal light exposure.
 WA Carrington, RM Lynch, ED Moore, G Isenberg, KE Fogarty, and FS Fay
 Science 9 June 1995: 268 (5216), 1483-1487

Copyright:

 © 2014 Biomedical Imaging Group, Univ. of MA Medical School, Worcester MA, USA

See also:

 epr_i2i
 sparsedata
 preppsf
 preppdata

Convolution

The prgrams are useful for fast linear filtering, and for creating simulated data.


blur2d

Usage: blur2d [options] image psf result
Image files (do not use any file extension):
  image   .i2i file image to blur
  psf     .i2i file image to serve as psf
  result  .i2i file blurred image
Option(s):
  -S n    scale factor for result (default=1)
            n<1 prevents integer overflows
            n>1 minimizes integer truncation
  -N x y  dimensions of convolution space
          (default dimensions are image + 1/2 psf)
  -M x y  dimensions of output image
          (defaults are dimensions of input image)
  -Z      pad image convolution space with zeros
          (default is pad image with edge values)
  -X      cross-correlation instead of convolution
  -xnorm  xcorr with normalization: I=(I-)/
            implies -X -Z -D but not -0
  -D      Do not normalize the psf
  -0      No DC component in psf
  -V      verbose mode (default is not verbose)
blur2d will choose a convolution space size large enough
to prevent wrap-around. This size must also 1) be even
in the X axis, and 2) have largest prime factors < 19.
The image is padded with the edge pixel values to avoid
sudden transitions to zero, except with the -Z option.

blur3d

lurs an image by a psf. FFTs are done with 4 byte floats, so total space needed will be 4 times the padded image size (in voxels) plus the size of the two original images (image and psf) The input image can be real or short int format. The psf must be short int format. note: performs a convolution (not a correlation). note: fixed a small bug. 10/17/11

Usage: blur3d [options] image psf newimage

       options:
         -S #:  scale (multiply) output values by # (to prevent underflow or overflow)
                voxels which after scaling are > 32767 are set to 32767. voxels < -32766 are set to -32766.
         -p # # #: pad the image in x, y, and z by the specified amounts
               by default image is padded (with 0) by 1/4 psf width all around,
               so its size for blurring becomes bigger by psf/2.
               psf is always padded to the same size the image becomes. 
               Padding is stripped off before newimage is written, so it will be the same size as
               the original image.
         -N # # #: pad so that the image has the specified dimensions after padding (just prior to FFT).
         -n #: pad with # instead of boundary pixel values.
         -Z:   pad with zero instead of the boundary pixel values.
         -c # # #:  the center of the psf is at (#,#,#) zero indexed. 
               the default is to take the brightest pixel as its center.
         -C:   don't center the psf at all (default is to center on the max, unless -c is specified).
         -P:   normalize the psf so each slice (after padding) averages to 1. -P acts like an optical PSF.
               the default is to normalize so the entire psf (after padding) has an average pixel value of 1 
              (the default keeps total light constant).
         -d:   don't normalize at all.
         -o:   do a cross correlation instead of a blur (convolution)
         -R:   output image as 4 byte floating point instead of short integer.
         -v:   verbose. print more info to stderr.

note: entire image name (with extension) is NOT required. note: can read from stdin or write to stdout (use a dash instead of the file name) note: a compressed image will be automatically be uncompressed.


smooth2d

smooth2d   2D image smoothing
  Input  file   The image to be filtered.
  Output file   The filtered image.
Options:
  -3        3x3 approx to gaussian filter: [[1,2,1][2,4,2][1,2,1]]
  -B n      NxN box filter
  -T n      NxN triangle filter
  -G n      Gaussian kernel where n = std.dev.
  -IO Nin Nout
            Difference of average of inner Nin x Nin and outer Nout x Nout regions
  -RMS n    calculate local RMS value over n x n pixels
  -S n      image scale factor.
  -X        1D X-axis(horizontal) smoothing.
  -Y        1D Y-axis(vertical) smoothing.
  -pos      Positive-quad-only box filter
  -v|-V     Verbose

smooth3d

smooth3D      3D image smoothing
  Input  file   The image to be filtered.
  Output file   The filtered image.
Options:
 -3              3x3x3 gaussian approximation.
 -G sd1 sd2 p sd3  Gaussian kernel where sd = std.dev. in pixels
                   sd1 is x,y
                   sd2 is z rising phase
                   p is z duration of peak (usually zero)
                   sd3 is z falling phase
 -Z              Z-axis only filtering (xx,y extent=0)
 -S n            image scale factor.
Note: The half-amplitude point of a gaussian occurs at 1.177*sd


Modeling/Simulation

These prgrams are used when modeling images of cells.


checknoise

Usage: checknoise [options] imagefile [textfile]
  Imagefile     An image file name (extension optional)
Options:
  -Z n    
  -N n    
  -M

COSINEex

Usage:
 % scaleima [options] input_file output_file
Options:
  -size x y    (pixels)
  -period n    (pixels)
  -phase  n    (degrees) default=0
Notes:

makebead

MAKEBEAD  Make a 3D fluorescent bead model
  Output file   The converted image file.
Options:
   -dim x y z  Image dimensions x,y, and z (pixels)
   -D n n      bead inner and outer diameters (microns)
   -R n        inner rise std.dev. (microns)
   -F n        outer fall std.dev. (microns)
   -S n n n    X,Y,Z pixel dimensions (microns)
   -X n        number subpixels per pixel

makeDOG

Usage:
 % makeGaussian [options] output_file
Options:
  -DOG s1 s2   Difference-of-Gaussians sigmas (pixels) s1<s2
  -scale n     Gaussian unit area scale factor (default is +1.0)

makeImpulse

Usage:
 % makeImpulse [options] output_file
Options:
  -dim nx ny nz   image size (pixels)
  -orig x0 y0 z0  impulse location(pixels)
  -scale n        impulse scale factor (default=1)

noise

Abstract:

 This program takes an image (ADUs), adds a background (ADUs),

multiplies by a scale factor (-s), and adds photon (Poisson) and read (Gaussian) noise appropriate to a given detector (-c|-e,-g)

Usage: noise [options] inp_image out_image

Options:

 -c RCA      DIM-1 type of camera
 -c TI       DIM-2 type of camers
 -c LL128    SCRATCH type of camera
 -c PM512    RATCH type of camera
 -c LLraw    SCRATCH type of camera (input in electrons)
 -c photons  input in photons(just adds shot noise)
 -e e_ADU    electrons per A to D
 -g gain     gain
 -n sigma    read noise as electrons RMS
 -b number   value of background (added to input, not output)
 -s number   value of scale_factor (applied to input after -b)

Image files (do not use any file extension):

 inp_image  .i2i input  file of image data
 out_image  .i2i output file of image data

NOTE:

 '-' in place of an image name means stdin or stdout.

psf3di

Computes a 3-D microscope point spread function image.
Syntax:
  % psf3di [options] output_image_file
Options:
 -help        Extended abstract explaining method
 -verbose     Show wavefront data
 -size x y z  Pixel sizes (microns)
 -dim x y z   Psf extents (pixels)
 -lambda n    Wavelength in vacuum (microns)
 -NA n        Numerical Aperture. of objective lens
 -sqrt        Save square-root of intensities (more dynamic range)
 -nominal n0 z n1 thickness n2
 -actual n0 z n1 thickness n2
 -cglass z    z-plane poistion of the cover glass (default is (zdim+1)/2)
Nominal refers to the nominal objective lens corrections.
Actual refers to the actual imaging parameters.
Where:
  n0          n(D) of object medium
                (nominally same as n2)
  z           Distance(microns) from cover glass
                (nominally 0)
  n1          n(D) of cover glass
                (1.522 +/- 0.004 is standard)
  thickness   Thickness(microns) of cover glass
                (170 +/- 10 is standard no. 1)
  n2          n(D) of lens immersion medium
                (air=1.0, water=1.33, oil=1.515)
Example: objective is a Zeiss 63x 1.4NA Planapo
  % psf3di -NA 1.4 -nominal 1.515 0 1.522 170 1.515 ...

Image-Reformatting

These programs are used when changing the pixel sampling of images.


chres

chres  changes image resolution(trilinear interpolation)
 Input file   image file
 Output file  image file
Options:
  -S n n n    X Y and Z voxel scale factors
  -E          Operate on each Z plane separately

concateima

Usage:
 % concateima [options] image image... output_image
Concatenates image files together
Options:
   none

hugesegz

Syntax: hugesegz inputfle[.i2i] outputfile[.i2i] zstart zend


matrixima

Usage:
 % matrixima [-lead string] [-tail string] -row ... -col ... output_image
Assembles multiple time-course well images into a matrix that can be viewd with play
 where the canonical well image name is [{lead}]{row}{col}_{position}_{objective}_{filter}[{tail}].i2i
 required:
   -row n str [str [str...]]       typically B, C, D, etc.
   -col n str [str [str...]]       typically 02, 03, 04, etc.
 important(check defaults):
   -pos[ition] n                   position in well: 0 <= n <= 99 (default is 0)
   -obj[jective] n                 object lense: 0=5x, 1=10x, 2=20x (default is 1)
   -fil[ter] n                     filter position: 0=phase, 1=GFP, 2=RFP (default is 0)
 optional:
   -lead string                    filename leading string (default is none)
   -tail string                    filename trailing string (default is none)
   -bin n                          bins pixels nxn (default is larger of rows and cols)
   -h[elp]                         additional information and examples.
Notes:
  The first well (row 1, col 1) image MUST exist.
  Skipped wells (missing image file) will be included in matrix but left blank.

Colocalization

These prgrams calculate measures of colocalization between/among images..


coloc3way

coloc3way image1[.i2i] image2[.i2i] image3[.i2i] [coloc-image[.i2i]]
  Two-way and three-way binary image colocation
Options:
   -T n1 n2 n3  image1|2|3 Thresholds(>) default: -T 0 0 0
   -E           operate on Each image plane separately (2-D mode)
Meaning of output column headers:
  1=>2    percentage of image-1 pixels found with image-2
  1=>23   percentage of image-1 pixels found with both image-2 and image-3
  1=>!23  percentage of image-1 pixels found with image-3 but not with image-2
  1=>2!3  percentage of image-1 pixels found with image-2 but not with image-3

Object-Segmentation

The programs perform various types of segmentations/classifications of pixels into objects, etc.


addlines

Adds polyline|pixel objects to image files
Usage:  % addlines image textfile [options] image
  image           input image file
  textfile        polyline|pixel object description file
  image           output image file
Options:
  -O label n      select labeled object with w=n(superseeds -P)
  -P n            default w for all objects
  -C n            mark centroids with w=n(superseeds -P)
  -T              truncate floating point coordinates to integer (default is to round)
  -0              use zero-indexed coordinates (default is one-indexed)
  -silent         redirect stderr to /dev/null
Defaults:
  all objects selected
  w = -1
  centroids not marked
Object description file format:
 1)file is ASCII byte stream
 2)blank lines are ignored
 3)anything from a # to end-of-line is a comment
 4)objects begin with the object= key and continue
   until the next object or the end-of-file
 5)x,y,z coordinates are the position of the pixel
 6)w coordinate is the value assigned to the pixel(s)
Legend:
 |  indicates a choice of parameters
[ ] indicates an optional parameter
{ } indicates a set of number separated by spaces
    do NOT include these symbols in the data
Object description format:
object=name    # name may include spaces
[closed]       # ensures closure of a polyline object
               # applies only to ordered boundaries
[z=n]          # default z when none specified in coordinate
[everyplane]   # apply as 2-D(x,y) coordinate list to every z-plane in image
[w=n]          # set pixel intensities to w(superseeds command line options)
[centroid=x y] # 2-D centroid position of closed boundary
boundary=ordered|unordered|chain-code [xy|xyz|xyw|xyzw]
[{x y}|{x y z}|{x y w}|{x y z w}]  # one pixel/line
[{x y}|{x y z}|{x y w}|{x y z w}]  # repeated...
[break]        # next pixel begins disjoint curve
               # not compatable with closed option
[{x y}|{x y z}|{x y w}|{x y z w}]  # repeated...

countobjs

Usage:

 countobjs [options] outputfile image1.i2i [image2.i2i]

Description:

 Count objects in co-localized images. If only one image given
 the objects will be counted in that one image.  Copious amounts
 of information will be written to the output file.
 A - for outputfile will write to stdout.
 outpufile can be analyzed with objs2bb.pl and objs2dist.pl

Options:

 -C # #         : set opacity and brightness level to these values (0-255 only)
 -k             : use original images for data analysis (so scale and black level not important and

-t option can be in same units as original, unscaled, image values)

 -S # # #       : image # scale and black level (default autoscale image)
 -r # # # # # # : region of image to count
                  (-r x0 y0 z0     x1 y1 z1)
                  (   ^lower left  ^upper right)
                  (zero indexed coordinates)
                  (default whole image)
 -s # #         : size of smallest and largest objects to count
                  (default 1-100000)
 -m # #         : min and max iod of allowable objects (applied to image1 only).
 -t thresh1 thresh2    : thresholds (applied after -S or default scaling, unless -k specified). 
                  Like left brightness slider in DAVE.
                  if only one image, second number still required, but ignored.
 -o <image.i2i> : output image with all objects represented by the voxel
                  with the maximum intensity in the object
                  the intensity of the voxel will be the IOD of the object.
 -O <image.i2i> : output image with all pixels in each object having
                  the intensity of the original objects IOD.
                  NOTE: this image will be in floating point format.
                        use float2int to convert it back to "normal" format.
 -Q <image.i2i> : output image with all pixels in each object having
                  a unique id # (1-# of objects). Must be < 32766 objects.
                  NOTE: this image will be in standard signed short int format.
 -M #           : When countobjs is given 2 images, this flag will
                  turn of some subset of the voxels for colcalization.
                  calculations.
                  0: turn off colcalized voxels (default on)
                  1: turn off image 1 voxels (default on)
                  2: turn off image 2 voxels (default on)
 -q	     : quiet. don't print out all objects, but just summary statistics
 -Z             : simple analysis, no sliders, opacity,etc. can use with -t option.
 -h             : show this message.
 -H             : show even more help.

Notes:

 A - in place of an image name means stdin or stdout.
 Source code in /storage/big1/lml/jac/was_invitro/Projects/countobjs

DoTheTrackingAndRatios

Syntax: DoTheAnalysis.csh [--random] rootfilename wavelength threshold(edges) [threshold(newprog1)|.]

 Finds all local 2-D maxima above 1st threshold(edges) in 491|561
 Computes the vesicle ratio of TFIs of 660/{491|561} in a 5x5 box centered at each maximum

Options:

 --random    randomize the 660 location realive to the 491|561
 Set the 2nd threshold (newprog) to a period(.) for automatic denominator TFI thresholding

newprog1

foo image1[.i2i] image2[.i2i] image3[.i2i] textfile
  Two-way intensity-based vesicle colocalization
  image1  primary image (denominator)
  image2  secondary image (numerator)
  image3  image of vesicle IDs (2-D maxima)
Options:
   -IO inner outer  +-size (pixels) of region for local average intensiy calculation
                    default: 2 3 (i.e. 5x5 and 7x7)
   -random n        randomly shift vesicle paths by adding uniform random variable [0..n] pixels
                    default: 0
   -T threshold     primary (denom.) image local average intensity must be > threshold
                    (default 0)
Notes:
 8/2/2010 output to textfile includes (ix,iy) of those positions passing threshold test

trackves

trackves   2D vescile tracking
  Inputfile_1  Original vesicle time series
  Inputfile_2  Filtered vesicle time series
  Outputfile   Tracked vesicles time series.
Options:
  -T        vesicle intensity threshold (> or =) for filtered image (default 1)
  -id n     vesicle ID modulo n (default 256)
  -xy n     search n pixels in x and y to link vesicle path (default 1)
  -z n      search n pixels in time (z) to link vesicle path (default 1)
  -dur      mark vesicels with duration rather than ID
  -crop n   crop the filtered image n pixels from edges (default 0)
  
Notes:
  Only single paths allowed (no branching, first come first servered)
  setting -z > 1 no longer guaranties FCFS matching and branching may occur

planimeter3

PLANIMETER3: Measure length and area of closed contours Usage:

planimeter3 [options]
Options:
  -I input_file  Image file name(s). A maximum of three
     images can be entered. The first one is displayed
     as green, the second as red and the third as blue.
     Voxels colocalised between any two images are shown
     as white
  -R rpts file. If it exists on input, it is read in and
     contours contained in it are displayed and can be deleted
     or edited. If it does not exist, it will be saved on
     exit unless Quit is pressed first
  -S n n n  Image number, display scale and black-level
  -X n n    range of X planes (low,high)
  -Y n n    range of Y planes (low,high)
  -Z n n    range of Z planes (low,high)
  -M n      Magnification (zoom)

This program allows you to draw boundaries around a cell or object The boundaries can be drawn in any order and can be erased if required.

Use: Left mouse button: move between planes (as in play). Middle mouse button: draw boundary.

 Once a object has been defined pressing the middle mouse
 button will start drawing a contour for that object, or,
 if the contour has already been started, continue it.
 Each subsequent perimeter is associated with the previously
 defined object. To change the object or start a new object
 use the pop-up menu.

Backspace - undraw previous point (may be repeated).

Keypad + : Zoom in. Keypad - : Zoom out.

l - (toggle) show n planes in addition to the current plane.

   Where n is 3 (default) but can be set from 1 - 9 by pressing
   the appropriate numerical key.
   Pressing the l key again will show just the current plane

v - (toggle) while drawing will result in a vertical line being

   drawn from the current position when the mouse is moved.

h - (toggle) while drawing will result in a horizontal line being

   drawn from the current position when the mouse is moved.

Control (toggle) - Toggle on and off scaling for the images.

Notes: A maximum of 20 separate objects can be defined for

      contouring. Each object is represented by a different
      colour.
      The only limit on the number of contours that may
      added to an object is the number of Z planes.
      There is a limit of 4096 points per drawn contour,
      however there is no limit on the number of points
      of a contour in a file that is read-in

pMapping

Maps (postive only) image intensities into probability P that pixel is from G1 rather than G0.
Usage:
 % pMapping [-{G|B|S|P|Q}] input_file[.i2i] output_file[.i2i]
Options:
  -G1 A0 x0 A1 x1 s0     Double-Gaussian parameters (floats)
  -G2 A0 x0 A1 x1 s0 s1  Double-Gaussian parameters (floats)
  -G ...                 Same as -G1 (for backwards compatability)
  -B n                   Camera bias level (integer, default=0)
  -S n                   Image scale factor (float, default=100)
  -P                     Make P image (default)
  -Q                     Make (1-P) image instead
Notes:
  Image pixel intensities (x) are modeled as belonging to one of two Gaussian probabilty distributions (G):
    -G1:  G0=A0*exp(-(x-x0)^2/(2*s0^2)) and G1=A1*exp(-(x-x1)^2/(2*(x1/x0)*s0^2))
    -G2:                                 or G1=A1*exp(-(x-x1)^2/(2*s1^2))
  where x1 > ix
If x>0 then the probability that pixel belongs to G1 is: P=G1/(G0+G1)
                and the probability it belongs to G0 is: Q=(1-P)
Else x<=0 and P=Q=-32768 (no data)

repeat_rpts

Syntax: % repeat_rpts filename count

 Filename is the .rpts file to reproduce
 Count is the number of Z planes to reproduce

Output is to stdout

Example:

 % repeat_rpts one.rpts 10 >many.rpts

trackspots

trackspots: Command not found.


Utilities

The programs perform various useful functions.


cull

Choose and order columns of text

Usage: cull [-{h,c,a,s,n,1,2,...}

Options:

 -h		print this message
 -c		ignore comments (from # to end of line)
 -a		ignore ampersands (from & to end of line)
 -s		suppress blank output lines
 -n		number rows
 -1,-2,...	next column to print

hist

This program prints image history records.

Usage: hist imagefile	
                                                    
                                                    

hist2list

       hist2list filenames
       Prints history information for .i2i files
       NOTE: works  works with wildcards
       NOTE: works with .Z files

immax

INFOCUS  Find position of brightest pixel in a 3D data set
 Input file   The 3D image file.
Options:

infocus

INFOCUS  Find most infocus Z plane of 3D data set
 Input file   The 3D image file.
Options:
  -X      output infocus X position
  -Y      output infocus Y position
  -Z      output infocus Z position (default)
  -N      normalize z-planes (MGL=1)
Output is a number (Z coordinate) sent to stdout

printpixels

Syntax: printpixels [options] imagefile [ > textfile ]
  Options:
    -X x1 x2       keep pixel coordinates between x1 and x2 inclusive
    -Y y1 y2       keep pixel coordinates between y1 and y2 inclusive
    -Z z1 z2       keep pixel coordinates between z1 and z2 inclusive
    -low n         keep pixels valued > low
    -high n        keep pixels valued < or = high
    -silent        suppress output of non-warnings/errors to stderr
  Output is to "stdout"

stats

Usage
  % stats [-h] <infile >outfile
Options
  -h    types this message
Computes minimum, maximum, mean and standard deviation
of a string of numbers read from stdin.

imsets

Sets the number of images sets in an image file.

Usage: % imsets imagefile.i2i #

Image-Visualization

These programs perform basic to sophisticated 2, 3, 4 and 5-D (x,y,z,t and color) image visualization.


montage

Version: ImageMagick 6.8.6-3 2014-04-08 Q16 http://www.imagemagick.org Copyright: Copyright (C) 1999-2013 ImageMagick Studio LLC Features: DPC OpenMP Modules Delegates: bzlib djvu fftw fontconfig freetype gslib jng jp2 jpeg lcms lzma openexr pango png ps rsvg tiff wmf x xml zlib

Usage: montage [options ...] file [ [options ...] file ...] file

Image Settings:

 -adjoin              join images into a single multi-image file
 -affine matrix       affine transform matrix
 -alpha option        on, activate, off, deactivate, set, opaque, copy
                      transparent, extract, background, or shape
 -authenticate password
                      decipher image with this password
 -blue-primary point  chromaticity blue primary point
 -bordercolor color   border color
 -caption string      assign a caption to an image
 -channel type        apply option to select image channels
 -colors value        preferred number of colors in the image
 -colorspace type     alternate image colorsapce
 -comment string      annotate image with comment
 -compose operator    composite operator
 -compress type       type of pixel compression when writing the image
 -define format:option
                      define one or more image format options
 -density geometry    horizontal and vertical density of the image
 -depth value         image depth
 -display server      query font from this X server
 -dispose method      layer disposal method
 -dither method       apply error diffusion to image
 -draw string         annotate the image with a graphic primitive
 -encoding type       text encoding type
 -endian type         endianness (MSB or LSB) of the image
 -extract geometry    extract area from image
 -fill color          color to use when filling a graphic primitive
 -filter type         use this filter when resizing an image
 -font name           render text with this font
 -format "string"     output formatted image characteristics
 -gamma value         level of gamma correction
 -geometry geometry   preferred tile and border sizes
 -gravity direction   which direction to gravitate towards
 -green-primary point chromaticity green primary point
 -identify            identify the format and characteristics of the image
 -interlace type      type of image interlacing scheme
 -interpolate method  pixel color interpolation method
 -kerning value       set the space between two letters
 -label string        assign a label to an image
 -limit type value    pixel cache resource limit
 -mattecolor color    frame color
 -mode type           framing style
 -monitor             monitor progress
 -origin geometry     image origin
 -page geometry       size and location of an image canvas (setting)
 -pointsize value     font point size
 -profile filename    add, delete, or apply an image profile
 -quality value       JPEG/MIFF/PNG compression level
 -quantize colorspace reduce colors in this colorspace
 -quiet               suppress all warning messages
 -red-primary point   chromaticity red primary point
 -regard-warnings     pay attention to warning messages
 -respect-parentheses settings remain in effect until parenthesis boundary
 -sampling-factor geometry
                      horizontal and vertical sampling factor
 -scenes range        image scene range
 -seed value          seed a new sequence of pseudo-random numbers
 -set attribute value set an image attribute
 -shadow              add a shadow beneath a tile to simulate depth
 -size geometry       width and height of image
 -stroke color        color to use when stroking a graphic primitive
 -synchronize         synchronize image to storage device
 -taint               declare the image as modified
 -texture filename    name of texture to tile onto the image background
 -thumbnail geometry  create a thumbnail of the image
 -tile geometry       number of tiles per row and column
 -title string        decorate the montage image with a title
 -transparent-color color
                      transparent color
 -treedepth value     color tree depth
 -trim                trim image edges
 -units type          the units of image resolution
 -verbose             print detailed information about the image
 -virtual-pixel method
                      virtual pixel access method
 -white-point point   chromaticity white point

Image Operators:

 -adaptive-sharpen geometry
                      adaptively sharpen pixels; increase effect near edges
  annotate geometry text
                      annotate the image with text
 -auto-orient         automagically orient image
 -blur geometry      reduce image noise and reduce detail levels
 -border geometry     surround image with a border of color
 -crop geometry       preferred size and location of the cropped image
 -extent geometry     set the image size
 -flatten             flatten a sequence of images
 -flip                flip image in the vertical direction
 -flop                flop image in the horizontal direction
 -frame geometry      surround image with an ornamental border
 -monochrome          transform image to black and white
 -polaroid angle      simulate a Polaroid picture
 -repage geometry     size and location of an image canvas (operator)
 -resize geometry     resize the image
 -rotate degrees      apply Paeth rotation to the image
 -strip               strip image of all profiles and comments
 -transform           affine transform image
 -transpose           flip image vertically and rotate 90 degrees
 -transparent color   make this color transparent within the image
 -type type           image type
 -unsharp geometry    sharpen the image

Image Sequence Operators:

 -coalesce            merge a sequence of images
 -composite           composite image

Image Stack Operators:

 -clone indexes       clone an image
 -delete indexes      delete the image from the image sequence
 -duplicate count,indexes
                      duplicate an image one or more times
 -insert index        insert last image into the image sequence
 -reverse             reverse image sequence
 -swap indexes        swap two images in the image sequence

Miscellaneous Options:

 -debug events        display copious debugging information
 -help                print program options
 -list type           print a list of supported option arguments
 -log format          format of debugging information
 -version             print version information

In addition to those listed above, you can specify these standard X resources as command line options: -background, -bordercolor, -borderwidth, -font, -mattecolor, or -title

By default, the image format of `file' is determined by its magic number. To specify a particular image format, precede the filename with an image format name and a colon (i.e. ps:image) or specify the image type as the filename suffix (i.e. image.ps). Specify 'file' as '-' for standard input or output.


play

Usage: % play [options...] file [file2 [file3] ]
  file(s)  2D, 3D or 4D image file name (with or without .i2i). FILES MUST BE OF SAME DIMENSIONS!
   -       Accepts input from stdin("<") or pipe("|") and titles as "<stdin>"
Options:
  -sets n  Number of 3-D image sets (default=1)
  -S n n   Image display scale and black-level
  -M n     Magnification (default=1)
  -P n c   Map intensity n to color c:{N R Y G C B M W}
  -Z n n   Range of Z planes (low, high)
  -L       Limit playback at range of Z planes
  -U       image values > black-level are displayed > 0
  -B n n   Scale bar length(microns) and microns/pixel
  -project Display maximum intensity projection of Z-planes
                  DATA/ANALYSIS
  -IO inner outer
           Set the pixel readout (MIDDLE mouse button) ROI size where:
           inner is the radius (+/- center pixel) of the additive ROI (default=0)
           outer is the radius (+/- center pixel) of the subtractive ROI (default=0)
  -name string
           "string" replaces image filename (window title) as root name for creating files
                  DATA/PSF PREPARATIONS
  -psf wavelength NA nD size spaced mask
           Visualize the psf extent as a green circle
           (wavelength, size and spaced must be in microns)
           See preppsf for corresponding options
  -min n   Displays pixels valued less than "n" as blue
           (default is -nomin)
  -nomin   Disables minimum function
  -max n   Displays pixels valued greater than or equal to "n" as red
           (default is -max 32767)
  -nomax   Disables maximum function
  -nonneg  same as -min 0
                  ANIMATION
  -movie {f|r|b}
           Sets movie running forward, backword or both
  -speed n Sets movie speed n={1,2,....9} (default=2)
  -master  Makes this a syncronous master
  -n n     Master(*) divides frame no. by n
  -slave   Makes this a syncronous slave
  -pipe    Both a master and a slave
  -color   Pseudocolor scale (default is gray scale)
  -timebar Display time-bar instead of frame number
  -hide    Do not display the frame number
  -o x y   Screen origin (x,y) for window
  -sched z n
           Pause n video fields WHILE displaying plane z


  -labels file
          file contains one or more lines of x,y,z and labels
          formatted |xxxxx yyyyy zzzzz string....
LEFT MOUSE left/right manual movie control
MIDDLE MOUSE readout pixel position and value
RIGHT MOUSE pops up Main menu
To adjust contrast/brightness (replaces SGI edmap program)`:
  choose Main menu => Color menu => Help for built-in edmap
  this will print instructions in the terminal window
To use Z/Time Plot Analysis:
  A-Key then Hold(!) down the MIDDLE MOUSE button, or press the SHIFT and A-Keys together

  If you use the first method to enter: release the MIDDLE button to exit
  If you use the second method to enter: press the A-Key again to exit
To use ROI Analysis:
  choose Main menu => ROI Analysis (or press the t-key on the keyboard)
  LEFT MOUSE size or move ROI box
  MIDDLE MOUSE left/right changes threshold
To use Intensity linescan:
  choose Main menu => Intensity linescan (or press the l-key on the keyboard)
  LEFT MOUSE draw scan line through image
To save the current image display(s) as 24-bit color, portable anymap files (.ppm):
  choose Main menu => Save image(s) => Current image (or > key on keyboard)
  or choose Main menu => Save image(s) => Entire image set (or = key on keyboard)
To save the entire image set as an MPEG movie:
  choose Main menu => Save image(s) => Create MPEG (.mpg) movie from PPM set {+}
  or press + key on keyboard. The movie speed will be the same as the current play speed)
To save the entire image set as an Quicktime movie:
  choose Main menu => Save image(s) => Create Quicktime (.mov) movie from PPM set {-}
  or press - key on keyboard. The movie speed will be the same as the current play speed)
To syncronize 2 movies:
     % play -master master.i2i | play -slave slave.i2i
New features:
 * "p" key toggles maximum-intensity projection on|off (see -project command line option)
 *  contrast widget includes multiple colors (beyond gray) for (mono)chroma
 *  on-image labels are available (see -labels) and can be toggled off|on using the "shift+L" key
 *  "}" key increases stereo parallax.  "{" decreases parallax.  Default parallax is 0 (no stereo).
 *  cycle among multiple images (file1, file2, file3) using END key


play3d

Usage: % play [options...] file
  file     2D, 3D or 4D image file name (with or without .i2i).
   -       Accepts input from stdin("<") or pipe("|") and titles as "<stdin>"
Options:
  -sets n  Number of 3-D image sets (default=1)
  -S n n   Image display scale and black-level
  -M n     Magnification (default=1)
  -P n c   Map intensity n to color c:{N R Y G C B M W}
  -Z n n   Range of Z planes (low, high)
  -L       Limit playback at range of Z planes
  -U       image values > black-level are displayed > 0
  -B n n   Scale bar length(microns) and microns/pixel
  -project Display maximum intensity projection of Z-planes
                  DATA/ANALYSIS
  -IO inner outer
           Set the pixel readout (MIDDLE mouse button) ROI size where:
           inner is the radius (+/- center pixel) of the additive ROI (default=0)
           outer is the radius (+/- center pixel) of the subtractive ROI (default=0)
  -name string
           "string" replaces image filename (window title) as root name for creating files
                  DATA/PSF PREPARATIONS
  -psf wavelength NA nD size spaced mask
           Visualize the psf extent as a green circle
           (wavelength, size and spaced must be in microns)
           See preppsf for corresponding options
  -min n   Displays pixels valued less than "n" as blue
           (default is -nomin)
  -nomin   Disables minimum function
  -max n   Displays pixels valued greater than or equal to "n" as red
           (default is -max 32767)
  -nomax   Disables maximum function
  -nonneg  same as -min 0
                  ANIMATION
  -movie {f|r|b}
           Sets movie running forward, backword or both
  -speed n Sets movie speed n={1,2,....9} (default=2)
  -master  Makes this a syncronous master
  -n n     Master(*) divides frame no. by n
  -slave   Makes this a syncronous slave
  -pipe    Both a master and a slave
  -color   Pseudocolor scale (default is gray scale)
  -timebar Display time-bar instead of frame number
  -hide    Do not display the frame number
  -o x y   Screen origin (x,y) for window
  -sched z n
           Pause n video fields WHILE displaying plane z


  -labels file
          file contains one or more lines of x,y,z and labels
          formatted |xxxxx yyyyy zzzzz string....
LEFT MOUSE left/right manual movie control
MIDDLE MOUSE readout pixel position and value
RIGHT MOUSE pops up Main menu
To adjust contrast/brightness (replaces SGI edmap program)`:
  choose Main menu => Color menu => Help for built-in edmap
  this will print instructions in the terminal window
To use Z/Time Plot Analysis:
  A-Key then Hold(!) down the MIDDLE MOUSE button, or press the SHIFT and A-Keys together

  If you use the first method to enter: release the MIDDLE button to exit
  If you use the second method to enter: press the A-Key again to exit
To use ROI Analysis:
  choose Main menu => ROI Analysis (or press the t-key on the keyboard)
  LEFT MOUSE size or move ROI box
  MIDDLE MOUSE left/right changes threshold
To use Intensity linescan:
  choose Main menu => Intensity linescan (or press the l-key on the keyboard)
  LEFT MOUSE draw scan line through image
To save the current image display(s) as 24-bit color, portable anymap files (.ppm):
  choose Main menu => Save image(s) => Current image (or > key on keyboard)
  or choose Main menu => Save image(s) => Entire image set (or = key on keyboard)
To save the entire image set as an MPEG movie:
  choose Main menu => Save image(s) => Create MPEG movie from PPM set (or + key on keyboard)
  (note the MPEG speed will be the same as the current play movie speed)
To syncronize 2 movies:
     % play -master master.i2i | play -slave slave.i2i
New features:
 1) "p" key toggles maximum-intensity projection on|off (see -project command line option)
 2)  contrast widget includes multiple colors (beyond gray) for (mono)chroma
 3)  on-image labels are available (see -labels) and can be toggled off|on using the "shift+L" key
 4)  "]" key increases stereo parallax.  "[" decreases parallax.  Default parallax is 0 (no stereo).

rgbmerge

Takes one to three 2D grayscale images and merges them into a singel RGB image.'

Syntax:

 rgbmerge R|G|B:filename.ext [R|G|B:filename.ext [R|G|B:filename.ext] ] merged.ext

Where:

 R:, G:, or B: indicate the desired color channel for that image.
 Omitted color channels are black by default.
 The case of the color channel (R|r, G|g, B|g) does not matter.
 The order of the images on the command line does not matter.

Examples:

 Merge a green JPEG image and a blue PNG image into one color TIFF image
   rgbmerge G:one.jpg B:two.png result.tif
 is the same as
   rgbmerge b:two.png g:one.jpg result.tif

Valid image file types are those recognized by ImageMagick.


== Image-Processing ==

A collection of various and sundry programs for image processing.

Like many of the programs listed abouve, these routines are designed to work with image piplines. Substituting a dash "-" for an image name routes input from <stdin> and/or output to <stdout> Routines can be chained together with the comandline pipe character "|" for easy prototyping of complex functions.

----

bleachfit

bleachfit: Command not found.


derivima

derivima [-{diff|lr|exp,scale,max}] inputfile outputfile

dFoverF

Compute a fluorescence time-ratio image.
Usage:
  dFoverF [-{h,sets,norm,range,noratio,AC,median,threshold,all,mask,scale,(no)flags}] input_file output_file
Use -h to get further help

diffima

derivima [-diff f|c|b] inputfile outputfile

dilateima

Usage:
 % dilateima [options] input_file output_file
Performs 2D dilation of given pixel value.
  Pixels not dilated are left intact.
Options:
   -P n        Pixel value to dilate (def=1)
   -A          also dilate all pixels > n

edges

Copyright 2010 University of Massachusetts Medical School and the Biomedical Imaging Group
All rights reserved. Explicit permission to use this program must be received prior to use.
Revised - May, 2014
Syntax: edges [options] input_file output_file
  input_file    The image to be filtered.
  output_file   The filtered image.
Options:
  -LAP x y  Laplacian kernel
              size in x (pixels)
              size in y (pixels)
  -DOG s l  Difference of gaussians kernel:
              std.dev. of smaller gaussian (pixels)
              std.dev. of larger gaussian (pixels)
  -E n      Extent (+/-no. of sd's) of DOG kernel
  -M n      image mean to preserve [0,1]
  -S n      image scale factor.
  -I        invert filtered image
  -V        verbose

erodeima

Usage:
 % erodeima [options] input_file output_file
Performs 2D erosion of given pixel value.
Options:
   -P n        Pixel value to erode (def=1)
   -F n        Value to fill eroded pixels (def=0)

FRETratio

FRETratio file [threshold [dx dy] ]

 the threshold is applied to the YFP(upper) image. default is 0.
 the shifts (dx,dy) are applied to the CFP(lower) image. defaults are 0 and 0.
 

histima

Usage: histima [options] imagefile >textfile
  Imagefile     An image file name (extension optional)
Options:
  -bins n  Number of bins in histogram (default=256)
  -size n  Number of grey levels per bin
           (default = max-intensity / number-of-bins)
  -bg n    Value for lowest bin (default=0)
Notes:
  Histogram is output to stdout as ASCII compatable
  with xmgr. (see /usr/local/xmgr)
Example:
  % histima -bins 100 my_image | xmgr -pipe &

kinetic-analysis

Syntax: kinetic-analysis numerator[.i2i] denominator[.i2i] filtered-denominator[.i2i] threshold results[.txt]

 or    kinetic-analysis help

where:

 numerator             the ratio numerator (dependent) time series image
 denominator           the ratio denominator (independent) time series image
 filtered-denominator  corresponding image used for identifying 2-D maxima > threshold for ratio calculation
 threshold             2-D maxima intensity threshold (> or =) applied to filtered-denominator image
 results               name of a text file for the kinetic time course results (see help)
 help                  provides more information

lsr_align

Least Square Residual based image alignment.
Usage: LSRalign [options] in-image out-image
  in-image      images to align
  out-image     aligned images
Options:
  -sets n       Number of 3-D images sets
  -range dx dy  +-range to align
  -first        always align to 1st Z plane

maskedsmul

maskedsmul rescales image intensities in outlined regions
Usage: % maskedsmul {options] image1 image2 image3
  image1   image to correct
  image2   image with mask outline
  image3   output image
Options:
  -I n     scale factor for pixels inside mask (def=1)
  -O n     scale factor for pixels outside mask (def=1)
  -P n     value for boundary pixels (def= -1)
  -silent  redirects stderr to /dev/null
Notes:
 1) The outline pixels are considered outside the line
 2) Use planimeter and addlines to create mask image

maski2i

Usage: maski2i [options] image1 outimage options:

-T # <= # = 0, > # = 1 [Default = 0]

    OR  -C #   	Complement, >= # = 0, < # = 1 [Default = 0]

mathi2i

mathi2i (Sep 20, 3013)
  Basic pixel operations (+,-,*,/,max,min) between images
Syntax:
  mathi2i [options] input-image-name input-image-name output-image-name 
Options:
  -a|s|m|d  Performs image addtion, subtraction, multiplication or division respectively
  -max|min  Minimum or maximum of the two values at each pixel
  -and|or   Boolean operation: zero -> 0, non-zero -> 1, result is always 0 or 1
  -S n1 n2  Scale(multiply) 1st and 2nd images by n before performing operation
  
Notes:
  All calculations are done as floating point. Output images is integer truncated to [-32767:+32767].
  If either image image value is -32768 ("no data") then output is always -32768.
  Division by zero is undefined and result is -32768 ("no data") at that pixel.
  (you can make "no data" pixels show up as red(R) with the command: play -P -32768 R ...)

maxima

Usage:
 % maxima [options] input_file output_file
Identifies 3D image maxima (peaks). The all non-maximal pixels are
set to zero, unless the -F options is used. Then, non-maximal pixels
are preserved and maximal pixels are set to the specified value.
Options:
   -T n   maximum threshold value n
   -7     maximum if > 7 of 8 neighbors
   -E     define maximum as > or = (mutally exclusive with -7)
   -F n   flag maximum pixels with value n
   -Z     z-axis maximum only
   -R     input image is 4-byte floating point
If the output is omitted, the output is an ASCII list of
maxima positions as (x,y,z,intensity)i sent to stdout.

normbg

Usage: % tranima [options] inputfile outputfile
  Input file   image file name
  Output file  image file name.
Options:
   -roi xleft ybottom xright ytop
   -smooth nplanes (+/-planes to smooth, default=0)
   -zref zplane (default=1)
   -skip zstop zstart (repeat as needed)
   -corrbg  (correct planes for dark errors, default is no)

nv-coloc-analysis

Syntax: nv-coloc-anal.csh results[.txt] folder1 [folder2 [ folder3 [...]]]

1) All the folders named on the command line will be analyzed. 2) Results of the colocalization analysis are appended to the named results textfile.

  If the results textfile does not exists it will be created.

openclose2d

openclose   2D gray scale erosion(min) and dilation(max)
  Input  file   The image to be filtered.
  Output file   The filtered image.
Options:
  -open r       erosion->dialtion over radius r (pixels)
  -close r      dilation->erosion over radius r (pixels)

OTFz

Syntax: OTFz psf[.i2i] z-spacing(um) wavelength(um) NA(objective) nD bead(um)


OTFx

Syntax: OTFx psf[.i2i] pixel-size(um) wavelength(um) NA(objective) bead(um)


OTFy

Syntax: OTFx psf[.i2i] pixel-size(um) wavelength(um) NA(objective) bead(um)


padima

Usage:
 % padima [options] input_file output_file
Pads an image (on both sides) in X, Y and/or Z
Options:
  -B n   Extent of padding in XY
  -X n   Extent of padding in X
  -Y n   Extent of padding in Y
  -Z n   Extent of padding in Z
  -V n   Value of padding pixels (def=0)
  

reduceima

REDUCEIMA reduces image resolution and size by binning
  Input file    Image file name.
  Output file   Image file name.
Options:
   -sets n      Specifies the number of 3-D image sets.
 set the binning factors: start(1 is first pixel) end(-1 is last pixel) incr(-1 is last-first+1)
   -X n n n     X axis start, end and increment in pixels
   -Y n n n     Y axis start, end and increment in pixels
   -bin bx by   Equivalent to: -X 1 -1 bx -Y 1 -1 by
   -Z n n n     Z axis start, end and increment in pixels
   -P           Same as -Z 1 -1 -1
   -N n n n     Time axis start, end and increment in pixels
   -S           Eliminate axes of size 1 on output
 set the binning mode
   -T           Keep total(sum) of pixels
   -A           Keep average of pixels
   -L           Keep lowest(minimum) pixel
   -H           Keep highest(maximum) pixel (DEFAULT)
   -M           Keep median (not mean!) pixel
   -when        Keep Z position of lowest|highest|mean pixel (combine with -L|-H|-M)

radcolpsf

RADCOLPSF: Radially averages psf images
  Input file    An image file to be radially averaged.
  Output file   The averaged image file.
Options:
  -C n n   Center of rotation (x,y)

ratio2wl

syntax: ratio2wl fura[.i2i] threshold(WL-1) [dark[.i2i]]


register

Usage: register [options] in-image out-image
  in-image      images to register
  out-image     registered images
Options:
  -SSC          Stochastic Sign Change method (default)
  -range dx dy  +-range to register
  -first        always register to 1st Z plane

RITS-fusion-analysis

Syntax:

 RITS-fusion-analysis filename-root event_no.

RITS-process

This is the main application to fit RITS fusion model to TIRF time-series images

Syntax: RITS-process RFP[.i2i] GFP[.i2i] rootname

1) the coordinate textfile must be rootname.txt
2) images are named rootname_r|g_###.i2i
3) individual output graphs are named rootname_###.ps
4) the files of collected graphs are named rootname.ps and rootname.pdf

Necessary files:

   RITS-select-event
   RITS-fusion-analysis
   RITS-2D-fusion-analysis-exe
   RITS-2Dto3D-fusion-analysis-exe
   RITS-fusion-analysis.par

RITS-select-event

RITS-select-event RFP[.i2i] GFP[.i2i] x0 y0 radius z0 z-before z-after rootname id


rotateima

Usage: % rotateima input_image outputimage
  Input file    3D An image file to be rotated.
  Output file   3D The rotated image file.
Options:
  -F file      File containing 3D transformation matrix
  -C n n n     Center of rotation (x,y,z).
  -S n n n     Scaling applied to X, Y, and Z axes.
  -R n n n     Rotation about X, Y, and Z axes (degrees).
  -P n         Perspective (distance to eye in pixels)
  -D nx ny nz  Fix the output image size as nx,ny,nz
  -arrow x0 y0 x1 y1
               Defines an arrow from tail (x0,y0) to tip (x1,y1).
               Image is rotated within the XY plane such that the
               arrow is pointing up (increasing Y).

rotproj

ROTATEIMA: Produces a sequence of 3D image rotations and
           projections of varying image attributes
  Input file    An image file to be rotated.
  Output file   The rotated image file.
Options:
  -M n       Projection mode: n=1  voxel SUM,
                              n=2  voxel MAX,
                              n=3  SUM w/opacity.
                              n=4  RANGE shading
  -K n       Optical Density factor: OD = n * intensity
             (when mode=3)      opacity = OD/(1+OD)
  -T n       Intensity threshold
  -I c       Interpolation N|L (Near-neighbor | Linear)
  -C n n n   Center of rotation (x,y,z).
  -S n n n   Scaling applied to X, Y, and Z axes.
  -R n n n   Rotation about X, Y, and Z axes (degrees).
  -P n       Perspective (distance to eye in pixels)
  -V n n     Viewport size (X, Y)
  -Z n n     Z-dimension clipping planes (zmin,zmax)
  -A n n n   Start, stop, delta rotation angles (deg)
  -F         Flag pixels outside data bounds with -32768

scaleima

Usage:
 % scaleima [options] input_file output_file
Options:
  -Z z1 z2 dz scale   Re-scale intensities of Z-planes
                      z1 to z2 stepping dz by scale
  -V                  Verify -- list scale factors
Notes:
  Multiple Z ranges may be specified.
  Z ranges may be specified in arbitrary order.
  Any Z-plane not specified is scale by one(1.0)
  Maximum of 32767 Z-planes allowed.

segment

Usage: % segment [options] input_image output_image
Options:
 -sets n       Specifies the number of 3-D image sets.
 -X n n n      X axis start, end and increment in pixels
 -Y n n n      Y axis start, end and increment in pixels
 -Z n n n      Z axis start, end and increment in pixels
 -N n n n      Image set start, end and increment in pixels
 -I n          Include n'th Z plane in repeat series given by -Z option
               (planes in repeat series are number from 1 to z-increment)
 -ROI x0 y0 x1 y1  Corners of a rectangular region to segment
               (alternative to -X and -Y options with increments of one)
 -flag n       Flag padding pixels with intensity n (default = -32768)
 -S            Eliminate axes of size 1 on output
Notes:
 -I option can be used to reorder planes in series.
 If the region of interest extends outside of XY plane,
 the segmented image is padded with the flag value(-flag)

signalmass

During a Ca2+ "spark", free Ca2+ (diffusion coefficient, D = 250 μm2/s) and Ca2+ bound to fluo-3 (D = 22 μm2/s; Smith et al. 1998) quickly diffuse away from the spark release site as Ca2+ continues to be discharged. To quantify the total fluorescence arising from the binding of fluo-3 to the discharged Ca2+(i.e., the Ca2+ signal mass), the increase in fluo3/fluo4 fluorescence ) must be collected from a sufficiently large volume to provide a measure of the total quantity of Ca2+ released. Custom software was used to process the images and extract signal mass information for each spark event. The signal mass time course for each spark was computed from the two-dimensional, widefield fluorescence images of fluo-3 according to the following equations.

Total fluorescence,

 Ftotal(t)= SUM[F(x+∆x, y + ∆y, t)].

The fluorescence F is summed over a 13.7-μm square region (41 pixels on a side in the x-y plane) surrounding the spark epicenter pixel (x,y) as determined from the ΔF /F0 images from Formula 1.

Signal mass,

 sm(t) = G*(Ftotal(t)-Ftotal(t0))

The signal mass sm(t) is the change in total fluorescence FT(t) over the baseline fluorescence FT(t0) times the detector gain G (see below). The time t0 corresponds to the image immediately preceding the beginning of the spark. The beginning of the spark event was identified as the first image having a flux, i.e., an increase in total fluorescence (FT) relative to the preceding image, exceeding 2 SDs of the noise(1).

(1) Dynamics of signaling between Ca(2+) sparks and Ca(2+)- activated K(+) channels studied with a novel image-based method for direct intracellular measurement of ryanodine receptor Ca(2+) current.

   ZhuGe R, Fogarty KE, Tuft RA, Lifshitz LM, Sayar K, Walsh JV Jr.
   J Gen Physiol. 2000 Dec;116(6):845-64.

Syntax:

 signalmass radius [SF] < listfile > outfile

where:

 radius is the halfedge size of bounding box
 SF is the [optional] scale factor for scalnge the dF/Fo traces (default=1)
 listfile is the spark|puff|syntilla description textfile
   |filename  x  y  z
   |          x  y  z
   |filename  x  y  z
   |          x  y  z
 outfile is the table of signalmass statistics
 

SLMrecon

SLMrecon phase0[.i2i] phase120[.i2i] phase240[.i2i] output-image[.i2i]
  Structure illumination optical sectioning according to T.Wilson
Options:
   -S n  SL reconstruction image scale factor (default: 1.0)
   -WF filename[.i2i]  Save sum of three phases as WF image

SLMreconS.csh

syntax: SLMreconS root{-0.i2i,-1.i2i,-2.i2i}

  root-0 is phase 0, root-1 is phase 120, root-2 is phase 240
  

spectrum

Usage:
 % spectrum [options] input_file output_file
Computes 2D FFT of image. The output file is complex FFT
(.cxi file) unless -M or -E option used(.i2i file).
Options:
 -A        Apodize image with raised cosine window
 -Z        Pad image with zeros (default)
 -P        Pad image with mean-gray-level
 -M        Compute magnitude spectrum(not -E)
 -E        Compute energy spectrum(not -M)
 -C        Center spectrum at N/2(with -M or -E)
 -LOG      Log transform of magnitude or energy spectrum
 -DC       Zero the DC component of FFT
 -N x y    FFT size (Nx by Ny)
 -S x y    Pixel size in X and Y(def=1,1)
 -F image  Filter input_file using image as Fourier mask
 -xlines dist order(s) width
           Filter input_file using X layer lines where:
             dist   is no. pixels to layer line
             orders are the line(s) to include
                    terminated with a zero.
             width  is of number of lines about this line
 -ylines dist order(s) width
           Filter input_file using Y layer lines
 -R x y    Filter out components within radius n of DC
Notes:
 -A  option scales spectrum by 1/mean-squared-value of
     apodization window function
 -S  option scales spectrum by pixel area
 -F  Alternative to creating a convolution kernel

sqrtima

sqrtima [-S n] inputfile outputfile


statima

Copyright 2010 University of Massachusetts Medical School and the Biomedical Imaging Group
All rights reserved. Explicit permission to use this program must be received prior to use.
Usage: statima [options] imagefile [textfile]
  Imagefile     An image file name (extension optional)
  Textfile      Optionally write statistics to file
Options:
  -sets n Specifies the number of 3-D image sets.
  -X n n  left and right X coord for Region-Of-Interest
  -Y n n  bottom and top Y coord for R.O.I.
  -Z n    Statistics on single Z plane = n
  -E      Statistics on each Z plane
  -P      Mean and variance of positive(>0) pixels.
          Sets threshold equivalent to -T 0
  -T n    Pixels with intensities less than or equal (< or =) n are ignored
          Default is no threshold unless -P is invoked (see above)
          Combine with -P to change threshold
  -SE     Standard error instead of standard deviation
  -S      Show image statistics (default)
  -H      Show image gray level histogram in portrait format (default)
          Combine -H -S in this order to show both statistics and histogram
  -L      Show image gray level histogram in landscape format (not implemented)
  -silent Redirects sdterr to /dev/null
Example:
  % statima -X 101 150 -Y 41 70 -T 10 -E -S my_image
shows just the image statistics of those pixels greater
than ten(10) in a 50 by 30 pixel rectangular region,
Z-plane by Zplane, in the image in file my_image.i2i

thresholdima

Biomedical Imaging Group
University of MA Medical School
Copyright 2010
Syntax: %thresholdima [options] input_file output_file
  input_file    Image file name.
  output_file   Image file name.
Options:
  -T n   Threshold (<) intensity (default=0)
  -V n   Replacement value (default=0)
  -S     Subtract rather than threshold
  -R low mid high
         Triangular ramp function
           low    < low  -> 0
           mid    = mid -> mid
           high   > high -> 0
  -P n   Power of ramp function (default=1)
  

TIRFex

Usage:
 % scaleima [options] input_file output_file
Options:
  -z planes    the mean excitation distance for TIRF (default=0)
  -e fraction  the fraction of maximal excitation due to epi background (default=0)
  -zref plane  the z-plane where the relative TIRF excitation equals 1.0 (default=0)
Notes:

TIRF_WF

TIRF_WF [options, -h] inputfile outputfile


tranima

Usage: % tranima [options] inputfile outputfile
  Input file   Image file name.
  Output file  Translated image file name.
Options:
   -T x y z   Translation in X, Y and Z
              (Positive translation is right, up, rear)
   -rotate    Translations are circular (DEFAULT)
                - what goes off the edge wraps back on the opposite edge.
   -shift     Translations are not circular
                - what goes off the edge is lost
                - image is padded with -32768
Translations are rounded to the nearest integer value.


transp

Usage: % transp [option] inimage outimage
Options:
  -sets n  Number of image sets (4-D: default=1)
  -XY      Transpose X and Y axes
  -XZ      Transpose X and Z axes
  -YZ      Transpose Y and Z axes

Signal-Processing

These programs work in the time domain on simple 1-D or 2-D (x|t,y) data


digfilt

NAME
     digfilt - abstract
SYNOPSIS
     digfilt [options] <stdin >stdout
DESCRIPTION
     digfilt...
     digfilt has the following options:
     -lowpass Hz       -3dB frequency
     -highpass Hz      -3dB frequency
     -timestep seconds  Sampling interval
EXAMPLES
SEE ALSO
NOTES
CAVEATS
LAST REVISION
     --/--/--
BUGS

pdcr

Prints out columns of file Usage: pdcr [options] {file|-} options:

-c n # of columns -p n # of points to print out


straighten

Computes average pixel intensity along a single curve
traced using planimeter program by mapping pixels to
closest(euclidian distance) point along the line.
Only points within a given distance from the line (-s
option) are used and ONLY positive pixels are mapped.
Usage:
  % straighten [options] image rptsfile [image]
where
  image     input image file name
  rptsfile  points along cell center line (planimeter)
  image     optional output image file name where output
            image pixels contain average intensity at 
            position on line to which pixel was mapped
            (ALL pixels are mapped for this operation)
Options:
  -S n      Maximum dist from centerline (def=nearest)
  -N        Normalize the center position [0..1]
  -Z n      Do only Z plane = n 
  -P        Output image(optional) pixels replaced with
            line position instead of average intensity
  -A n      Normalize average along line to n
  -J        Replace pixel intensities in output image
            JUST under the curve.
  -NR       Do not rewind points file each time
  -V        Verbose mode
  -xmgr     Xmgr compatable output
  -neg      Allow negative values
line position (x) and average intensity (y) are 
sent to stdout and can be piped to graph|plot or Xmgr
Examples:
  % straighten -S 10 image1 image1.rpts | graph | plot
plots the average of those pixels 10 pixels or less from
the centerline given in image1.rpts
  % straighten -S 10 image1 image1.rpts > image1.graph
sends the output to the file named image1.graph
  % straighten -S 10 image1 image1.rpts image2
creates the pixel classification map instead