Name

Usage

Usage in command lines:

Usage in python programming:

Input

tifdir
directory in which files to be converted are put

Output

micdir
directory in which converted files are saved

Options

--inx
input file extension. It is tif by default.
--foc
film or CCD . If foc=f the intensity of film will be converted into optical density(OD).
--ext
output file extension.
--cst
invert contrast or not. cst=-1 will invert the contrast of converted files.
--Pixel_size
The Pixel_size of the final dimension-adjusted image. When it is set as negative integer number, the program will simply use non-gridding method to reduce the image dimensions integer times.
--sca_a
parameter a for OD ( linear ) transformation.
--sca_b
parameter b for OD ( linear ) transformation.
--step

scanning step size. Use 1000 `Å` as unit.

--mag
magnification of the image, use k as unit. For example, 40,000 magnification is input as 40.

Description

  1. This command converts raw image files( scanned films and CCD frames, could be saved in tif or mrc format) to hdf format files or other formats.
  2. The converted files are allowed to keep the raw file (tif file) root name, assigned a prefix mic_, and user-defined extention.
  3. The two scanners are all calibrated using Kodak photographic tablet No.3 . The OD ranges from .05 to 3.05.
  4. The actual first linear parameter is always less than zero. User has to check the local scanner to find these two parameters.
  5. The number of raw image is taken as the micrograph number or (ID).
  6. . sca_a set as 1 scanned by the scanner in Pawel's Lab
    • `OD=-1.883*log_(10)((I-1)/(2^16-1))+0.0669` 

    • sca_a set as 2 scanned by the scanner in Dowhan's Lab
    • `OD=-1.609*log_(10)((I-1)/(2^16-1))+0.012` 

  7. Pixel_size of raw image can be calculated from scanning step size `"Step"`, and magnification if the image`"mag"` is recorded by film.

    • `"Pixel_size_raw"="Step"/"Mag"`

    • If the image is recorded by CCD, the Step should be camera scan step size.
    If the Pixel_size is by far too large for image processing,( This is mainly due to improper choise of image magnification), an image dimension adjustment is required. So the final Pixel_size is:
    • `"Pixel_size"="Step"/"Mag"*"decimation"`

  8. The image dimension adjustment is achieved by using gridding algorithm,which allows user to do non-interger scaling ratio.However, gridding method requires 2 times padding of the original image. Hence the image size in core for processing will be increased to 4 times of those directly converted images. (For exmaple, a normal scanned film in SPIDER format has size 478 M bytes .Padding will increase the image size to 1.92 G bytes.) So it would be good for the user to check the memory of proccessors of the computers before using this option. In case of insufficient memory, simply set the Pixel_size as the decimation value, and put negative sign to denote non-gridding algorithm. The program will switch back to conventional size reduction method, and use DECIMATE value instored in pixel_size to reduce image integer times.

Method

Reference

None

Author / Maintainer

Zhong Huang

.See also image_decimate, resample

Keywords

category 1
APPLICATIONS

Files

sxcopyfromtif.py, applications.py

Maturity

stable
works for most people, has been tested; test cases/examples available.

Bugs

None. It is perfect.

sxcopyfromtif (last edited 2013-07-01 13:12:38 by localhost)