neuroscience - 如何修复未创建 template_4D_GM 文件的 fslvbm_2_template 中的错误
问题描述
我正在 FSL 中运行 VBM 分析。我在 JISC 邮件档案中搜索了此错误的解决方案,但没有运气。我的笔记本电脑上有很多可用空间,所以这不是空间问题。我在多个 Mac 系统上也遇到过这个问题。任何帮助将不胜感激,我已经为此苦苦挣扎了好几天。
当我运行代码“fslvbm_2_template -n”时,我希望创建一个名为 template_4D_GM 的文件,但在输出中会出现以下错误代码:
Running segmentation: ID=64663
Running initial registration: ID=64926
Image Exception : #63 :: No image files match: 1_002_s_####_struc_GM_to_T
libc++abi.dylib: terminating with uncaught exception of type std::runtime_error: No image files match: 1_002_s_####_struc_GM_to_T
./fslvbm2c: line 13: 68739 Abort trap: 6
$FSLDIR/bin/fslmerge -t template_4D_GM $mergelist
Image Exception : #63 :: No image files match: template_4D_GM
libc++abi.dylib: terminating with uncaught exception of type std::runtime_error: No image files match: template_4D_GM
./fslvbm2c: line 14: 68740 Abort trap: 6
$FSLDIR/bin/fslmaths template_4D_GM -Tmean template_GM
Image Exception : #63 :: No image files match: template_GM
No image files match: template_GM
/usr/local/fsl/bin/fslswapdim: line 107: [: =: unary operator expected
Image Exception : #63 :: No image files match: template_GM
No image files match: template_GM
/usr/local/fsl/bin/fslswapdim: line 115: [: -gt: unary operator expected
Image Exception : #63 :: No image files match: template_GM
No image files match: template_GM
/usr/local/fsl/bin/fslswapdim: line 117: [: -gt: unary operator expected
Image Exception : #63 :: No image files match: template_GM
libc++abi.dylib: terminating with uncaught exception of type std::runtime_error: No image files match: template_GM
/usr/local/fsl/bin/fslswapdim: line 184: 68769 Abort trap: 6 $comm
Image Exception : #63 :: No image files match: template_GM
libc++abi.dylib: terminating with uncaught exception of type std::runtime_error: No image files match: template_GM
./fslvbm2c: line 16: 68770 Abort trap: 6
$FSLDIR/bin/fslmaths template_GM -add template_GM_flipped -div 2 template_GM_init
Creating first-pass template: ID=
Running registration to first-pass template: ID=The command you have requested cannot be found or is not executable
/usr/local/fsl/bin/fsl_sub: line 514: you: command not found
Creating second-pass template: ID=
Study-specific template will be created, when complete, check results with:
fslview struc/template_4D_GM
and turn on the movie loop to check all subjects, then run:
fslview /usr/local/fsl/data/standard/tissuepriors/avg152T1_gray struc/template_GM
to check general alignment of mean GM template vs. original standard space template.
运行“fslvbm_2_template -n”时,我发现 fslvbm2a 和 fslvbm2b 将正常运行,但我在 fslvbm2c 遇到了问题。当我从 fslvbm_2_template 运行这段特定的代码时 - FSLVBM 模板创建(http://ftp.nmr.mgh.harvard.edu/pub/dist/freesurfer/tutorial_packages/OSX/fsl_501/bin/fslvbm_2_template):
MacBook-Pro:struc name$ cat <<stage_tpl3 > fslvbm2c
#!/bin/sh
> if [ -f ../template_list ] ; then
> template_list=\`cat ../template_list\`
> template_list=\`\$FSLDIR/bin/remove_ext \$template_list\`
> else
> template_list=\`echo *_struc.* | sed 's/_struc\./\./g'\`
> template_list=\`\$FSLDIR/bin/remove_ext \$template_list | sort -u\`
> echo "WARNING - study-specific template will be created from ALL input data - may not be group-size matched!!!"
> fi
> for g in \$template_list ; do
> mergelist="\$mergelist \${g}_struc_GM_to_T"
> done
> \$FSLDIR/bin/fslmerge -t template_4D_GM \$mergelist
> \$FSLDIR/bin/fslmaths template_4D_GM -Tmean template_GM
> \$FSLDIR/bin/fslswapdim template_GM -x y z template_GM_flipped
> \$FSLDIR/bin/fslmaths template_GM -add template_GM_flipped -div 2 template_GM_init
> stage_tpl3
MacBook-Pro:struc name$ chmod +x fslvbm2c
MacBook-Pro:struc name$ fslvbm2c_id=`fsl_sub -j $fslvbm2b_id -T 15 -N
fslvbm2c ./fslvbm2c`
MacBook-Pro:struc name$ echo Creating first-pass template: `ID=$fslvbm2c_id`
Creating first-pass template: ID=The command you have requested cannot be found or is not executable
解决方案
我遇到了同样的问题,调试时发现问题出在第 94 行T=${FSLDIR}/data/standard/tissuepriors/avg152T1_gray
(in fslvbm_2_template
)。问题是这个图像(用作模板)是一个.hdr,但它需要是一个nii.gz
程序可读的。因此,解决方案是下载一个avg152T1_gray.nii.gz
.hdr 图像并将其替换为新图像。我将avg152T1_gray.nii.gz
名称更改为avg152T1_grayNI.nii.gz
并将其复制到同一文件夹(tissuepriors)中。
#T=${FSLDIR}/data/standard/tissuepriors/avg152T1_gray
(注释 .hdr 图像不起作用)
T=${FSLDIR}/data/standard/tissuepriors/avg152T1_grayNI
(适合我的.nii.gz 图像)
推荐阅读
- javascript - angularfire2 上传后显示图片
- bluetooth-lowenergy - 我想使用带有旋转编码器的 Adafruit nrf52 羽毛。我想看看发送媒体和其他控制键的工作示例
- python - 在云 shell 上运行 python 脚本并将输出保存到云 sql
- javascript - styled-components 不重新设置组件的样式
- html - 导航栏背景图像仍然被背景颜色覆盖
- owl - Protege:用类型替换一个类
- angular - Typescript 指令出错:VS2017 中的“断点已设置但尚未绑定”
- .net - CLR 无法在 UWP 中创建基于 .NET 的 COM 对象
- wpf - Xaml 在按钮内对齐文本和图像
- javascript - 如何将 puppeteer 浏览器设置为变量?