Skip to content

1. Methods

António Brito edited this page Feb 8, 2024 · 3 revisions

Methods implemented in NanoPyx

Currently NanoPyx implements several image analysis methods including, but not only, the methods previously available as part of the NanoJ plugin family for ImageJ.


Image registration

NanoPyx makes available 2D drift correction and channel registration. Both are based on using phase correlation to find the best match possible between frames/channels.
You can read more about the implementation here: Romain F Laine et al 2019 J. Phys. D: Appl. Phys. 52 163001

Drift Correction Parameters:

Requires an image stack with shape: (time, rows, columns)

  • Reference Frame: Which frame to be used as reference. Either always use the first frame (better for fixed cells) or the previous frame (better for live cells).
  • Max Expected Drift: Maximum amount of expected drift in pixels.
  • Time Averaging: Whether to register each individual frame, if using 1, or how many frames to average before calculating drift correction (better for single molecule data). Output keeps the original number of frames; single frame drift estimation is calculated by interpolating using the calculated drift of the averaged image stack.

Channel Registration Parameters:

Requires an image stack with shape: (channel, rows, columns).

  • Reference Channel: Which channel to be used as reference.
  • Max Expected Shift: Maximum amount of expected shift between channels, in pixels.
  • Blocks per Axis: As channel misalignment is not always homogeneous across the field of view, shift can be calculated for individual blocks of the field of view. This parameter sets how many blocks are created along both axis.
  • Minimum Similarity: Since smaller blocks may lead to shift calculation in areas of the image without any cells, minimum similarity can be used to define the minimum Pearson's Correlation Coefficient, between two blocks of different channels, required to use the calculated shifts as part of the registration.

SRRF

Currently NanoPyx allows users to generate super-resolved images using SRRF. You can read more about it here: Culley S, Tosheva KL, Matos Pereira P, Henriques R. SRRF: Universal live-cell super-resolution microscopy. Int J Biochem Cell Biol. 2018 Aug;101:74-79. doi: 10.1016/j.biocel.2018.05.014. Epub 2018 May 28. PMID: 29852248; PMCID: PMC6025290.

SRRF Parameters:

  • Ring Radius: Radius of the ring used to calculate the radiality (in pixels).
  • Magnification: Desired magnification for the generated radiality image.
  • SRRF order: Flag for types of SRRF temporal correlations. Order = -1: pairwise product sum; Order = 0: maximum intensity projection; Order = 1: mean; Order = 2,3 or 4: autocorrelation function of order 2, 3 or 4.
  • Frames-per-timepoint: How many frames of the original image stack are used to calculate a single SRRF frame. For example, given an input image with 500 frames, if using 100 frames per timepoint, SRRF will generate an image stack with 5 super-resolved frames.

eSRRF

NanoPyx also implements eSRRF (enhanced Super-Resolution Radial Fluctuations) which is an extension of the SRRF method. You can read more about it here: Romain F. Laine et al., ‘High-fidelity 3D live-cell nanoscopy through data-driven enhanced super-resolution radial fluctuation’, bioRxiv, p. 2022.04.07.487490, Jan. 2022, doi: 10.1101/2022.04.07.487490.

eSRRF Parameters:

  • Ring Radius: radius of for the radial gradient convergence (RGC)
  • Sensitivity: sensitivity of the RGC
  • Magnification: Desired magnification for the generated radiality image.
  • eSRRF order: Flag for types of eSRRF temporal correlations. Order = -1: pairwise product sum; Order = 0: maximum intensity projection; Order = 1: mean; Order = 2,3 or 4: autocorrelation function of order 2, 3 or 4.
  • Frames-per-timepoint: How many frames of the original image stack are used to calculate a single eSRRF frame. For example, given an input image with 500 frames, if using 100 frames per timepoint, eSRRF will generate an image stack with 5 super-resolved frames.

Denoising

NanoPyx now implements Non-local Means Denoising as part of the library. You can read more about it here: A. Buades, B. Coll, & J-M. Morel. A non-local algorithm for image denoising. In CVPR 2005, Vol. 2, pp. 60-65, IEEE. DOI:10.1109/CVPR.2005.38 Jacques Froment. Parameter-Free Fast Pixelwise Non-Local Means Denoising. Image Processing On Line, 2014, vol. 4, pp. 300-326. DOI:10.5201/ipol.2014.120

NLM Denoising Parameters:

  • Patch size: Size of patches used for denoising.
  • Patch distance: Maximal pixel distance to search patches used for denoising.
  • h: Cut-off distance (in grey levels). A higher h results in a smoother image, at the expense of blurring features. For a Gaussian noise of standard deviation sigma, a rule of thumb is to choose the value of h to be sigma of slightly less.
  • sigma: The standard deviation of the Gaussian noise.

Quality Control

NanoPyx implements the methods available in NanoJ-SQUIRREL (Error Map and FRC), as well as Image Decorrelation Analysis.
References:
Error Map: Culley, S., Albrecht, D., Jacobs, C. et al. Quantitative mapping and minimization of super-resolution optical imaging artifacts. Nat Methods 15, 263–266 (2018). https://doi.org/10.1038/nmeth.4605
FRC: Nieuwenhuizen RP, Lidke KA, Bates M, Puig DL, Grünwald D, Stallinga S, Rieger B. Measuring image resolution in optical nanoscopy. Nat Methods. 2013 Jun;10(6):557-62. doi: 10.1038/nmeth.2448. Epub 2013 Apr 28. PMID: 23624665; PMCID: PMC4149789.
DecorrAnalysis: Descloux A, Grußmayer KS, Radenovic A. Parameter-free image resolution estimation based on decorrelation analysis. Nat Methods. 2019 Sep;16(9):918-924. doi: 10.1038/s41592-019-0515-7. Epub 2019 Aug 26. PMID: 31451766.

FRC Parameters:

  • Pixel Size: Pixel size of the image. Used to calculate resolution values.
  • Units: Pixel size units.
  • First/Second Frame: As FRC is calculated between two frames of the same image stack, these parameters determine which two frames are used for the calculation.

Image Decorrelation Analysis Parameters:

  • Pixel Size: Pixel size of the image. Used to calculate resolution values.
  • Units: Pixel size units.
  • Radius Min/Max: Resolution calculation by Decorrelation Analysis is performed in the frequency space. These parameters define the range of radii to be used in the calculation.