bids格式数据中config文件的编写

config文件的编写

参考资料
官网
github详细描述
PDF文档
1.对应放置路径:code/
官网样本:

{
    
    
    "descriptions": [
        {
    
    
            "dataType": "func",
            "modalityLabel": "bold",
            "customLabels": "task-rest",
            "criteria": {
    
    
                "SidecarFilename": "006*",
                "ImageType": ["ORIG*", "PRIMARY", "M", "ND", "MOSAIC"]
            }
        },
        {
    
    
            "dataType": "anat",
            "modalityLabel": "T2w",
            "criteria": {
    
    
                "SeriesDescription": "*T2*",
                "EchoTime": 0.1
            },
            "sidecarChanges": {
    
    
                "ProtocolName": "T2"
            }
        },
        {
    
    
            "dataType": "fmap",
            "modalityLabel": "fmap",
            "intendedFor": 0,
            "criteria": {
    
    
                "ProtocoleName": "*field_mapping*"
            }
        }
    ]
}

2.文件的作用:准确找到和筛选DICOM数据并且将其分门别类放在对应BIDS目录结构下;

3.准备工作:利用dcm2bids_helper生成一个帮助文件夹,这里主要用到.json文件中header文件信息中的sidecars信息(For each acquisition, dcm2niix creates an associated .json file, containing information from the dicom header. These are known as sidecars.)
在这里插入图片描述
在这里插入图片描述
4.criteria
1)匹配模式基于shell-style,例如:
*:匹配任何字符串
?:单字符
可以输入多个条件,但所有条件都必须匹配,保证能够唯一检索到。

5.dataTypemandatory field
以bids v1.2.0为例,定义六种数据类型:
func :task based and resting state functional MRI
dwi :diffusion weighted imaging
fmap :field inhomogeneity mapping data such as field maps
anat :structural imaging such as T1, T2, etc.
meg :magnetoencephalography
beh :behavioral

6.modalityLabel
必填字段,如T1w,T2w,或者dwi,bold等。

7.customLabels
可选填
详细资料参考pdf文档

8.sidecarChanges
可选填

9.intendedFor
可选填
在fieldmap的描述中加入,表示该fmap用于校正的fMRI目标图像。注意:0即第一个,上述例子即对应task-rest_bold.

总结

本篇是config文件的一个简单介绍,主要用于自己记录方便后续查找。内容基本上基于官网描述。.json的文件自己也可以通过脚本文件生成,使用一些例如sublime的文本编辑器最后保存为json格式。
小提醒:再回顾回顾linux的相关命令!

おすすめ

転載: blog.csdn.net/qq_42698411/article/details/122274886