我的目标是用一个3D球面掩模在给定的位置上对3D图像进行掩模。 我想提取这个3D蒙版中所有的图像值
我目前正在使用python的nilearn.image.NiftiSpheresMasker函数通过以下方式实现:
central_coordinates=(x,y,z)
masker = NiftiSpheresMasker(central_coordinates, radius=rad)
values=masker.fit_transform(resampled_image)
但是,这只返回ROI内的平均信号。有没有办法:
另外,我已经尝试过使用FSL的fslmaths -kernel
,它适用于立方体,但不适用于球体。在
我通过使用nltools包中的函数
create_sphere
解决了这个问题查看此链接:https://github.com/ljchang/nltools/issues/122
相关问题 更多 >
编程相关推荐