BIRDS插件代码学习【05】
Java 调用命令行
1 | import java.io.BufferedReader; |
elastix 使用
- 下载 elastix-5.1.0-win64,解压后得到
elastix.exe
和transformix.exe
- 下载 elastix 用户手册
- 命令行调用
elastix.exe
和transformix.exe
得到配准后的脑片1
2
3
4
5
6elastix.exe --help
elastix -f input/downSampleImage.tif -m input/tempImage.tif -out output -p input/Parameters_BSpline.txt
transformix.exe --help
transformix -in input/annotationImage.tif -out result -tp output/TransformParameters.0.txt
# 参数文件中可以设置输出格式,默认为mhd,此处修改为tif
ImageJ 合并通道
- 将待合并的两张图像载入ImageJ
- Image→Color→Merge Channels
- 脑片保留红色通道,脑区轮廓保留绿色通道(注意不要勾选create composite,以免保存时仅有最上层的通道)
- 保存为tif文件
二维脑片配准关键步骤
- 定位与脑片最匹配的图谱(相似度最高)
- 获取Allen全脑平均模板
tempImage
和对应的注释文件annotationImage
- 通过
elastix.exe
和transformix.exe
对脑片配准(模板→脑片 注释→脑片) - 根据注释文件获取脑区轮廓
lineImage
- 轮廓与脑片合并得到
fuseImage
- 根据annotationImage的像素值匹配脑区
- 脑区细胞计数
今日总结
到目前为止感觉BIRDS的配准是通过elastix实现的,需要看一下elastix的论文,然后试一下elastix进行脑片配准的效果。
不管老板对我的要求是怎样的,我对自己的要求就是把一个小项目做完再做下一个小项目,不能三心二意。我的课题要根据我自己的兴趣来,广泛涉猎给自己找一条出路,我现在没有能力回绝老板的各种要求就是因为我没有能够给出其他方案,要行动起来。
每天拿出1~2个小时跟着吴思老师实验室出的书《神经计算建模实战——基于brainpy》实操一下,总要下点功夫入门计算神经科学吧!可能需要补一下微积分的知识😎
参考文章
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 Stray Birds!
评论