How it works

When an image is selected, the program will immediately process the image automatically. The resulting image will be saved as [image_name].result.tif in the qf_results folder that is created as a subdirectory of the folder containing the selected file. The program will process an image by going through a series of processes in the order described below

Processes

3. Calculate Average Quadrant

To find the average fold, the image will be split into 4 quadrants, and each quadrant is flipped to be in the same orientation as below.

-

After all quadrants are flipped, a new image will be generated by averaging each pixel from all quadrants. The mask threshold will be used to determine if that pixel will be included in averaging process. In this case, the mask threshold is 0. That means if the pixel intensity is less than 0, the program will ignore that pixel. Finally, the result image will look like the image on the right. The full 2D pattern can then be regenerated by rotations of this image.

-

4. Calculate R-min and R-max

For the background subtraction algorithms to work, it is necessary to define a minimum radius R-min and a maximum radius R-max to define the region that is assumed to contain real data. To find R-max, the radial histogram will first be re-computed from the average folded image. R-max (blue line) is initially chosen to be simply 60% of the diagonal of the image. These two values are intended as just approximate starting points, that users can change manually.

-

5. Apply Background Subtraction

Fiber diffraction patterns from muscle have a substantial diffuse background arising from non-crystalline parts of the muscle that do not diffract coherently including membranes and mitochondria as well as diffuse scattering from the myosin heads. Intact cardiac muscle, in particular has a very strong background. This background pattern has a complex structure making it hard to model and effectively remove. Various algorithms exist that attempt to remove the background. No one technique so far can effectively remove background in all parts of the image without over subtraction in some parts of the pattern but some techniques work better than others depending on the muscle and specific preparation. Quadrant folding implements several different algorithms that can be used individually or in combination that can be used to background subtracted images for display or subsequent analysis.

Generally speaking, the “White Top-Hat” algorithm works well at large radii from the center and some other algorithm will work better than others, depending on the type of muscle generating the X-ray pattern, at low radii. Two images will be produced from this process. The first image will be created using one of several background subtraction approaches, and the second image will be created using the White-top-hat approach. These 2 images will be merged as described below. At present, there are 4 options for background subtraction in the first (low radius) image, Circularly symmetric, 2D Convex hull, and White-top-hat.