Navigator Align Setup Dialog

This dialog allows parameters to be set for the Align to Template task, which can be run either from a script command or from the Navigator during the Acquire at Items procedure.  A subset of these parameters govern whether image shift is reset after an alignment and are also used for the Realign to Item operation when it is run from Acquire at Items.

A template is an image of some generic feature, like a hole in the carbon film, to which other images can be aligned.  Aligning to a template requires specifying two things: where the image is, and how to acquire an image for aligning to it.  Both pieces of information are provided by specifying a Navigator map image to use as the template.  Typically a template will be a small image, and the image to be aligned would be much larger.  To allow for this, a template map can be created with a special feature: the Navigator values for the map size indicate the size of the image to acquire rather than the size of the image itself.  This is possible within SerialEM by cropping the template from a larger image.  The program keeps track of the original size of the image, or montage piece, from which an image is cropped, and assigns this to the map size values when the image is made into a map.  This original, uncropped size is also stored in an '.mdoc' metadata file along with the other information about the acquisition conditions, so it is possible to reopen a file (even one from another session), reread the image, and make it a template map.

If you want to align to the template with images smaller than the typical full-field ones, you can acquire an image of whatever size you prefer and crop the template from that.  However, this should not be necessary if you specify an appropriate maximum distance for the alignment shift.  You can also use an uncropped image taken with a camera subarea, but this will constrain the size of the image taken for realigning to be the same size as the template, which may not work well if the image is not big enough to contain the entire feature of interest when it is displaced by the maximum allowed distance.

Parameters for Aligning to a Template

Label of Navigator map with template

The map to use is found by its label.  Enter either the label of an existing map, or the label you want to assign if you are going to make a map from a cropped image in buffer A.  The label should be unique.  The line below will indicate whether the item does not yet exist, whether an item withat label is not a map, or whether it is a montage map, which is not allowed.  The tests for whether the label exists are case-insensitive.

Make Map from Image in A

This button is enabled if there is an image in buffer A that has not been made a map yet (has no map ID value).  Press this button to make it a map.  If it is not saved to file yet and it is either a cropped image or cannot be saved to the current file, the browser for specifying a file name will open.  If the image can be saved to the current file, then you can choose whether to do so or to save it to a separate single-image file; in the latter case, the browser then opens.  The program will make a map and close the file if it opened one.  Then a dialog will open with a text box for setting the label of the map.  If you already had an entry in the Label text box above and there was not already an item with that label, it will offer that label.  Otherwise it will offer the automatically assigned label, which you are free to change, as long as what you enter is not the label of an existing item.

Maximum alignment shift

Enter the maximum shift in microns that will be allowed in the alignment to the template.  This should be less than half the center-to-center distance between adjacent features, to prevent the program from aligning on a feature farther from center than the likely target.

Parameters for Handling Image Shift after Alignment

Both Align to Template and Realign to Item have the ability to finish by resetting image shift if it is above a threshold, moving the stage to compensate, and restoring the alignment with a new image.  As the verbose lines in this section of the dialog indicate, the settings specified here are applied for both procedures: when running Align to Template from Acquire at Points, as defaults when running the AlignToTemplate script command, and when running Realign to Item from Acquire at points.

Reset image shift and realign if > D microns

Check the option to enable restting of image shift, and fill in the text box with a threshold in microns above which it will be reset after aligning to the template.  The realignment is done by aligning a new image to the previously acquired image, not to the template.

Reset IS up to N times

Set the spinner to the maximum number of image shift resets to do.  If image shift is still above the threshold after one reset shift and realign, the program will do another iteration, up to this limit.

Leave IS at 0 (skip last realign)

Select this option to leave image shift at zero and thus leave a little misalignment in the image.  This is accomplished by doing a final image shift reset when the image shift is below threshold (which might occur right after alignment to the template), and not realigning with another image.  This final reset counts towards the maximum.  If the maximum is 1, it will simply reset the image shift after aligning to the template, and not acquire another image.