Filtering & RestorationChinese & English

Richardson-Lucy Deconvolution (RedLionfish)

Richardson-Lucy Deconvolution (RedLionfish) is a Dragonfly plugin that performs 3D Richardson-Lucy deconvolution to remove point-spread-function (PSF) blur and restore image sharpness. It runs as a dockable panel inside

Updated 2026-07-09User manual

Richardson-Lucy 反卷积 (RedLionfish) 插件用户手册

Richardson-Lucy Deconvolution (RedLionfish) - User Manual

Dragonfly Prototype Apps · Richardson-Lucy Deconvolution (RedLionfish)...

版本 Version 1.0 · 2026-07-09


第一部分 中文手册

目录

1. 简介

2. 适用场景

3. 安装与启用

4. 运行环境与首次配置

5. 界面说明

6. 使用步骤

7. 参数说明

8. 输出结果

9. 常见问题与故障排除

10. 注意事项与已知限制

11. 参考资料

1. 简介

Richardson-Lucy 反卷积 (RedLionfish) 是一个 Dragonfly 插件,对三维图像执行 Richardson-Lucy 反卷积(去卷积,deconvolution),用于消除因点扩散函数(Point-Spread Function,PSF)造成的模糊、恢复图像清晰度。插件以可停靠面板(dockable panel)的形式运行在 Dragonfly 窗口内。

具体流程:选择一个图像 Channel 作为输入,指定一个点扩散函数 (PSF) —— 既可选用已有的 PSF Channel,也可由 x/y/z 三个方向的高斯 sigma 自动生成合成高斯 PSF;设置迭代次数(默认 10)并选择 GPU 或 CPU 计算方式,然后点击 Deconvolve。插件调用 RedLionfish 的 doRLDeconvolutionFromNpArrays 完成反卷积,并将结果作为与源网格(grid)对齐的新 Channel 发布到场景中。

底层引擎与算法

  • 算法:Richardson-Lucy 迭代反卷积。在已知点扩散函数 (PSF) 的前提下,通过多次迭代逐步反推出未被模糊的原始信号,从而提升图像锐度与分辨率。
  • 计算引擎:RedLionfish(Apache-2.0 许可证)。它提供 GPU(通过 Reikna / PyOpenCL)与 CPU(scipy 回退)两条计算路径;若 GPU 路径失败或无可用设备,会自动回退到 CPU。
  • 数组接口:numpy(BSD 许可证),用于体数据在插件与计算环境之间的传递。

许可证要点

底层引擎 RedLionfish 为 Apache-2.0(宽松许可),numpy 为 BSD。插件本身代码遵循 Dragonfly Prototype Labs 仓库的许可条款。

本插件仅支持三维(3D)数据,且反卷积必须提供一个 PSF(可选 PSF Channel 或合成高斯 PSF)。

2. 适用场景

本插件适用于因光学系统 PSF 而模糊的三维图像去模糊,也可用于工业 CT 等需要点扩散反卷积以提升分辨率的场景。

  • 共聚焦 / 宽场荧光显微(confocal / widefield fluorescence):去除因点扩散函数造成的轴向与横向模糊。
  • 光片显微(light-sheet microscopy):恢复体积成像中被 PSF 拉伸的结构。
  • 工业 / 实验室 CT:对因系统点扩散而模糊的重建体进行反卷积,提升细节可见度。
  • 任意已知 PSF 的体数据:只要能提供测量 / 仿真的 PSF Channel,或能用高斯 sigma 近似描述 PSF,即可尝试去卷积。

反卷积是一种“锐化”操作:迭代次数越多结果越锐,但器件噪声也会被放大。建议先在代表性区域尝试适中的迭代次数。

3. 安装与启用

本插件作为 Prototype Apps 套件的一部分发布,通过完整安装包(Full Package)的安装器安装。

1. 将完整安装包解压到任意位置(建议使用如 C:\PL\ 的短路径,避免 Windows 260 字符路径限制)。

2. 双击运行 `Install_FullPackage.bat`。

3. 在弹出的对话框中选择核心安装模式(Fresh 全新安装 / Compatible 兼容安装),并在 Prototype Apps 列表中勾选 Richardson-Lucy Deconvolution (RedLionfish)。

