Skip to content

Angular_assign_for_tilt_series

Adrian Quintana edited this page Dec 11, 2017 · 1 revision

angular_assign_for_tilt_series

Purpose

This program aligns the projection images of a single axis tilt geometry without the use of landmarks. For doing this, the program computes "virtual" landmarks with the help of affine transformations. Then these 2D landmarks are used for finding 3D landmarks, and finally the images are aligned.

The alignment can be performed on small sized images (for speed reasons) and the alignment applied to the original size images. For doing this, use Scale or Pyramid and provide the scaled images with -i and the original images with -iorig.

The program writes intermediate files (like the affine transformations and the 2D landmarks). If the program is restarted and it finds any of these files, the corresponding computation will be skipped. To make sure all computations are done remove the files called "affine*.txt" and "*_landmarks.txt".

The program can be divided into 3 steps: 1. Computation of affine transformations; 2. Computation of 2D landmarks; 3. Landmark alignment. Each of the parameters below affects mostly to one of these steps. If the intermediate files for each one of the steps are found, the program will not redo that step. Step 3 is always performed.

The programs produces a docfile with the angles and shifts of each image called "_assignment.txt", and a set of aligned images "corrected". The program also produces a docfile with the alignment parameters used for the images (in-plane rotation and shift) called "_correction_parameters.txt". First translate by -shift and then apply a rotation by the given angle.

The program may be called twice (the second time with the output of the first run as input). The rationale of the two calls is that in the first run there may be many features in the images which are uncommon to the rest of the images in tilt series if there are large shifts. The first run will remove most of these extra features, but the output will be biased by them. The second run has many less extra features and the alignment may be more accurate.

WARNINGBefore going into reconstruction carefully look at the output of the algorithm to make sure that the alignment is correct. In particular:

  1. Check that all correlations in the affine computations are of the same order. If they are not, remove the corresponding "affine*.txt" file and restart the algorithm with different maximum shift parameters.

  2. Check that the shift and rotations found by the affine transformations make sense. Specially, make sure that the shift parameters found are not in the limit given by the maximum shift allowed. If this is the case, delete the corresponding "affine*.txt" file and restart the algorithm with different parameters for the maximum shift.

  3. Check that there is a sufficiently high number of landmarks (in the order of thousands). If there are not, remove the "*_landmarks.txt" file and rerun the algorithm with a lower threshold for the correlation.

Usage


$ angular_assign_for_tilt_series ... 


I/O Parameters

  • `` Images within the tilt series. The header of the images must contain the tilt angle and must be of the form (0, tilt, 0). UseHeader_assign to assign the angles. Images in the selfile must be sorted in ascending order of tilt. The tilt step may vary from one image to the next.
  • `` Selfile with the originally sized images
  • `` Rootname for the output files. If not given, it is taken from the input selfile.

Parameters for the affine transformations

  • -maxShiftPercentage [shift0.2]
  • -maxIterDE [N20] = Maximum number of Differential Evolution iterations. More iterations allow for a better finding of the global maximum but it also takes more time.
  • `` If this option is set, after aligning any two consecutive images, the algorithm will show a number of images related to the process called PPP*.xmp. These images help to check if the affine transformations are correctly computed.
  • -thresholdAffine [corr0.85] = Minimum correlation between any two transformed consecutive images so that they are considered to be correctly aligned by the affine transformation. The Differential Evolution is run a number of times between 3 and 10 until this threshold is achieved. If in the 10 runs it cannot achieve this correlation, then the best correlation found is used.
  • `` Use this option if the transformation between one image and the next is not too wild. This should be your first option to try since it is much faster than using DE. In case it does not work for some of the images (you can detect through the Cost between image i and i+1, then you should edit the _transformations.txt file, delete the line corresponding to image i, and restart this program with the DE options.
  • -pyramid [level0] = The affine transformation can be computed using a whole image pyramid. Level=0 represents the current image size, Level=1 is half the current image size, Level=2 is a quarter, ...

Parameters for the 2D landmarks

  • -threshold [corr0.9] = Minimum correlation between two patches to be considered to come from the same virtual landmark.
  • -gridSamples [n40] = How many grid samples are taken on each side of the projection images. By default 40x40 grid points are taken as possible landmark chain seeds.
  • -seqLength [n5] = Minimum sequence length for the landmark chains. If there are too few landmark chains, you may try to lower this parameter to 4. This parameter should never be smaller than 4.
  • -maxStep [n4] = The landmark chains are checked up to this limit. The higher this value, the more consistent they are.
  • -localSize [size0.04] of the total image size).
  • `` Critical points are the darkest points in the images that are also local minima (usually this corresponds to goldbeads, but you don't need to have gold beads to look for the critical points). This option is much faster than the grid search and if you have gold beads, it works better. Nseeds is the number of critical points to use in each image. They will start landmark chains expanding for a length seqLength.

Parameters for the image alignment

  • -deltaRot [delta5] = Angular step for the search of the tilt axis. This affects the first exhaustive search performed. Later, a continuous search around the maximum is performed. .
  • -psiMax [psi-1] = Maximum in-plane rotation allowed for each image. If psiMax=-1, then the in-plane rotation is not optimized.
  • `` By default, the tilt axis is supposed to be in the XY plane (i.e, tilt=90). If this option is set, the tilt angle of the tilt axis is searched in a continuous way around its maximum in the XY plane.

Parameters for computing speed-ups

  • -thr [num1] = Specifies the number of concurrent threads will be used to carry out computations. This is specially useful for reducing computing times on multi-core and other shared memory platforms.

Examples and notes

A simple use of this program is


$ angular_assign_for_tilt_series -i experimental.sel -localAffine -useCriticalPoints 20


For a better control of the affine transformation computations you may use, for instance, for large shifts and low correlating images


$ angular_assign_for_tilt_series -i experimental.sel -maxShiftPercentage 0.5 -thresholdAffine 0.75


For a better control of the 2D landmarks detection use


$ angular_assign_for_tilt_series -i experimental.sel -threshold 0.7 -seqLength 4


--Main.CoSS - 19 Aug 2008

Clone this wiki locally