Как исправить ошибку в fslvbm_2_template, где не создан файл template_4D_GM - PullRequest
0 голосов
/ 11 октября 2019

Я выполняю анализ VBM в FSL. Я искал в архивах JISC Mail решения этой ошибки, но мне не повезло. У меня много свободного места на моем ноутбуке, так что это не проблема пространства. У меня также была эта проблема в нескольких системах 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

1 Ответ

0 голосов
/ 11 ноября 2019

У меня была такая же проблема, и при отладке я обнаружил, что проблема была в строке 94 T=${FSLDIR}/data/standard/tissuepriors/avg152T1_grayfslvbm_2_template). Проблема в том, что это изображение (используется в качестве шаблона) является .hdr, но оно должно быть nii.gz, чтобы программа могла его прочитать. Таким образом, решение состоит в том, чтобы загрузить avg152T1_gray.nii.gz и заменить образ .hdr на новый. Я изменил имя avg152T1_gray.nii.gz на avg152T1_grayNI.nii.gz и скопировал его в ту же папку (fabricpriors).

#T=${FSLDIR}/data/standard/tissuepriors/avg152T1_gray (изображение с комментариями .hdr, которое не работает)

T=${FSLDIR}/data/standard/tissuepriors/avg152T1_grayNI (.nii.gz изображение, которое у меня отлично работает)

...