EasyDPC is a GUI fronted python program that enables quick and easy processing of quantitative differential phase contrast (qDPC) images from bulk NDTiff datasets.
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.
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/:
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).
conda create --name easydpc-env python=3.11
conda activate easydpc-env
pip install .For optional GPU support, run
pip install ".[gpu3d]"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.
After following the installation instructions, the EasyDPC GUI can be started by running the following command from within the install environment.
easydpc-guiThis will open the initial screen of the GUI:
From here, the directory containing the NDTiff dataset to be processed can be selected.
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.
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:
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.
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.
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
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 ..
The design and layout of this GUI was inspired by Nathan O'Connor's bead-analyser tool.



