EMTOOL is a program for interactive image processing, primarily intended for the transmission electron microscopy community. Unlike most EM image processing software currently available, EMTOOL is highly interactive, allowing for real time manipulation of brightness, contrast, scale and many other parameters. It is not, nor is it ever likely to be, a 3d reconstruction package. Rather it is designed for use in preprocessing images for 3d analysis, or doing generic image processing for 2d visualization purposes. It has a variety of features for translating, rotating, filtering and doing image format conversions. It also has tools for interactive boxing of particles from micrographs or micrograph fragments, and manipulating the box database so the same particles can easily be boxed from a focal pair. There are really too many features to discuss in detail in the introduction. The manual is divided into 2 parts. First, are short tutorials, describing how to perform various activities with EMTOOL, and second is a general reference. In addition, the program has on-line help describing the function of individual buttons and menu items.
In this manual, text that appears in bold usually indicates that this text is referring to a button or menu item in the program which has the name in bold.
EMTOOL is started by simply typing 'emtool'. There are no command line arguments. Once it's running, the first thing we need to do is set a few preferences. Go to the Tools menu and select Preferences. A panel will appear with several numerical fields and 2 checkboxes. The numerical fields are used as defaults throughout the program, so fill them in if you know them. The first 2 fields are the chromatic and spherical aberrations of the microscope you typically record your images on. The chromatic aberration is used only in one infrequently used part of the program, so it's not too important to enter this. The spherical aberration and the accelerating voltage (in kilovolts) is used when determining the defocus of a micrograph. If you don't plan on using this feature of EMTOOL, you can leave these alone as well. The last 2 numbers are the typical magnification you take images at, and the pixel size (in microns) of the scanner used to read the images in. These values are defaults only, and are used to calculate the pixel size of the images (in angstroms). These values are used only if you calculate the FFT (fast Fourier transform) of an image, and then make measurements on the transformed image.
Finally, there are 2 checkboxes. The FFT valid only option, if selected will force the program to only box out images with sizes that can be FFT'ed. For those not familiar with the FFT, don't worry about this option for now. Just leave it selected. The other checkbox is a bit more important. Private Cmap determines whether EMTOOL will allocate its own X-windows color map, or just use the system colormap. Using a private colormap may cause some of the menus to be cut off at the bottom of the window, and if you have an 8 bit display, you will see color changes as you move the cursor in and out of the EMTOOL windows. However, this mode will give you a more complete greyscale for image display, especially if you are running other graphics intensive programs at the same time (like XV or Netscape). On a Linux box (with 8 bit colormaps), I would suggest selecting this option. On SGI's with 24 bit colormaps, I suggest turning this option off. Please note that you must exit EMTOOL and start it again before changes to this option will take effect.
OK. Now we're ready to start looking at some images. EMTOOL can read a variety of common file formats. Currently it does not automatically recognize image formats, so you'll have to select the correct Open ... option on the File menu. MRC images are produced by a variety of programs such as ICE and boxmrc. The imagic format is a single or multi-image format used by the (commercial) 3d reconstruction package called imagic. The Spider format is similarly, produced by the (commercial) Spider package, although this format only allows single images in each file. The ScansALot format is produced by PDS scanners connected to PCs. Finally, the Picture format encompasses all generic image formats, including GIF, TIFF, PGM and others. To read GIF or TIFF images you will have to have the NETPBM package installed on your computer. This is a freeware package widely available on the net.
Once you select the correct Open ... menu item, a file selector will appear. For now, just select at single image and press OK. If everything goes well, you should see a new image entry appear in the Images list in the Control window. If this does not happen and you didn't get an error panel telling what happened, look in the terminal window you started emtool from. There may be a message there as well.
Assuming you successfully read an image, it's time to orient ourselves a little. You should see 3 windows on the screen. The Control and Mouse panels are described at the beginning of the reference section (3.1). Before continuing, please read through section 3.1 and optionally section 3.2.
To display a single image in the image view, simply select it by clicking on it in the image list. If you've loaded more that one image, you can select more than one image at the same time, but only if they are all the same size. When you first select an image, EMTOOL will try to pick good brightness/contrast settings for displaying the image. With certain types of images this doesn't work very well, so you might need to play with the Min/Max sliders in the Control window to make your image look good. Above the Min/Max sliders is a Histogram of the image. For those unfamiliar with histograms (hopefully not many of you), this is a plot which shows the density distribution of the pixels in the image. The image will typically look good if the Min/Max sliders surround the central peak in the histogram. It's possible to change the limits of the histogram by sliding the unlabeled slider just below it. When this slider is all the way to the right, the histogram (and the Min/Max sliders) cover the entire range of grey values in the image. If you slide this slider too far to the left, the histogram will begin to look like a bunch of discrete peaks.
OK, great, so you're looking at your image. What now? Most EM images will be too big to fit in the Image window at it's default size. There are a couple of ways of dealing with this. The obvious solution is to make the Image window bigger. You can go ahead and do this if you'd like, but it isn't an ideal solution for 2 reasons: 1) even if you make this window really large, it may still not fit the entire image and 2) emtool recalculates the Image window every time you move around or change the brightness/contrast. That means, the bigger you make this window, the slower EMTOOL will respond. For these reasons, it's best to keep the Image window as small as you're willing to tolerate.
The better solution is, of course, to pan around the image. This can be accomplished in several ways. First, with the mouse in the default Move mode, just click and drag around the image with the middle mouse button, or click on a feature in the image with the left mouse button to move it to the center of the Image window. Sometimes this isn't a convenient way to move around. For really large images, it can take a while to move across the entire image this way. To solve this problem, there is a panning control located to the right of the Histogram in the Control window. This square represents the size of the entire image. The position of the crosshairs in this box represents the part of the image you're looking at. This allows you to instantly go to a specific part of the image.
Finally, the last way to see more of the image is to Zoom out. The Zoom control, located just below the Min/Max controls allows you to zoom in and out of the image. By zooming out, you can get an overview of the large features in the overall image. At most you can zoom out by a factor of 10. This is sufficient to view an entire micrograph scanned at 14 microns in the default Image window.
Once an image has been loaded into EMTOOL, converting it to a different file format is as easy as selecting the appropriate Save ... option from the File menu. This should be pretty self explanatory with the exception of saving to Imagic files. Since the Imagic format supports multiple images per file, when you save to an Imagic file, EMTOOL will actually append the images to the end of an existing file. If you wish to start over and erase the old images in the file, you'll have to manually erase the old imagic file before you save.
When doing a 3d reconstruction from single particle images, it is necessary to locate the particles in the overall micrograph and to save each of these particles as a separate image. There is software to make this particle selection process semiautomatic. While such software works well for particles with high symmetry, such as icosahedral virus particles, it often doesn't work well on low symmetry particles. In any case, EMTOOL currently only supports manual particle selection. The exception to this is focal pairs. If you have a focal pair, EMTOOL will allow you to use the areas you've selected from the 1st micrograph in the focal pair to box out the corresponding areas from the other image.
Warning - memory usage
The first step in boxing particles from a micrograph is to read the micrograph into EMTOOL. One thing to keep in mind when reading large image files is memory consumption. Unlike some programs, all of the images loaded into EMTOOL are loaded completely into memory. A single micrograph at 14 microns will typically be about 5000x6000 pixels. Each pixel is stored as a floating point number meaning this 1 image will occupy 5000 x 6000 x 4 = 120 megabytes of memory. Loading this image on a machine with 64 megs of memory would be a very bad idea. EMTOOL will do it, but it will make your machine VERY slow as it swaps this much memory to/from the disk. The only solution to this problem is to break the image up into smaller pieces before boxing it. EMTOOL doesn't currently have any way of doing this automatically. You'll either have to do this in your scanning software or some other external program (or get more memory on at least one machine).
Once you've successfully read the image into the program, you can start boxing out the particles. To do this, enter the size of the particles you wish to box in pixels in the Size field in the Mouse window and put the mouse in Box mode. Now, just start clicking. When moving the mouse around the Image window it will now be followed by a red box. When you find a particle, center the box around it, then click the left mouse button. A permanent red box will then be left behind, and a copy of that portion of the image will be added to the 'Clips' Image Group. As you continue to select particles, you'll notice that each box also has a sequence number it for reference purposes. As usual, you can use the middle mouse button as well as the Panning control to move around the image. As you proceed you can Zoom out to see areas of the micrograph you haven't boxed yet. From time to time you should probably select Save Box DB from the Box menu. That way if the program crashes, there's a power outage, or some other calamity occurs, you don't have to start from scratch.
If you think you've got the micrograph completely boxed, and all the boxes are in the right place, the next thing to do is to save all of your boxed particles to files. Select the Clips Image Group, then select All of the particles in this group. If you'd like, you can take a look through the particles and get rid of any bad ones. The easiest way to do this is to put the mouse in ZAP mode and click on any particles you don't like (in the image view). These particles will then be moved to the Zapped image group. Once you've got just the particles you want to save, use one of the Save ... commands on the File menu. You might also want to save a record of where all of the boxes were located in the original image. To do this use Save Box DB on the Box menu.
If something DID happen while you were boxing your micrograph and you had done a Save Box DB at some point, recovering is fairly easy. Simply load the image into EMTOOL again, the use Read Box DB to load the old boxes back onto the image. At this point, the boxes will appear in the image, but you won't have a set of Clips of the boxed particles. To get a set of Clips for the current boxes before you continue to box more particles, use the Rebox Using DB command from the Box menu.
One other problem people often have is incorrectly placed or simply wrong boxes. There IS a way to take care of this problem. First, go to the Clips image group and delete All of the Clips. Now go back to the micrograph image. All of the red boxes are still there. Next, put the mouse in DB mode. You can then use the left mouse button to move any of the red boxes around, and the middle mouse button to delete boxes. Note that any boxes that you've moved will become blue instead of red. Before you save your changes, select the New Permanent command from the Box menu to make the boxes red again. Once you've done this, save the box database again and Rebox Using DB. Then you can save the images as usual.
Sometimes it's desirable to use a set of boxes from one micrograph in a focal pair to box the particles out of the other image. The most common case where this is useful is when one micrograph is so close to focus that the particles are difficult to locate, but the other micrograph is far enough from focus to make the particles visible. Since, especially when CTF correction isn't being done, it is usually desirable to use images that are as close to focus as possible, you'd like to pick the particles out of the far from focus image, then use these boxes to get the close to focus data.
EMTOOL provides an easy way to do this. First, follow the instructions in 2.2 to box the particles out of the far from focus image, and use the Save Box DB option. Next, restart emtool (just to free up any residual resources), and load the second micrograph image. Select this image and use Read Box DB to load the boxes onto this image.
This procedure assumes that you can manually locate at least a few of the particles in the second image. The next step is to use DB mouse mode to adjust the positions of several of the boxes so they cover the appropriate particles. This does not mean you should just find a particle an move any one of the boxes to cover it! You must move the correct box over the corresponding particle from the other image. You don't have to do this for a lot of particles. It is sufficient to do 1 or 2 particles in each corner of the micrograph. Once you've moved a few boxes (the corrected boxes are now blue), use the Align All to New command on the Box menu. This will move all of the red boxes by an appropriate amount based on the positions of the blue boxes you moved.
All of the boxes will now be red again. You can now Rebox Using DB and Save Box DB as usual.
This section assumes a certain amount of background in electron microscopy theory. That is, it assumes you understand what the CTF is, and how it relates to the image. EMTOOL uses an 8 parameter model for the purposes of fitting the CTF. 4 parameters are for the incoherent noise, 3 fit the theoretical CTF and 1 is a simple scaling coefficient.
If your micrograph has continuous carbon film, and you believe the particles aren't sitting too far from the carbon film, the defocus can usually be determined quite easily and accurately. Since we don't have to worry about the structure factor with carbon film (assume it's effectively 1 at low spatial frequencies), our theoretical model of the CTF of the microscope fits the data quite accurately.
The first step is, before even loading your image into EMTOOL, is to check your Preferences (on the Tools menu). Make sure the voltage, spherical aberration, magnification and scan resolution are all set to the correct values. Then you can load your image. Now, there are 2 different possibilities. If your image has a fairly low density of protein, you can probably just box out a 512x512 or 1024x1024 region of the micrograph and analyze that. If you have a fairly high protein density, you'll get better results if you pick a smaller box size, like 128x128, and box out as many regions without protein as possible. That is, you want to box out areas with just carbon film.
The next step in the first case is to Normalize the boxed region, then do an FFT (both on the Tools menu). In the second case, select all of the Clips you just boxed out, then use the FFT Average command from the Tools menu. In both cases, you will now have an FFT image which we can use to determine the defocus.
Select this image, then select CTF mouse mode. This should cause the CTF window to appear. To get the power spectrum of your image to appear, click and drag the left mouse button on the image. The first zero of the CTF should be visible as a dark ring in the image. Ideally you want to make the radius of the red circle that appears match the middle of this dark ring. When you start dragging, there will probably be a short pause before the circle begins following your mouse. During this time, EMTOOL is calculating the power spectrum. It only needs to do this once for each image, so the delay will not happen if you click on the same image again.
At this point you should see 2 curves and a line in the plot in the CTF window. The black curve represents the power spectrum of your data set. The yellow curve is the theoretical model of the power spectrum and the red line indicates the position of the 1st zero of the CTF in the model. If all you're trying to do is measure the defocus of the image, all you need to do is drag in either the image window or directly on the plot so the red line matches the 1st zero in the black curve. Then read the defocus from the field just below the plot.
In general, however, there are 8 parameters that define the yellow curve. Four parameters represent the incoherent noise and 4 represent the signal. Read section 3.3 for details. Try to adjust the parameters so the yellow curve roughly matches the black curve. Once you have this at least vaguely correct, press the Fit button just below the Defocus field in the CTF window. This is not a tremendously good fitting algorithm, but 9 times out of 10 it will do a good job. Once you have a good fit, you can read off the various parameters of the fit.
This procedure is similar to the procedure above, but there are a few additional difficulties. In the above case, we are just looking at carbon film, where we don't have to worry about the structure factor (it's effectively constant at low spatial frequencies). However, in this case, we're looking at protein, which inevitably has a rather significant structure factor at low spatial frequencies. This makes fitting the CTF a little more problematic. In general, just follow the same procedure outlined in 2.4.1 above, but rather than boxing out carbon film, box out protein particles instead.
In this case, the yellow curve will not, and should not, match the black curve at low spatial frequencies. However, even if you can't do a perfect fit, it should at least be possible to locate the first zero of the CTF. So, move the red line to the first zero, then simply read off the defocus from the appropriate field in the CTF window.
1) The list labelled 1 contains all of the images in the current image group. Each image line contains a description of the image (usually the filename it was loaded from) and the size of the image in pixels. EMTOOL does all of its work in memory, as opposed to working directly on files. Any changes you make to loaded images occur within the program only. If you wish to keep any changes you must save the image back to a file again. This list is also where you select which images to display or manipulate. Any selected images (hilighted in yellow) will be displayed in the image view window. You may select multiple images at the same time, but they must all be exactly the same size! If you try to select images of different sizes, the program will automatically deselect any images that don't fit. For this reason, you cannot display a real image and a Fourier transform in the same view at the same time (since the Fourier transform is 2 pixels wider than the original image). You do not need to hold the shift key down to select multiple images. Clicking on an image will toggle whether it is selected or not. Dragging works as well. The None button (item 3) allows you to quickly deselect all images. Correspondingly, the All button will select all of the images in the current group (assuming they are the same size). The Del button will delete all selected images. Note, again, that this will simply remove the images from memory. It will never delete corresponding disk files. Be careful, there is no undo, and the program does not ask for verification. There are a few notes specific to Fourier transforms of images. Be sure to read 5) below.
2) The list labelled 2 contains a list of image groups. This is a feature that allows you to organize several individual lists of images in memory at the same time. For example, when you are boxing particles from a micrograph, the individual particles are placed into a separate group from the original image. In addition, if you read a multi-image imagic file, a new group will be created for all of the images in the file. The image list (item 1) displays only the images in the currently selected list. Currently there is no good way to move images from one image group to another. The only way to do this at all is to use the Del mouse mode described below. You can change the name of the current image group by editing the text field just below the list. You can also add and delete lists with the appropriate buttons. Note that deleting a group will delete all of the images within that group as well. As before, there is no undo, so be careful.
4) The list labelled 4 contains a list of views. Sometimes you may want to look at 2 or more images side by side on the screen. Pressing the Add button will open a new image viewing window which operates independently from the already open view on the screen. When you select images in the image list, the selected images will appear in the currently selected view. Be a little cautious when using this feature, there have been a few bugs associated with multiple views which can potentially cause the program to crash (and thereby lose your unsaved work). In particular, deleting views then creating new ones (which there isn't really any good reason to do since you can change the contents of each view at will) has caused occasional problems.
5) The plot labelled 5 is a histogram of the image. This histogram allows for easy adjustment of the image brightness and contrast. The Max and Min sliders below the histogram allow you to select the value that corresponds to black and the value that corresponds to white on the screen. This is a fairly efficient way to adjust the viewing parameters for optimal contrast and brightness. In many cases, in particular for Fourier transforms of images, you may have a few pixels with very bright pixels. The unlabeled slider directly below the histogram allows you to adjust the horizontal limits of the histogram, and simultaneously adjust the limits of the Min/Max sliders. When the slider is all the way to the right, you are viewing the entire histogram, that is, the left side of the histogram is the brightest pixel in the image and the right side of the histogram is the darkest pixel in the image. As you move this slider to the left, the histogram will zoom in on the central peak of the histogram. This allows you very precise control over a wide range of Min/Max values. When you first select an image to display it, EMTOOL will automatically select values for Min and Max that it thinks are good. After you manually make changes to each image, emtool will remember your settings and restore them when you select this image again later. There is also an unlabeled vertical slider to the left of the histogram which allows you to scale the histogram vertically.
You will also note that there is a small button labelled B=0 to the left of the histogram. Sometimes you wish to view the image in negative. That is, high numerical values correspond to black rather than white. This button is a 3-way toggle. Pressing it once will invert the colors so low numbers are white. Pressing a 3rd time will switch to a cyclic RGB colormap. This option is principally useful when viewing Fourier transforms of images. Pressing the button again will cycle back to low numbers == black.
Finally, below the Min/Max sliders is a Zoom slider. This allows you to scale the image in real time. You can go from 1/10 scale to 5x magnification. Buttons below this slider allow you to rapidly go to several preset magnifications. Also note that when using a scale below 1, say 1/2, EMTOOL simply displays every other pixel. It does not average the neighboring pixels, it just skips them.
Note for FFTs:
The FFT of an image consists of complex numbers. Normally when you view the FFT of an image, each pixel shows the amplitude of the corresponding complex number. Each pixel also has a corresponding phase which isn't usually displayed. If you switch emtool to use the cyclic RGB colormap, rather than displaying amplitudes, it will display the corresponding complex phases. There are a couple of caveats when doing this. First, when you press the B=0 button, the images are not redisplayed. If you want to see the phases, you need to press the B=0 button twice to switch to the cyclic colormap, then you have to deselect and reselect the image you want to look at. Second, when you take the FFT of a real image, you end up with an image in Fourier space that is 1/2 (+2 pixels) the size of the original image. When you see a FFT in the image list that is, for example, 514x512 pixels, in reality there are 257x512 complex numbers in the image. What you see on the screen is actually the image in memory on the right half of the screen, and a (complex conjugate) copy of this image in the right half of the screen so you can see both positive and negative spatial frequencies in both x and y.
6) Finally, the area labelled 6 contains a 2-axis slider. This is a panning control for the currently selected image view. That is, by moving the crosshairs around, you can look at different parts of the image. Of course, this doesn't do anything if the selected image(s) is(are) smaller than the selected image view. There are also several ways to pan around an image using the mouse directly in the image, but this slider may be more convenient in many cases, especially for very large images.
1) The buttons in section 1 control the mouse mode, i.e. - what the mouse does when you click or drag in an image view. There are 6 modes available:
Move - Clicking on a point in the image with the left mouse button will cause that point to move to the center of the view. Clicking and dragging with the center mouse button allows you to drag the viewable portion of the image
Drag - This mode allows you to box out arbitrarily sized areas of an image to create a smaller (cropped) image. Use the left mouse button and drag a box around the area of interest. Please note that this is NOT the preferred method for boxing large numbers of individual particles for 3d reconstructions. You can also use the middle button in this mode to pan around the image.
Box - This is the preferred mode for boxing particles from an image. See area 2 for details. Clicking the left button causes the selected region to be boxed. The center mouse button can be used to pan around the image as usual.
DB - This is database mode. After boxing a large number of particles, you may decide that some of the boxes need to be repositioned slightly or even deleted. In this mode, the left mouse button allows you to drag already placed boxes to a new position. Moved boxes will become blue, see the Box menu for details. The middle mouse button deletes boxes. Note that moving and deleting boxes does NOT generate a new image or delete old images from the 'clips' image group.
Zap - This mode allows you to interactively separate boxed images into different groups. When displaying multiple images in a view, clicking on one of the images with the left mouse button will cause it to be removed from the current image group and moved into the first image group labelled 'Zapped'. If there is no such group, it will be created.
CTF - This mode is functional only when a single image FFT is being displayed. Clicking and dragging with the left mouse button will allow you to select the radius of the 1st zero of the CTF in the image. It will also cause the CTF fitting window to appear. See section 3.3 for details.
The final button, WVLT, is a toggle. This button allows you to perform real time wavelet filtering on the selected view. This option should only be selected on fast computers. Details can be found in the wavelet section below.
2) This section of the Mouse Window contains parameters for the Box and CTF mouse modes. The Size fields allow you to select the box size used in Box mode. The Box and Mark items allow you to choose how boxes are visualized on the screen. Box determines the shape of the box that appears as you move the mouse around on the screen. Mark selects how the boxes appear after you've selected them. This allows, for example, displaying a circle when selecting a particle to allow for more accurate centering, but displaying boxes for the already selected areas to look for overlap between particles.
The Live item allows you to select the effect of dragging the mouse in CTF mode. See section 3.3 for details.
3) This section of the window allows you to set the parameters for both real time and noninteractive wavelet filtering of images. Details are below in the wavelet section, but briefly, there are 3 parts to this display. The list selector labelled 'Daub 8' in the above display allows you to select what type of wavelet to use for the filter. The numerical field next to it selects the level to which the wavelet transform should be performed. Finally, the individual sliders set noise thresholds for the individual transform levels. The wider slider on the right is a shortcut which allows you to simultaneously set the value of all of the other sliders.
EMTOOL allows you to determine the defocus and other image parameters by fitting the power spectrum of the image to a theoretical model. This fit is really designed to work on areas of carbon film where no protein is present, but it can also be used, at least for defocus determination, on the mean power spectrum of a set of particles. This plot shows Fourier intensity as a function of spatial frequency (in the normal mouse mode). The black line is taken from the currently displayed FFT image. The yellow line represents the theoretical model.
NOTE: For the fitting process to give accurate values, the pixel size in the Control window as well as the HT voltage and the spherical aberration in the Preferences panel MUST be set to the correct values!
Initially when using EMTOOL, this window is not open. To make it appear, select the FFT of an image, then put the mouse in CTF mode. Finally move the mouse into the image display window and click with the left mouse button and drag a little. The first time you do this on any given image the program will freeze briefly as it calculates the rotationally averaged power spectrum. This could actually take several seconds on a slow machine. Once the calculation is complete, the black curve will appear in the CTF window and as you drag, a red circle will follow your mouse pointer in the image window. Your goal is to adjust the size of this circle so it lies in the 1st zero of the CTF.
1) Again, the black line in this plot represents the power spectrum of the currently selected image. The yellow line is the theoretical curve using the current CTF parameters. Additional lines may be overlaid using the buttons in area 3. The position of the red line (approximate position of the 1st zero) may be adjusted by dragging with the mouse in the image view, or alternatively, by dragging with the left mouse button directly in the plot window. The slider to the left of the plot allows adjustment of the vertical scale of the plot. Note that the plot does not continuously autoscale. So, if you adjust the fit parameters such that the yellow line moves off the bottom of the plot, you can bring it back by moving this slider a little.
It is possible to zoom in on a region of this plot by dragging a box with the center mouse button. You can zoom back out again by clicking the center mouse button without dragging.
2) These sliders, and 1 text field represent the 8 CTF fitting parameters. The 4 top sliders represent the fit of the background noise in terms of a Gaussian plus an exponential. There are then 4 parameters for fitting the coherent data. First, is the defocus. There is no slider for the defocus since it can be adjusted by dragging in the plot window. Alternatively you can enter an exact number in the text field.
Next is the envelope function. The envelope function is fit by a single exponential. This slider selects the width of that exponential. The number here represents the width of the corresponding Gaussian in real space , not Fourier space. In Fourier space, this number corresponds to p times the half width of the Gaussian, i.e. - a point at which the Gaussian has fallen nearly to zero. So, if this slider is set to 8Å, you would be just able to resolve 8Å features in the real space image.
The next slider is the scale factor. This simply defines the overall amplitude of the sin g term. The final slider is the % amplitude contrast in the image. This is often called Q in the literature and is normalized like this:
Q cos g+sqrt(1+Q^2) sin g
You can try to get the program to automatically fit the data by pressing the fit button just below the defocus field. This is not a tremendously good fitting algorithm currently, so you need to help it along by giving it a starting value that is at least roughly close to being correct. The fitting algorithm will display various messages in the terminal window that emtool was started from. Note that this fit will try to exactly match the yellow line to the black line. In cases where protein is present in your power spectrum, the structure factor of the protein contributes, so you should not expect an exact fit. In this case you should still be able to at least determine the defocus by making the positions of all of the zeros match up (don't try to match the peaks, just the zeros).
You may have noticed the presence of tiny diamond shaped buttons next to each slider. These buttons allow you to select which parameters will be allowed to vary when you do an automatic fit. This allows you to fix parameters at a known value when the automatic fitting routine is doing a bad job or running into infinities. The %AC is locked by default. Determining this value from a fit will have very large uncertainties unless you have a large number of oscillations in the CTF. The example shown in the sample above would do a good job of determining %AC, but this is atypical for most images, which are usually taken much closer to focus. Usually this slider should be set to a value between 5-15% for ice images (depending on the microscope and the sample). For negative stain micrographs this number will be higher.
These parameters can be interactively adjusted. A measure of the goodness of fit is displayed continuously in the chi text field. The Res text field is the position of the red line in reciprocal angstroms.
3) Starting at the left are the Save and Plot buttons. The Plot button doesn't do anything yet. The Save button will cause the data for the black and yellow lines to be saved in 2 files in your home directory (standard x/y text files). This is useful if you want to make a nice looking plot to print out. When you press this button a window will pop up telling you the name of the files EMTOOL wrote.
Next are the FIT and CTF toggles. The FIT toggle allows you to turn off the display of the fit line. This can be useful if you have a really good fit and it's obscuring the black line. The CTF toggle allows you to disable the sin g+cos g part of the CTF. This allows you to see the envelope function without oscillations.
Next to these 2 buttons is a numerical text field labelled Smooth . This field allows you to select the level of polynomial smoothing that should be performed on the black line. By default it's set to zero (no smoothing). With particularly noisy power spectra this can help visualize the overall shape of the CTF.
Below this are 3 buttons labelled Data, Fit and Clear . These buttons control plot overlays. For example if you want to compare the power spectra of 2 images taken at different defocus settings, display the power spectrum of the 1st image, press the Data button, then display the power spectrum of the 2nd image. You'll notice that a blue line representing the 1st image is still visible in the plot. You can add multiple overlays this way. The Clear button erases all of them. Unfortunately there currently isn't any way to print or save overlays.
Finally there is a set of 6 buttons to the left of the overlay buttons. The right buttons in this set are numbered 1-3 and the corresponding left buttons are labelled '>>'. When you're determining the CTFs of several different images from a microscope session, very often many of the parameters will be the same between images. These buttons allow you to store the current fit parameters in one of 3 memories, then restore them later. The '>>' buttons store the current settings into the corresponding memory, and the number buttons reset the parameters from the memory. These memories are persistent. That is, they are stored in your preferences file, so they are still the same if you quit and restart emtool.
As you, expect, this menu contains file operations. There are several Open ... and Save ... commands on this menu. For the most part these are self explanatory, but a few comments are necessary. With the exception of opening Imagic files, you can select multiple files to open at once. With imagic files you can only select a single file to open. If the imagic file has only 1 image in it, it will be added to the current image group as usual. However, multi-image imagic files will have a new group created for them.
Opening Pictures also requires some explanation. This is a catch-all option for reading GIF's, TIFF's, PGM's, etc. For this option to work on any image type other than PGM, however, you must have the NETPBM package installed on your computer and in your search path. This is a popular package available on a wide variety of public domain ftp sites.
The Save MRC new ext option also needs some explanation. By default when you save MRC images, the .img extension is used. If you save multiple images it will append .001, .002, etc... to the original name, but the extension is still .img. Some image processing software uses different extensions for different parts of the reconstruction process. This option allows you to save a set of MRC images with their original filenames, but with a new extension.
Most of the file formats you can save images to are 16 or 32 bit formats. The PGM format is only 8 bits. Since we typically have more than 8 bits of resolution in the images in emtool, when you save as PGM it will use the current brightness and contrast settings (Min and Max) as upper and lower limits for the 8 bit colorspace in the PGM image when you Save PGM.
The Print command is also found on the File menu. This command allows you to generate a postscript file or printout on a postscript printer of the currently selected images. There are a few options:
Fit to Page - Is fairly self-explanatory. If this is not selected, the image will be printed at 72 pixels/inch.
Scale Bar - This will cause a scale bar of the specified length to appear in the lower right corner of the image.
Box - This will put a white box around the scale bar.
Save to File - If selected the image will be saved to a (usually very large) postscript file rather than being printed.
Print Command - This is the print command that will be used if Save to File is not selected.
This menu is used to manipulate box databases. For a description of how to really use most of these options read the tutorial section on boxing particles.
Read Box DB and Save Box DB are fairly self explanatory. The file format for these files is compatible with ICE and boxmrc.
Rebox Using DB allows you to generate a new set of 'Clips' using the box database on the current image. Normally when you manually box particles from an image, a new image is created immediately every time you box another particle and added to the 'Clips' image group. However, if you are reading a box database from a file, the red boxes are displayed on the image, but the individual clips are not automatically generated. This option allows you to generate a new set of 'Clips' using the current box database.
Align All to New is designed for use with focal pairs. If you box a set of particles from one image in a focal pair, then want to box the same particles from the other image in the pair, display the second image and load the box database from the first image. Next, adjust the position of several of the boxes using the DB mouse mode so they are surrounding the correct particles. It's best if you do this to a couple of particles at each corner of the big image. Align All to New will then use the position of the blue boxes to adjust the position of all of the red boxes to the new image. You can then Rebox Using DB to generate a set of clips for the second image.
New Permanent will make any blue boxes (that you've moved) red again without moving any of the other boxes in the database. If you move one or more boxes, you MUST do this before saving or reboxing using this database or the original box location will be used, not the new one.
Clear Box DB is self explanatory, but only works on 1 image at a time.
Copy Boxes with Align is used in a similar fashion to Align All to New , but is an automatic version. To use this option. Read 2 images into memory simultaneously. Manually box the 1st image, then select both images and do Copy Boxes with Align. This will attempt to use CCF's to align first the overall images, then the individual boxes between the 2 images. You will end up with a box database in the second image which should box the same particles as the first image. Results will vary, some images work better than others.
Clip Colors - This command allows you to trim the edges of a histogram. Sometimes, especially in a FFT you will have a few pixels with extremely high values. For some purposes, eliminating these pixels is acceptable. So, select the Min and Max values you want to have in the final image and Clip Colors. Any pixels outside the Min/Max range will be clipped to the edge of the range.
Average - This average several images together. Select several images. Do an Average and a new image will be created which is the average of all of the selected images. Of course, all of the images must be the same size.
FFT Average - This option is specifically designed to generate a mean power spectrum from a set of particle images. Select a group of particle images then do a FFT Average. Each image will be normalized, FFT'ed, and the transforms will be incoherently averaged. The final image is complex, but the phases are meaningless.
Filter - This command allows you to apply high/low pass filters to images. It will work on multiple images, and the images may be real or FFTs. The lowpass filter is specified in angstroms (requires the A/pixel value to be set correctly) and indicates p times the half width of the Gaussian, i.e. - the resolution in real-space. The first number may optionally be followed by a comma and a second number. If present the second number, also in angstroms, specifies the position of a square cutoff highpass filter.
Normalize - This command will set the mean greyvalue to zero and the standard deviation to 1. This should almost always be used before taking the FFT of an image.
Edge Normalize - Just like Normalize above, except it uses the mean taken from a 1 pixel strip at the edge of the image rather than the mean of the overall image.
Subtract - Select 2 data sets. This subtracts the second from the first. The 1st image is overwritten.
V. Flip - This flips selected images vertically. This is done line by line without interpolation, so this process can be repeated as often as you'd like.
Flood Edge - Primitive flood fill of the edge of an image to change the mask color of an image. Rarely useful.
Mask Step - This is used to mask the center of an image. Select a radius (in pixels) and anything outside will be set to the average pixel value.
Mask Noise - Just like Mask Step, this will mask an image. However, in this case, rather than using the average image value as a fill value, it fills the edge with white noise with the same mean and standard deviation as the overall image. This allows overlapping particles to be masked out without causing alignment problems later.
Analyze - This will take a piece of the center of the current image, normalize it, FFT it, and bring up the CTF fitting window so you can check the image parameters.
Pad for FFT - This will take an image of any size and pad it to 2048x2048 so you can increase the sampling in the FFT. Keep in mind that each image padded in this way will occupy 16 megs of memory (and another 16 for the FFT).
FFT - This will take the FFT of the currently selected image. Please note that there are some restrictions on the size of the image that can be transformed. Normal FFT routines can only transform images with sizes that are powers of 2. EMTOOL uses a very fast radix 19 FFT routine. That means the largest prime factor of your image size MUST be 19 or less, and the image size must be even. This covers all even numbers <722, and most reasonable sizes above this. If you select the Valid FFT Only option in preferences you shouldn't have any problems with this because EMTOOL will only allow you to box images with sizes that are valid for FFTs.
IFT - Obvious. Inverts the FFT operation above.
DWT - Discrete Wavelet Transform. If you don't know anything about wavelets, you should probably find something out about them before using this option. The wavelet parameters are selected in the Mouse Mode window. Also, to really do the transform properly, the image size should be a power of 2. Since it uses cyclic boundary conditions, it will work with images of any size, but you will run into strange edge effects if the image size isn't a power of 2. The DWT of an image is a real image the same size as the source image.
IWT - Inverts the DWT. Be sure not to change the wavelet settings between the DWT and the corresponding IWT or you'll get funky looking results.
Wavelt Filt - This does a full wavelet filter of an image. That is, it does a DWT, applies a nonlinear threshold, then inverts the transform again. The filter parameters are set in the Mouse Mode window. The sliders allow you to adjust the threshold independently for each lengthscale.
Preferences - Program preferences. Explained in the first tutorial.
Many of the functions on this menu are experimental in nature and not designed for general use (yet). Any menu items not described below should not be used. In particular, the items above the 1st separating line in the menu are currently for internal use only.
Rot/Trans - This allows you to rotate and/or translate an image by an arbitrary amount. It uses bilinear interpolation for fractional pixel shifts. Areas from outside the image are set to the mean image value
ACF - calculates a cross correlation function between the selected image and the same image rotated 180 degrees.
Center (center) - uses an ACF to move the center of an object in the image to the center of the image.
Center (corner) - same as above, but the center of the object is translated to the corner of the image. This is the correct phase origin for the FFTs used by the program. When trying to look for common lines, etc... this is the correct center to use.
CCF - Calculates the cross correlation function of 2 selected images.
Trans. Align - Translationally aligns 2 selected images using the CCF of the 2 images.
RCF - Rotational correlation function. This function determines the rotational misalignment between 2 data sets. It does this by calculating azimuthal density distributions for 5 pixel wide rings from each image and calculating 1d CCF's for each ring. These CCFs are then added for all of the rings. This option simply displays the angle that 1 data set would have to be rotated to be aligned with the second. As a side-effect the final 1d CCF is stored in 'test.rcf.dat' in the current directory.
Rot. Align - This will rotationally align 2 or 3 selected data sets using the RCF. Both data sets are actually rotated rather than just rotating the second to match the 1st. This is done so both data sets have undergone similar interpolation, which causes some falloff at high frequencies.
Align RT - Aligns 2 or 3 selected images rotationally and translationally.
Center + Ali RT - Broken, don't use it.
This is potentially a very useful function of emtool. It allows you to incorporate your own image processing routines into the program. At some point this feature will be documented and examples provided. For the time being you'll have to figure it out for yourself if you want to use it.
This menu allows you to generate one of several possible test images. All of the test images are 512x512. The names should be fairly self-explanatory. If you can't figure one out, select it and the results should speak for themselves. Note that the automatic brightness/contrast setting doesn't work well on some of these images.
This menu has only 2 items.
Home Page - If you have Netscape installed on your computer and in your path, this will open the EMTOOL home page
Help - This brings up the interactive help panel. While the help panel is open, clicking on virtually any button or selecting any menu item will cause a short description of what the button/item does to appear instead of the button/item actually doing anything. When the panel is dismissed, everything returns to normal.
This document is too short for a complete overview of wavelets. If you need a complete overview on the subject, try http://www.amara.com/current/wavelet.html . Breifly, wavelets are an alternative to the FFT for filtering and compressing images. Whereas the FFT transforms an image into the frequency domain, the DWT (discrete wavelet transform) gives an image that is partially in the frequency domain, but also retains some spatial information. For the purpose of filtering the interesting property of wavelets is that you can do frequency dependent filtering which also has positional dependence. For example, if you have a picture with a single sharp spike in it, surrounded by a large flat background, applying a low pass fourier filter will smooth out noise in the background, but it will also make the spike appear larger and less sharp. Wavelets, however, would allow you to retain the high frequency information in the spike, but eliminate it elsewhere. Of course this is just a general description of the method, and there are limitations.In general, the more frequency information you get, the less spatial information is available.
Also, unlike the FFT which uses sin() functions as a basis set, wavelets use a variety of localized basis functions. The most widely known set of wavelet basis functions are known as the Daubechies wavelets. Each type of wavelet has a characteristic shape which will cause similarly shaped artifacts in a wavelet filtered image. Overall, though, choice of wavelet basis won't have a large effect on the quality of a filtered image.
The standard method of wavelet filtering is very similar to the algorithm used for wavelet compression. The image is transformed to wavelet space, then a threshold filter is applied to each lengthscale (frequency) before inverting the transform to obtain the filtered image. The threshold filter used in EMTOOL is a standard hyperbolic (ie - nonlinear) shrinkage filter with a user adjustable universal threshold. The fact that the filter is nonlinear (along with the likelyhood of wavelet artifacts) means you should probably avoid doing any quantitative analysis (like 3d reconstructions) of filtered images. The primary usefulness of wavelet filtering in this implementation is to make particle location/identification easier.
This feature should not be used on a slow machine unless you have a lot of patience. I would suggest a minimum of a Pentium Pro 200 or equivalently an SGI with an R10k processor. Anything slower than this will probably not give 'interactive' performance. This feature is nice for boxing images, as it doesn't actually modify the images in memory at all. Rather than doing a one-time transform on the entire image, this routine applies a wavelet filter to whatever is currently displayed in the image window. Every time you scroll or change the brightness/contrast a new wavelet filter is performed. Even with the high speed of wavelet transforms, this can become slow if you make the Image window too large. It works best with Image windows not much larger than the default size. Also, if the image you're looking at is smaller than the Image window, ie - there's a black border around the image, this border will get filtered along with the image and produce strange artifacts.
Having said all that, this is an easy function to use. Simply select the WVLT button on the Mouse window (it's a toggle). The wavelet filtered image will then appear in the window. Of course, you might need to play with the filter parameters to get a nice looking filtered image. There are 3 things you can change. First is the wavelet type. Several different wavelet types are provided, and a thourough discussion of each is beyond the scope of this manual. I would suggest simply trying different wavelets to see what works best for you. I've found that Daub4 gives pretty good results. If you'd like more details, the wavelet transform used in emtool is a subset of the wavelet toolkit found at: http://www1.cs.dartmouth.edu/~gdavis/wavelet/wavelet.html .
The second parameter you can change is the DWT Level. This determines how completely the DWT should be done. Basically, a level 1 transform looks at the highest frequency information in the image, a level 2 looks at somewhat coarser information, etc... If you set Level to, for example, 3, then the DWT will only incorporate the first 3 levels of transform. Any details coarser than this will be untransformed, and thus, won't be filtered at all. Typically Level 4 or 5 is sufficient for filtering EM images. You'll note that when you change the Level, the number of vertical sliders just below the Level input also changes. These sliders allow you to adjust the strength of the wavelet filter at each lengthscale independently. Each slider is multiplied by the so called 'universal' threshold to obtain the true threshold. In most cases EM images are so noisy that setting these sliders to 1.0 will eliminate too much information. Each slider varies from 0 to 1.4. A setting of 0 will cause no filtering at that lengthscale. A setting of 1.4 is maximal filtering (removes almost all of the information at that lenghtscale). You can move the sliders individually, or drag the wider slider on the right to move them all simultaneously. There is no way to read the values of these sliders, but since the results are qualtiative anyway, that shouldn't be an issue.
As noted earlier, in this interactive filtering mode, the data itself is unaffected. So, if you box a particle with interacive filtering turned on, the boxed particle will contain the original unfiltered data. This makes it an ideal way to locate particles without making the boxed particles unusable.
This allows you to filter the data itself, rather than just filtering the representation of the data on the screen. The filter parameters are exactly the same ones used in interactive mode above. To filter your data, simply select all of the data sets you wish to filter, then use the Wavlt Fltr command on the Tools menu. Notice that images filtered this way won't appear exactly the same as images filtered in interactive mode. The only differenceis that the interactive filtering is done on 8 bit screen images which may have brightness/contrast adjustments. When the raw images are filtered, brightness and contrast settings don't come into play.