4. 点击 Install,等待控制台提示完成。

5. 完全退出并重启 Dragonfly(菜单只在 Dragonfly 启动时扫描)。

默认情况下所有插件均未勾选(只有轻量菜单项默认开启),因此安装时需要手动勾选本插件才会部署。

重启后,菜单项出现在:Prototype Apps ▸ Richardson-Lucy Deconvolution (RedLionfish)...(位于 Filtering & Restoration 分区)。点击即可打开可停靠面板。

以后修改启用状态

最方便的方式是在 Dragonfly 内修改:打开 Developer ▸ Prototype Labs... ▸ Menu Item Manager,在底部的 “Prototype Apps (Full Package)” 列表中勾选 / 取消本插件(勾选 = 部署,取消 = 移除菜单项),重启 Dragonfly 生效。停用从不删除插件已搭建好的环境,重新启用立即可用。

安装完成后解压出来的文件夹可以删除 —— 以后需要的内容都保存在 %LOCALAPPDATA%\DragonflyPrototypeLabs\FullPackage 中。卸载时双击 `Uninstall_FullPackage.bat`,它会移除菜单项与插件,但保留插件已搭建的环境(venv)。

4. 运行环境与首次配置

重型计算在一个专用的 Python 虚拟环境(venv)中以子进程方式运行,与 Dragonfly 自身的 Python 隔离。首次使用需要先搭建这个环境。

Setup Environment 具体做什么

1. 在面板下方点击 Setup Environment 按钮。

2. 插件使用默认基础 Python(即当前 Dragonfly 自带的 Python)在插件代码目录内创建一个 venv。

3. 在该 venv 中升级 pip / setuptools / wheel,然后从 PyPI 官方源安装 RedLionfish 与 numpy。

4. 安装完成后进行一次导入自检(确认 numpy 与 RedLionfish.doRLDeconvolutionFromNpArrays 可用),并将 venv 的 python 路径记录到配置中。

环境就绪后,面板的 Status(状态) 行会显示 Ready: <venv python 路径>;未就绪时显示提示“Not set up - click 'Setup Environment'”。该环境只需搭建一次,以后会直接复用。

下载体量 / 联网 / GPU

  • 需要联网(仅首次):Setup Environment 会从 PyPI 下载 RedLionfish 与 numpy 及其依赖。
  • GPU 为可选加速项:GPU 反卷积需要可用的 OpenCL / PyOpenCL + Reikna 环境;若不可用,运行时会自动回退到 CPU 路径,无需人工干预。
  • 不需要 WSL 或外部软件。
  • 不向 Dragonfly 自身的 Python 安装任何东西;所有依赖均安装在插件代码目录的 venv 中。

环境安装到哪些路径

venv 创建在已安装的代码目录内,典型位置为 %LOCALAPPDATA%\comet\<Dragonfly版本>\pythonUserExtensions\GenericMenuItems\RedLionfish\venv。重新安装插件代码时不会覆盖已搭建的 venv。

失败时的替代方案

面板提供一个 Base Python(基础 Python) 输入框:留空表示使用当前 Dragonfly 的 Python;若 Dragonfly 的 Python 无法创建 venv(例如缺少 venv 模块),可在此填入另一个 CPython 3.10 以上 的解释器路径(如 C:\Python312\python.exe)或启动命令(如 py -3.11),再重新点击 Setup Environment。

5. 界面说明

面板从上到下分为五个区域:输入体、PSF、反卷积参数、环境,以及操作按钮与日志。

5.1 Input volume (3D image) — 输入体(3D 图像)

  • Channel 下拉框:选择作为输入的三维图像 Channel;列表中同时显示各 Channel 的名称与尺寸(如 名称 (z x y x x))。
  • Refresh 按钮:重新从 Dragonfly 场景拉取当前可用的 Channel 列表。若场景中没有 Channel,会显示“(no channels - load a volume in Dragonfly)”。

5.2 Point-spread function (PSF) — 点扩散函数

  • 单选:Use a PSF Channel——选中后启用下方的 PSF Channel 下拉框,从场景中选择一个已有的(测量 / 仿真)PSF Channel。
  • 单选:Synthetic Gaussian PSF(默认选中)——由下方 x/y/z 高斯 sigma 自动生成合成高斯 PSF。
  • Gaussian sigma (voxels):三个数值输入框 x / y / z,单位为体素(voxels),默认均为 2.0,取值范围 0.0–50.0,步长 0.5。sigma 为 0 时该轴收缩为单体素(delta)。

选择 “Use a PSF Channel” 时,三个 sigma 输入框会置灰;选择 “Synthetic Gaussian PSF” 时,PSF Channel 下拉框会置灰。两者互斥。

5.3 Deconvolution parameters — 反卷积参数

  • Iterations(迭代次数):整数输入框,默认 10,取值范围 1–1000。次数越多结果越锐但噪声越大。
  • Method(方法):两个单选 GPU (OpenCL)(默认选中)与 CPU。GPU 通过 Reikna / PyOpenCL,若无兼容设备则自动回退到 CPU。

5.4 Environment (RedLionfish venv) — 环境

  • Base Python(基础 Python):输入框,留空 = 使用当前 Dragonfly 的 python;也可填入一个解释器路径或启动命令(如 py -3.11)。
  • Status(状态):显示当前 venv 是否就绪。

5.5 操作按钮与日志

  • Setup Environment 按钮:搭建 / 复用 venv,安装 RedLionfish + numpy(见第 4 章)。
  • Deconvolve 按钮:启动 Richardson-Lucy 反卷积计算。
  • 摘要行:计算完成后显示输出尺寸、迭代次数、实际使用的方法(GPU/CPU)、输出数值范围与均值。
  • 日志区:只读文本框,实时打印进度与信息。

6. 使用步骤

以下为从输入到输出的完整端到端流程。前提:已在 Dragonfly 中载入一个三维图像 Channel;首次使用已完成 Setup Environment。

6.1 使用合成高斯 PSF(无实测 PSF 时)

1. 打开 Prototype Apps ▸ Richardson-Lucy Deconvolution (RedLionfish)...。

2. 若 Status 显示未就绪,先点击 Setup Environment 并等待完成。

3. 在 Input volume 中从 Channel 下拉框选择要去卷积的三维图像(必要时先点 Refresh)。

4. 在 PSF 中保持 Synthetic Gaussian PSF,根据成像各轴的模糊程度设置 x / y / z 的 sigma(体素)。

5. 在 Deconvolution parameters 中设置 Iterations(默认 10),并选择 Method(GPU / CPU)。

6. 点击 Deconvolve,在日志中观察进度。

7. 完成后,新 Channel <名称> - RL deconvolved 会直接出现在场景中(无需重启)。

6.2 使用已有 PSF Channel

1. 先在 Dragonfly 中载入或生成一个 PSF Channel(与输入体同为三维 Channel)。

2. 在面板中点 Refresh,确保 Channel 与 PSF 两个下拉框都列出了它。

3. 在 PSF 中选择 Use a PSF Channel,并在 PSF Channel 下拉框中选定那个 PSF。

4. 设置 Iterations 与 Method,点击 Deconvolve。

5. 完成后同样得到一个 <名称> - RL deconvolved Channel。

若选了 “Use a PSF Channel” 但未选择任何 PSF Channel,或未选择输入 Channel,日志会提示错误并终止。

7. 参数说明

参数

默认值

说明

Channel

(无)

输入的三维图像 Channel;必选。

PSF source(PSF 来源)

Synthetic Gaussian PSF

二选一:Use a PSF Channel(选用已有 PSF Channel)或 Synthetic Gaussian PSF(高斯合成,默认)。

PSF Channel

(无)

仅在 “Use a PSF Channel” 时启用;选择作为 PSF 的 Channel。

Gaussian sigma x / y / z(体素)

2.0 / 2.0 / 2.0

仅在 “Synthetic Gaussian PSF” 时启用;各轴高斯 sigma,范围 0.0–50.0,步长 0.5。

Iterations(迭代次数)

10

Richardson-Lucy 迭代次数,范围 1–1000;越大越锐但噪声越大。

Method(方法)

GPU (OpenCL)

GPU(OpenCL/Reikna)或 CPU;GPU 无可用设备时自动回退到 CPU。

Base Python(基础 Python)

(留空)

留空 = 当前 Dragonfly 的 python;可填入 CPython 3.10+ 路径或启动命令(仅用于搭建环境)。

8. 输出结果

反卷积完成后,插件向 Dragonfly 场景发布一个新的 Channel:

  • `<原 Channel 名称> - RL deconvolved`:去模糊(去卷积)后的体数据。

新 Channel 与源图像的网格(grid)对齐,即继承相同的体素间距(spacing)与原点(origin),因此可与原体数据在同一视图中对照查看。

输出 Channel 会立即出现在 Dragonfly 的对象列表(无需重启)。可像任何普通 Channel 一样:在 2D/3D 视图中显示、调整窗位 / 颜色映射、进一步分割或测量、以及导出保存。

请注意:反卷积后的图像为浮点数值,其强度范围与原图不同。面板摘要行会给出输出的数值范围与均值,便于确认。

9. 常见问题与故障排除

问:菜单里找不到插件?

答:确认安装时已勾选本插件(默认不勾选),并且安装后已完全退出并重启 Dragonfly(菜单只在启动时扫描)。也可在 Developer ▸ Prototype Labs... ▸ Menu Item Manager 中确认已启用。

问:点 Deconvolve 提示环境未搭建(environment not set up)?

答:先点 Setup Environment 搭建 venv。若 Dragonfly 自带 python 无法创建 venv,在 Base Python 中填入一个 CPython 3.10+ 路径后重试。搭建需要联网(仅首次)。

问:GPU 没有生效 / 日志显示回退到 CPU?

答:GPU 反卷积需要可用的 OpenCL / PyOpenCL + Reikna 环境与兼容设备。若不可用,插件会自动使用 CPU 路径(结果相同,只是较慢);面板摘要行的 “method used” 会显示实际使用的方法。

问:提示内存不足(Out of memory)?

答:请尝试更小的 ROI 或先对体数据降采样后再去卷积。大体积三维反卷积内存开销较大。

问:提示需要三维数据 / PSF 必须为 3D?

答:本插件仅支持三维(3D)数据,且 PSF 必须为三维(z, y, x)。请确保输入 Channel 与 PSF Channel 均为三维。

问:结果噪声太大 / 伪影明显?

答:适当减少迭代次数,或使用更接近实际成像的 PSF(实测 PSF Channel 或更准确的高斯 sigma)。

10. 注意事项与已知限制

  • 仅支持三维(3D)数据,且反卷积必须提供一个 PSF。
  • 首次搭建环境需要联网(从 PyPI 安装 RedLionfish + numpy)。
  • GPU 为可选加速:需要 OpenCL / PyOpenCL + Reikna;无则自动使用 CPU。
  • 反卷积会放大噪声;迭代次数需根据数据权衡。
  • PSF 的准确性直接影响结果质量;合成高斯 PSF 只是近似,有实测 PSF 时优先使用。
  • 大体积体数据内存开销较大,必要时先降采样或取 ROI。
  • 环境与 Dragonfly 自身 Python 隔离,不会影响 Dragonfly 本体。

11. 参考资料

  • RedLionfish(上游项目,Apache-2.0):https://github.com/rosalindfranklininstitute/RedLionfish
  • numpy(BSD):https://numpy.org
  • Prototype Apps 安装 / 启用总说明:完整安装包根目录的总手册 UserManual_用户手册.docx(同时涵盖 Prototype Labs 与全部 Prototype Apps)。


Part II English Manual

Contents

1. Overview

2. Use Cases

3. Installation and Enabling

4. Environment and First-Run Setup

5. Interface Guide

6. Usage Steps

7. Parameter Reference

8. Output

9. FAQ and Troubleshooting

10. Notes and Known Limitations

11. References

1. Overview

Richardson-Lucy Deconvolution (RedLionfish) is a Dragonfly plugin that performs 3D Richardson-Lucy deconvolution to remove point-spread-function (PSF) blur and restore image sharpness. It runs as a dockable panel inside the Dragonfly window.

Workflow: pick an image Channel as input, specify a point-spread function (PSF) - either an existing PSF Channel or a synthetic Gaussian generated from per-axis (x/y/z) sigmas; set the iteration count (default 10), choose GPU or CPU, and click Deconvolve. The plugin runs RedLionfish's doRLDeconvolutionFromNpArrays and publishes the result as a new Channel aligned with the source grid.

Engine and algorithm

  • Algorithm: Richardson-Lucy iterative deconvolution. Given a known PSF, it iteratively recovers the un-blurred signal, improving sharpness and effective resolution.
  • Compute engine: RedLionfish (Apache-2.0 license). It provides a GPU path (via Reikna / PyOpenCL) and a CPU path (scipy fallback); if the GPU path fails or no device is present, it falls back to CPU automatically.
  • Array interface: numpy (BSD license), used to move volume data between the plugin and the compute environment.

Licensing

The RedLionfish engine is Apache-2.0 (permissive); numpy is BSD. The plugin code follows the terms of the Dragonfly Prototype Labs repository.

This plugin supports 3D data only, and deconvolution requires a PSF (either a PSF Channel or a synthetic Gaussian PSF).

2. Use Cases

The plugin deblurs 3D images blurred by an optical PSF, and also helps any workflow (e.g. industrial CT) where PSF deconvolution improves resolution.

  • Confocal / widefield fluorescence microscopy: remove axial and lateral blur caused by the point-spread function.
  • Light-sheet microscopy: recover structures stretched by the PSF in a volumetric acquisition.
  • Industrial / lab CT: deconvolve reconstructed volumes blurred by system point spread to make fine detail more visible.
  • Any volume with a known PSF: as long as you can supply a measured/simulated PSF Channel, or describe the PSF with Gaussian sigmas, you can attempt deconvolution.

Deconvolution is a sharpening operation: more iterations mean a sharper result but also amplified detector noise. Try a moderate iteration count on a representative region first.

3. Installation and Enabling

This plugin ships as part of the Prototype Apps collection and is installed via the Full Package installer.

1. Unzip the Full Package anywhere (a short path such as C:\PL\ is recommended to avoid the Windows 260-character path limit).

2. Double-click `Install_FullPackage.bat`.

3. In the dialog, pick the core install mode (Fresh / Compatible) and tick Richardson-Lucy Deconvolution (RedLionfish) in the Prototype Apps list.

4. Click Install and wait for the console to finish.

5. Quit Dragonfly completely and restart it (menus are discovered only at startup).

By default all plugins are unchecked (only the light menu items are on), so you must tick this plugin for it to be deployed.

After the restart, the entry appears under Prototype Apps ▸ Richardson-Lucy Deconvolution (RedLionfish)... (in the Filtering & Restoration section). Click it to open the dockable panel.

Changing your choice later

The easiest way is inside Dragonfly: open Developer ▸ Prototype Labs... ▸ Menu Item Manager and use the checkbox for this plugin in the "Prototype Apps (Full Package)" list (ticked = deploy, unticked = remove the menu entry). Restart Dragonfly to apply. Disabling never deletes a plugin's environment, so re-enabling is instant.

You may delete the unzipped folder after installing - everything needed later is kept under %LOCALAPPDATA%\DragonflyPrototypeLabs\FullPackage. To uninstall, double-click `Uninstall_FullPackage.bat`; it removes the menu items and plugins but keeps each plugin's built environment (venv).

4. Environment and First-Run Setup

The heavy compute runs in a dedicated Python virtual environment (venv) as a subprocess, isolated from Dragonfly's own Python. You must build this environment once before first use.

What Setup Environment does

1. Click the Setup Environment button in the panel.

2. The plugin creates a venv inside the plugin's code directory, using the default base Python (this Dragonfly's own Python).

3. It upgrades pip / setuptools / wheel in that venv, then pip-installs RedLionfish and numpy from the official PyPI index.

4. It runs an import self-check (confirming numpy and RedLionfish.doRLDeconvolutionFromNpArrays are usable) and records the venv python path in the config.

When ready, the panel's Status line shows Ready: <venv python path>; otherwise it shows a "Not set up - click 'Setup Environment'" hint. The environment is built once and reused thereafter.

Download size / internet / GPU

  • Internet is needed once: Setup Environment downloads RedLionfish, numpy and their dependencies from PyPI.
  • GPU is an optional accelerator: GPU deconvolution needs a working OpenCL / PyOpenCL + Reikna stack; without it the run falls back to CPU automatically, with no user action.
  • No WSL or external application is required.
  • Nothing is installed into Dragonfly's own Python; all dependencies live in the plugin's venv.

Where the environment is installed

The venv is created inside the installed code directory, typically %LOCALAPPDATA%\comet\<Dragonfly version>\pythonUserExtensions\GenericMenuItems\RedLionfish\venv. Reinstalling the plugin code never clobbers an existing venv.

Fallback when setup fails

The panel has a Base Python field: blank means "use this Dragonfly's python". If Dragonfly's Python cannot build a venv (e.g. no venv module), enter the path of another CPython 3.10 or newer interpreter (such as C:\Python312\python.exe) or a launch command (such as py -3.11), then click Setup Environment again.

5. Interface Guide

The panel is divided top-to-bottom into five areas: input volume, PSF, deconvolution parameters, environment, and the action buttons plus log.

5.1 Input volume (3D image)

  • Channel dropdown: pick the 3D image Channel used as input; each entry shows the Channel name and its size (e.g. name (z x y x x)).
  • Refresh button: re-reads the list of available Channels from the Dragonfly scene. If there are no Channels, it shows "(no channels - load a volume in Dragonfly)".

5.2 Point-spread function (PSF)

  • Radio: Use a PSF Channel - when selected, the PSF Channel dropdown below becomes active so you can pick an existing (measured/simulated) PSF Channel from the scene.
  • Radio: Synthetic Gaussian PSF (selected by default) - builds a synthetic Gaussian PSF from the x/y/z sigmas below.
  • Gaussian sigma (voxels): three numeric fields x / y / z, in voxels, each defaulting to 2.0, range 0.0-50.0, step 0.5. A sigma of 0 collapses that axis to a single voxel (delta).

When "Use a PSF Channel" is selected the three sigma fields are greyed out; when "Synthetic Gaussian PSF" is selected the PSF Channel dropdown is greyed out. The two are mutually exclusive.

5.3 Deconvolution parameters

  • Iterations: an integer spinbox, default 10, range 1-1000. More iterations = sharper but noisier.
  • Method: two radios GPU (OpenCL) (default) and CPU. GPU uses Reikna / PyOpenCL and falls back to CPU if no compatible device is found.

5.4 Environment (RedLionfish venv)

  • Base Python: a text field; blank = use this Dragonfly's python; you can also enter an interpreter path or a launch command (such as py -3.11).
  • Status: shows whether the venv is ready.

5.5 Action buttons and log

  • Setup Environment button: builds/reuses the venv and installs RedLionfish + numpy (see Chapter 4).
  • Deconvolve button: starts the Richardson-Lucy deconvolution.
  • Summary line: after completion, shows output shape, iterations, the method actually used (GPU/CPU), and the output value range and mean.
  • Log area: a read-only text box that prints progress and messages in real time.

6. Usage Steps

Below are the end-to-end workflows. Prerequisites: a 3D image Channel is loaded in Dragonfly, and (on first use) Setup Environment has been completed.

6.1 Using a synthetic Gaussian PSF (no measured PSF)

1. Open Prototype Apps ▸ Richardson-Lucy Deconvolution (RedLionfish)....

2. If Status shows not ready, click Setup Environment and wait for it to finish.

3. In Input volume, pick the 3D image to deconvolve from the Channel dropdown (click Refresh if needed).

4. In PSF, keep Synthetic Gaussian PSF and set the x / y / z sigmas (voxels) according to how blurred each axis is.

5. In Deconvolution parameters, set Iterations (default 10) and choose Method (GPU / CPU).

6. Click Deconvolve and watch progress in the log.

7. When done, the new Channel <name> - RL deconvolved appears directly in the scene (no restart needed).

6.2 Using an existing PSF Channel

1. First load or generate a PSF Channel in Dragonfly (a 3D Channel like the input volume).

2. In the panel, click Refresh so both the Channel and PSF dropdowns list it.

3. In PSF, select Use a PSF Channel and choose that PSF in the PSF Channel dropdown.

4. Set Iterations and Method, then click Deconvolve.

5. When done, you again get a <name> - RL deconvolved Channel.

If "Use a PSF Channel" is selected but no PSF Channel is chosen, or no input Channel is selected, the log reports an error and stops.

7. Parameter Reference

Parameter

Default

Description

Channel

(none)

The input 3D image Channel; required.

PSF source

Synthetic Gaussian PSF

One of: Use a PSF Channel (an existing PSF Channel) or Synthetic Gaussian PSF (default).

PSF Channel

(none)

Active only when "Use a PSF Channel" is selected; the Channel used as the PSF.

Gaussian sigma x / y / z (voxels)

2.0 / 2.0 / 2.0

Active only for "Synthetic Gaussian PSF"; per-axis Gaussian sigma, range 0.0-50.0, step 0.5.

Iterations

10

Number of Richardson-Lucy iterations, range 1-1000; larger = sharper but noisier.

Method

GPU (OpenCL)

GPU (OpenCL/Reikna) or CPU; GPU falls back to CPU automatically if no device is available.

Base Python

(blank)

Blank = this Dragonfly's python; or a CPython 3.10+ path / launch command (used only to build the environment).

8. Output

When deconvolution finishes, the plugin publishes one new Channel to the Dragonfly scene:

  • `<source Channel name> - RL deconvolved`: the deblurred (deconvolved) volume.

The new Channel is aligned with the source image grid - it inherits the same voxel spacing and origin - so it can be inspected side-by-side with the original in the same view.

The output Channel appears immediately in Dragonfly's object list (no restart). You can treat it like any Channel: display it in 2D/3D views, adjust window/color mapping, segment or measure it further, and export/save it.

Note: the deconvolved image is floating-point and its intensity range differs from the original. The panel summary line reports the output value range and mean so you can confirm the result.

9. FAQ and Troubleshooting

Q: The plugin does not appear in the menu.

A: Make sure you ticked this plugin during install (all plugins are off by default), and that you quit and restarted Dragonfly afterward (menus are only scanned at startup). You can also confirm it is enabled in Developer ▸ Prototype Labs... ▸ Menu Item Manager.

Q: Clicking Deconvolve says the environment is not set up.

A: Click Setup Environment first to build the venv. If Dragonfly's own python cannot create a venv, enter a CPython 3.10+ path in Base Python and retry. Setup needs internet the first time.

Q: GPU is not used / the log says it fell back to CPU.

A: GPU deconvolution needs a working OpenCL / PyOpenCL + Reikna stack and a compatible device. When it is not available the plugin automatically uses the CPU path (same result, just slower); the summary's "method used" shows what actually ran.

Q: I get an out-of-memory error.

A: Try a smaller ROI or downsample the volume before deconvolving. 3D deconvolution on a large volume is memory-heavy.

Q: It says 3D data / PSF is required.

A: The plugin supports 3D data only, and the PSF must be 3D (z, y, x). Ensure both the input Channel and any PSF Channel are 3D.

Q: The result is too noisy or shows obvious artifacts.

A: Reduce the iteration count, or use a PSF that better matches your imaging (a measured PSF Channel, or more accurate Gaussian sigmas).

10. Notes and Known Limitations

  • 3D data only, and deconvolution always requires a PSF.
  • First-time environment setup needs internet (installs RedLionfish + numpy from PyPI).
  • GPU is an optional accelerator: it needs OpenCL / PyOpenCL + Reikna; otherwise the CPU path is used.
  • Deconvolution amplifies noise; balance the iteration count against your data.
  • PSF accuracy directly affects result quality; prefer a measured PSF over a synthetic Gaussian when available.
  • Large volumes are memory-heavy; downsample or use a ROI when necessary.
  • The environment is isolated from Dragonfly's own Python and does not affect Dragonfly itself.

11. References

  • RedLionfish (upstream project, Apache-2.0): https://github.com/rosalindfranklininstitute/RedLionfish
  • numpy (BSD): https://numpy.org
  • Prototype Apps install / enable overview: the top-level UserManual_用户手册.docx in the Full Package root (covers both Prototype Labs and all Prototype Apps).
You’ve reached the end of this manual.Explore the library →