Display & Process a Micrograph
Access: CP::Micrograph::Micrograph (Tab) and CP::Editor::IMG
There are two ways to load and display a micrograph, depending on its status in the project space:
- To display a micrograph that is already in the project
space, select the image name in the DataView spreadsheet (one mouse
LeftClick to highlight) and press the button DataView::Display
to open the image data. 
After the micrograph is loaded into CP::Editor::IMG, the program will prompt
to open the associated particle stack (if available). 
In case of "Yes", the program will
proceed to load the particle stack into the stack editor CP::Editor::PTK.
- To display a micrograph that is not in the
project space yet (for instance, for a quick image viewing), select a
proper image format (MRC, TIFF, IMAGIC, SPIDER or Other, from the
pull-down menu above the filename box) and press the file-open icon, a
file browser will prompt to select an image file for display.
The intensity and contrast of the image display can be adjusted via the dials located at the lower-right
corner of DP.
Quality Inspection
The quality of an image can be assessed by its intensity histogram and power spectrum. 
Note that the metrics are simple to use, but not sufficient for a comprehensive quality assessment. 
The Histogram button will activate the image intensity histogram display and the Spectrum button will evaluate the power-spectrum for a selected region (CTRL+LeftClick to define the box center), with the square dimension being set at Box-Size (in pixels).
Image Masking (Tab)
In computational particle screening, the masked area (beneath
a semi-transparent yellow layer) in the micrograph will not be searched for particles. 
The mask display can be
toggled by the M (masking) button in the Image Toolbox at DP::ToolBar. 
The micrograph mask can be created either manually or computationally:
- In manual masking, active the M button,
select a drawing tool (line, brush, circle or eraser) and set a proper
brush size (in the adjacent white value-box). 
Then use the computer mouse LeftClick+Drag to draw or erase. 
In the case of "circle masking", the circle radius can be adjusted by RightClick+Drag and be translated over the image by LeftClick+Drag. 
Upon deactivating the circle-masking button, the outside region of the circle will be masked.
- In automatic masking, set a proper brush size
and variance box-size (Var. Box Size in the tab), then press the Mask
button to identify the mask coverage according to the user-defined
variance thresholds (the sliders). 
An existing mask can be cleared by the Clear button, which
will reset the mask to cover only the edges of the image. 
The edge size is customizable by the value of Border Margin (in pixels).
Image Cropping (Tab)
A region of interest (ROI) in a displayed micrograph can be cut out and saved into a new image file (MRC). 
To crop the image, switch to the cropping tab and select either the "rectangle" or the "filamental" shape. 
Then, mark a ROI by the keyboard/mouse
combination CTRL+LeftClick+Drag. 
The selected ROI will be display in CP::Monitor, which can then be saved by
the Save button at the bottom of the tab. 
The Clear button resets the monitor display.
Taking Notes
Key information about a data micrograph (e.g., imaging setup and image quality) can be recorded in the Notes text-box for future reference. 
The notes will be retrieved automatically whenever the micrograph is highlighted in the DataView spreadsheet.
Image Processing Functions
Numerous functions for 2D image processing can be accessed from the pull-down menu. 
After selecting a function and setting its
associated parameters, press the Apply button to active the image processing function. 
Upon completion, the image display in DP::MainDisplay will be updated to reflect the result.
- Normalization : normalize image intensity to N(0, 1).
- TopHat Filter : filter the image by a box kernel centered in the frame. 
Size is in pixels.
- Gaussian Filter : filter the image by a Gaussian kernel. 
Sigma is a ratio to the Nyquist frequency.
- Band-pass Filter : filter the image by the defined High-pass
and Low-pass resolution (in Å, with soft edges).
- Invert Contrast : reverse the image intensity contrast.
- Even Background : compensate intensity gradient for uniform
contrast in the image display (most useful for cryo-EM micrographs).
- Image Binning : bin the image pixels by an integer factor. 
Integer arithmetic (e.g., 9/2=4) is used in calculating the new image size.
- Flip : flip the image either horizontally or vertically. 
Caution: it will change the handedness of the particle data.
- Rotate : rotate the image by the specified angle ("+": counter-clockwise,
"": clockwise).
- UDF Plug-in : call the User Defined Function.
These image-processing functions will introduce changes to the image pixels and update the display
afterwards. 
However, the resulting image is not automatically saved back to the original file. 
It is at the user's discretion to export the result to an image file. 
As a safe-guard, PARTICLE will prompt to save a modified image upon closing.
Demonstration
To display and filter a micrograph in the project space of the demo dataset,
- Start the PARTICLE program;
- Open the project space from CP::MenuBar::Project::Open,
go to the folder "test.em/" and
select the project definition "project.sys";
- All micrograph data will be loaded into the DataView spreadsheet;
- Select the image T1001
by mouse LeftClick to highlight the entry;
- Activate the Display button (below the
spreadsheet), the image will be displayed in DP and the CP
control will be switched to Micrograph::Micrograph;
- In the Masking tab (at the lower-right
region of the page), set Border Margin to "4", then press Clear;
- In the Image Processing group (at the
lower-left region of the page), select Gaussian Filter, set Sigma
to "0.7", then activate the Apply button.