Boulder Laboratory for 3-Dimensional Electron Microscopy of Cells REMAPMODEL(1) REMAPMODEL(1) NAME remapmodel - to remap Z values and shift coordinates of a model SYNOPSIS remapmodel DESCRIPTION This program allows one to remap coordinates in a model, in two ways: 1) The set of Z values may be mapped, one-to-one, to any arbitrary new set of Z values; and 2) The X, Y or Z coordinates may be shifted by a constant. Also, a mapping can be set up easily for the case where serial section tomograms are being rejoined with different spacings. The program works by mapping from an old list of Z values to a new list of Z values. The old list is, by default, the list of actual Z values in the file, although you can enter a different list to map from. The mapping of Z values is done by first converting each Z value to the nearest integer, looking up the new integral Z value that you wish to map that integer to, then shifting the actual Z value by the difference between the new and the original integral value. The new list of Z values should have the following form. Use ranges (e.g. 0-3,5-7,10-8) to specify a list of integers with the same number of Z values as in the list of values being mapped. The latter Z values will be mapped one-to-one onto the new list. Enter numbers between -999 and -990 to delete points with a particular Z value; e.g. if the input model has Z values from 0 to 9, entering 0-4,-999,5-8 will delete all points with Z between 4.5 and 5.5, and shift the Z of points with Z greater then 5.5 down by 1. If the input model has Z from 0-19, entering 0-9,-999--990 will remove all points with Z from 10 to 19. Enter the single value -1 to replace each Z value by its negative. Remapmodel uses the PIP package for input (see the manual page for pip) and can take input interactively for a basic mapping of existing Z values in the model. The following options can be specified either as command line arguments (with the -) or one per line in a command file or parameter file (without the -): -input OR -InputFile File name Input model file. If this option is not entered, the first non-optional argument will be used. -output OR -OutputFile File name Output model file. If this option is not entered, the second non-optional argument will be used. -old OR -OldZList List of integer ranges List of Z values in the input model that are to be remapped. The default is the actual list of Z values, which could have gaps that make it difficult to compose the list of values to map to. -full OR -FullRangeInZ For the list of values to remap, use the complete range from 0 to NZ-1, where NZ is the Z size of the image file that the model was last loaded on, determined from the model header. -new OR -NewZList List of integer ranges List of Z values to map old list to. There must be as many values in this list as in the list of Z values to remap. See notes above on the contents of this list. -add OR -AddToAllPoints Three floats Amount to add to all coordinates in X, Y, and Z, after remapping -reorder OR -ReorderPointsInZ Integer Go through each contour and reorder the points so that they are monotonically increasing in Z (for an input value of 1) or monotonically decreasing (for a value of -1) -fromchunks OR -FromChunkLimits Multiple integers To remap Z values after changing the spacing between sections in a joined set of serial section tomograms, enter the original starting and ending slice for each tomogram in the join (start1, end1, start2, end2, etc). If a tomogram was inverted in the join, be sure that the high Z number is listed as the start and the low Z number is listed as the end. -tochunks OR -ToChunkLimits Multiple integers The new starting and ending slices for each tomogram in a serial section join, in the same format as for -fromchunks. When these two options are entered, none of the other mapping options (-old, -new, -full) can be used. -help OR -usage Print help output. -StandardInput Read parameter entries from standard input. The program will accept input interactively if started with no command line arguments; the interactive entries to the program are: Name of input model file Name of output model file New list of Z values. See notes above on the format of this list. In addition, you can enter "/" to take the input list without modification. Amounts to add to all X, Y, and Z coordinates. These values will be added after the remapping of Z values, if any. Values should be in units of pixels (image index coordinates). IF your new list of Z values is not in monotonic order, enter 1 to have the program reorder the points within each object so that they occur with monotonically changing Z. This option would be used if you wanted to switch two sections within a stack. HISTORY Written by David Mastronarde, 5/8/89 DNM 7/20/89 changes for new model format DNM 2/20/90 changes to negate Z and reorder by Z DNM 10/27/06: Convert to PIP and provide new options for tomogram joins