Skip to content
EdrevaPublic

About

Processes multidimensional image stacks and recontructs quantitative phase data using differential phase contrast

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

EasyDPC

DOI

What does EasyDPC do?

EasyDPC is a GUI fronted python program that enables quick and easy processing of quantitative differential phase contrast (qDPC) images from bulk NDTiff datasets.

Download

A: Using Git

Clone this repository using the following git command

git clone https://github.com/edreva/easydpc --recursive

The --recursive argument ensures the submodule dependencies are also downloaded.

B: Manual Download

Download this repository repository and unzip it.

After unzipping the files, you will need to manually download the dependencies and unzip them into EasyDPC/third_party/WallerLab/:

Installation

EasyDPC requires a minimum Python version of 3.11.

All specified commands should be run in a console window from the root of this repository (folder containing pyproject.toml).

A: Using Conda (or other environment manager)

conda create --name easydpc-env python=3.11

conda activate easydpc-env

pip install .

For optional GPU support, run

pip install ".[gpu3d]"

B: Using Python only (Not recommended)

It is recommended to create a fresh environment to install, but it is possible to install directly with python using.

pip install .

NB: When done outside of an environment this will install all dependencies to your base Python environment, potentially causing conflicts with already installed modules.

Running EasyDPC

After following the installation instructions, the EasyDPC GUI can be started by running the following command from within the install environment.

easydpc-gui

This will open the initial screen of the GUI:

From here, the directory containing the NDTiff dataset to be processed can be selected.

Input format

In order to process qDPC images, EasyDPC expects that the input NDTiff dataset will contain a channels axis containing at least two DPC input images, which are those obtained by illuminating with an asymmetric illumination pattern (see [1]). For automatic detection of the relevant channels, the channel names should be of the form: "DPC_#" where # denotes the rotation of the illumination pattern in degrees. In Micro-manager channel names are specified by the Config groups selected as channels during a multi-dimensional acquisition. Failing this, manual selection of the channels and their rotations is also supported within the EasyDPC GUI.

What is an NDTiff dataset?

NDTiff is an N-dimensional, multiresolution file format designed specifically for large, complex bio-imaging datasets.

It is one of the three options for saving output data from multi-dimensional acquisitions in Micro-manager 2.0. For large datasets (>10 GB) it is the superior option.

More information can be found at the following links:

qDPC Algorithms

For processing the data, three algorithms from the Waller Lab are utilised:

  • DPC - Reconstructs phase using Tikhonov Regularised deconvolution [1]
  • Aberration-corrected DPC - Jointly solves for complex-field and pupil aberration [2]
  • 3D DPC - Reconstructs 3D refractive index from through focus data [3]

The DPC solver algorithm used in EasyDPC is dependent on the selection made in the Deconvolution Params section of the GUI (full GUI layout):

If the 2D solver is selected, the algorithm used is either:

  • DPC [1] if Tikhonov regularisation is selected
  • Aberration-corrected DPC [2] if TV (Total variation) regularisation is selected

Else, if the 3D solver is selected, the 3D DPC algorithm(s) [3] are used.

GUI Layout

A panel containing explanations for each entry in the GUI can be opened by clicking on the 'Docs' button in the top right corner of the window.

Sample Data

A sample dataset is included in Sample Data. For processing this dataset, the following system parameters should be used:

  • Wavelength = 0.5
  • Numerical Aperture = 0.4
  • Inner NA = 0.0
  • Magnification = 20.0
  • Camera Pixel Size = 3.69
  • Source Rotations = 270, 180, 90, 0
  • Z-step = 1.0
  • RI (medium) = 1.33

Troubleshooting

If when running the app you are presented the following error ModuleNotFoundError: No module named 'EasyDPC.third_party', this is likely caused by missing dependencies in the EasyDPC/third_party/WallerLab directory. Run git submodule update --init --recursive to initialise the submodules or manually download the code from the linked repositories. After these have been downloaded you will need to rerun pip install ..

Acknowledgements

The design and layout of this GUI was inspired by Nathan O'Connor's bead-analyser tool.

References

[1] L. Tian and L. Waller, ‘Quantitative differential phase contrast imaging in an LED array microscope’, Opt. Express, vol. 23, no. 9, p. 11394, May 2015, doi: 10.1364/OE.23.011394.

[2] M. Chen, Z. F. Phillips, and L. Waller, ‘Quantitative differential phase contrast (DPC) microscopy with computational aberration correction’, Opt. Express, vol. 26, no. 25, p. 32888, Dec. 2018, doi: 10.1364/OE.26.032888.

[3] M. Chen, L. Tian, and L. Waller, ‘3D differential phase contrast microscopy’, Biomed. Opt. Express, BOE, vol. 7, no. 10, pp. 3940–3950, Oct. 2016, doi: 10.1364/BOE.7.003940.

About

Processes multidimensional image stacks and recontructs quantitative phase data using differential phase contrast

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages