迭代荧光显微镜的图像配准
项目描述
此Python包实现是迭代漂白扩展多路性(IBEX)成像技术开发的组成部分。它使使用IBEX获取的多个荧光图像周期对齐成为可能。使用重复标记将所有面板配准到所选面板(在配准命名法中,这是固定图像)。配准后,所有面板都重新采样到固定图像。
有关IBEX技术开发的更多信息,请参阅IBEX成像社区,这是一个研究人员社区,他们正在开发IBEX试剂、协议、面板、出版物、软件和数据集的知识库。
虽然此方法是为特定成像协议开发的,但它可能适用于包含重复标记的其他顺序协议。注册方法使用SimpleITK工具包注册框架实现。
主要实现方面包括
基于多阶段的鲁棒初始化方法。
多分辨率和点采样。
仿射变换模型。
使用相关性作为优化的相似性度量。
构建状态
安装
此Python模块在PyPI - Python包索引上分发。可以通过运行以下命令安装该包:
python -m pip install sitkibex[zarr]
主分支的轮子可以从“python-package”工件中的 Github Actions 下载。
依赖项通常在 setup.py 和 requirements.txt 中指定,因此当安装轮子时会作为依赖项安装。这包括 SimpleITK 2.0 的需求。可选的“zarr”依赖项用于读取 OME-NGFF ZARR 文件,如果不需要,则可以省略。
数据
样本数据可在 Zenodo 上获取并描述。
任何由 SimpleITK 的 IO 支持的图像和转换文件格式都可以由 sitk-ibex 使用。推荐的 NRRD 或 `NGFF <https://ngff.openmicroscopy.org/latest/>`_ 图像格式,以及 txt 转换文件扩展名。
示例
以下示例使用从“IBEX4_spleen”数据集中提取的 CD4 标记通道,使用 ImageJ。面板 2 用作参考坐标或“固定图像”。其他面板随后进行配准并重采样到固定图像。以下示例使用 sitk-ibex 命令行界面执行图像配准
python -m sitkibex registration --affine "spleen_panel2.nrrd@CD4 AF594" "spleen_panel1.nrrd@CD4 AF594" tx_p2_to_p1.txt python -m sitkibex registration --affine "spleen_panel2.nrrd@CD4 AF594" "spleen_panel3.nrrd@CD4 AF594" tx_p2_to_p3.txt
可以使用以下方式快速生成结果的 2D 可视化
python -m sitkibex resample "spleen_panel2.nrrd@CD4 AF594" "spleen_panel1.nrrd@CD4 AF594" tx_p2_to_p1.txt \ --bin 4 --fusion --projection -o spleen_onto_p2_2d_Panel1.png python -m sitkibex resample "spleen_panel2.nrrd@CD4 AF594" "spleen_panel3.nrrd@CD4 AF594" tx_p2_to_p3.txt \ --bin 4 --fusion --projection -o spleen_onto_p2_2d_Panel3.png
上面的图像融合将固定图像渲染为洋红色,将移动图像渲染为青色,因此当两者对齐时,结果为白色。
然后通过将输入图像的所有通道重采样到面板 2 来应用配准变换
python -m sitkibex resample "spleen_panel2.nrrd@CD4 AF594" spleen_panel2.nrrd tx_p2_to_p1.txt \ -o spleen_onto_p2_panel1.nrrd python -m sitkibex resample "spleen_panel2.nrrd@CD4 AF594" spleen_panel3.nrrd tx_p2_to_p3.txt \ -o spleen_onto_p2_panel3.nrrd
其他示例
其他样本数据
可以使用 bioformats2raw 将样本 Imaris 文件转换为 OME-NGFF ZARR。ims 文件包含一个系列,为了简单起见,使用以下命令生成没有系列索引的层次结构结构
bioformats2raw --series 0 --scale-format-string '%2$d/' Human_Spleen_Panel1.ims Human_Spleen_Panel1.zarr bioformats2raw --series 0 --scale-format-string '%2$d/' Human_Spleen_Panel2.ims Human_Spleen_Panel2.zarr bioformats2raw --series 0 --scale-format-string '%2$d/' Human_Spleen_Panel2.ims Human_Spleen_Panel3.zarr
这些图像将基于共同的“Hoechst”进行配准。从 Imaris 转换到 OME-NGFF ZARR 的过程中丢失了通道名称。某些转换在 ZARR 文件中产生“omera”元数据,其中包含通道标签,可以用来。当通道标签不可用时,可以使用通道索引,例如以下命令
python -m sitkibex registration --affine "Human_Spleen_Panel2.zarr@3" "Human_Spleen_Panel1.zarr@2" tx_p2_to_p1.txt python -m sitkibex registration --affine "Human_Spleen_Panel2.zarr@3" "Human_Spleen_Panel3.zarr@4" tx_p2_to_p3.txt
可以像 NRRD 示例一样运行快速的 2D 可视化。OME-NGFF ZARR 文件不支持写入,因此重采样命令可以生成 NRRD 文件。
如何引用
如果您在工作中使用了 SITK-IBEX 包,请引用我们
A. J. Radtke, E. F. Kandov, B. C. Lowekamp, E. Speranza, C. Chu, A. Gola, N. Thakur, R. Shih, L. Yao, Z. R. Yaniv, R. Beuschel, J. Kabat, J. Croteau, J. Davis, J. M. Hernandez, R. N. Germain “IBEX - A versatile multi-plex optical imaging approach for deep phenotyping and spatial analysis of cells in complex tissues”,Proc Natl Acad Sci,117(52):33455-33465,2020,doi:10.1073/pnas.2018488117。
文档
发布的 Sphinx 文档在此处可用:https://niaid.github.io/sitk-ibex/
主构建 Sphinx 文档可以从 Github Actions 下载,构建为“sphinx-docs”。
联系方式
请使用 GitHub Issues 获取与 sitk-ibex 项目相关的支持和代码问题。
项目详情
下载文件
下载适用于您平台的文件。如果您不确定该选择哪一个,请了解有关安装软件包的更多信息。