Boulder Laboratory for 3-Dimensional Electron Microscopy of Cells

EDMONT(1)							   EDMONT(1)

NAME
	edmont - to move images into, out of, or between montages

SYNOPSIS
	edmont

DESCRIPTION
   A GENERAL MONTAGE EDITOR TO MOVE IMAGES INTO, OUT OF, OR BETWEEN MONTAGES
   It can float the images to a common range or mean of density, scaling all
   of the pieces in a section by the same amount.
   It can output only the pieces that intersect a defined subset of the image
   area. 
	  
   If there are piece coordinates in the extended header of the image file,
   the program will transfer those coordinates to the output file.  These
   coordinates can be used instead of ones from a piece list file.  If one
   wishes to have sections numbered sequentially from zero, the Z coordinates
   in the header of the output file will be modified appropriately.  
   
   All inputs are prompted interactively.  The input is as follows; lines
   starting with IF are entered only if a particular option is selected.

   Number of input files, or -1 to enter list of files from a file

   IF you enter a number >0, then for each input file, enter two lines:
   .	Image file name
   .   Piece list file name. or Return to use coordinates from image header
   .	list of section numbers to take from that file.  The sections numbers
   .		correspond to the Z values in the list of piece coordinates.
   .		Ranges may be entered (e.g. 0-4,5,7-9)

   OTHERWISE, IF you enter -1, then enter the name of the file with list of
   .		files and sections.  The format of this file should be
      Number of input files
      Image file name
      Piece list file name, or blank line to use coordinates from image header
      list of section numbers, ranges allowed (e.g. 0-3,5,7-9)
      next file and list of sections, etc.

   Number of output files, or -1 to enter list of files from a file

   IF you enter 1, next enter:
	the name of the single output image file
	the name of the output piece list file, or Return for none (but only
   .      if the input file header has piece coordinates)

   OR IF you enter a number >1, then for each output file, enter three lines:
   .	Image file name
	Piece list file name, or Return for none
   .	Number of sections to put in that file

   OR IF you enter -1, then enter the name of the file with the list of files
   .	and numbers of of sections.  The format of this file is:
      Number of output files
      Image file name
      Piece list file name, or blank line for none
      number of sections to place in that file
      next file and number of sections, etc.

   The minimum and maximum X, and minimum and maximum Y coordinates of the
   	area that you want to include in the output file.  All pieces that
   	intersect this area will be included.  Enter / to include all pieces
	regardless of X-Y coordinates.

   1 to enter a list of points marking individual pieces that should be
	excluded, or 0 to skip this option.
	  
   IF you enter 1, next enter the name of a text file with a list of X, Y,
       and Z coordinates, one set of X,Y,Z per line.  Each point should be
       located within a piece to be excluded.

   The data mode of the output file, or / to take the same mode as the first
   .	input file.  Mode can be 0 or 1 for integer*1 or 2, 2 for real*4, or 9
   .	to 15 for 9 to 15 bit values.

   0 for no floating of densities, 1 to float densities so that each section
	occupies the same RANGE of densities (the optimum range for the
 	particular data mode), or 2 to float so that all scetions have the same
	MEAN and STANDARD DEVIATION of density.  Either kind of floating
	requires the input sections to be read twice.   

   1 to renumber output sections sequentially from zero in each output file,
	or 0 to leave all Z values the same as in the input files.  This option
	is the most convenient way to close up gaps in an image file if some
	sections are being deleted.

   IF you specify only 1 input and 1 output file and they have the same name,
	  and you select all sections in the input stack, with all pieces
	  included and no change of data mode, then you have the option of
	  rewriting pieces to the input data stack.
	  Enter 1 to rewrite the data to input stack, or 0 to write the data to
	  a new file.
	  If you do rewrite the data, then no new file of piece coordinates is
	  produced.  However, coordinates in the extra header may be modified
	  and rewritten.

   If floating is not selected, data is rescaled uniformly, if necessary, to
   fit a new output data mode.  If the input file has real data (mode 2) that
   is not confined to the range 0-255, and you are converting to another
   mode, then you must specify one of the two kinds of floating, otherwise
   the program will fail.

HISTORY
  Written by David Mastronarde, 5/9/89
  1999: added ability to knock out pieces.
  1/3/00: made it handle extra header data, made scaling logic more
  like NEWSTACK and made sure it could handle negative integers. 
  10/24/00: made it actually use coordinates in header and renumber
  sections sequentially.