Hi to all MrTrixers!
I’m trying to prepare a population template based on 31 subjects with the following command:
population_template MY_FOLDER MY_TEMPLATE.nii.gz -voxel_size 1 -warp_dir MY_TEMPLATE_WARPDIR -nocleanup -nthreads 10 -force
after some days of processing the pipeline stops with the following error message:
[WARNING] large scaling ([0.00143988496639847, 1.05365290564407, 0.988766088822134]) in linear_transforms_6/sub-xxx.txt
population_template: [ERROR] mrregister mypath/myfolder/new_analysis/MY_TEMPLATE/sub-xxx_WM_FODs.mif linear_template5.mif -affine_scale 0.3 -affine_niter 500 -affine_lmax 2 -type affine -datatype float32 -affine linear_transforms_6/sub-xxx.txt -affine_init_translation mass -affine_init_rotation search (population_template:133)
population_template: [ERROR] Information from failed command:
population_template:
mrregister: [ERROR] output file “linear_transforms_6/sub-xxx.txt” already exists (use -force option to force overwrite)
Can someone please give me any clues on what could be wrong with it?
I tried to manually run the last command adding the -force flag and then to restart the analysis using the -continue options with tempdir and last successfully generated file as I found on your website. The code goes as follows:
population_template MY_TEMPLATE MY_TEMPLATE.nii.gz -voxel_size 1 -warp_dir MY_TEMPLATE_WARPDIR -nocleanup -nthreads 10 -force -continue mypath/myfolder/new_analysis/MY_TEMPLATE/population_template-tmp-I1F4XZ mypath/myfolder/new_analysis/MY_TEMPLATE/population_template-tmp-I1F4XZ/linear_transforms_6/sub-xxx.txt
and what I get is:
population_template: Generating a population-average template from 31 input images
population_template: [WARNING] no masks input. Use input masks to reduce computation time and improve robustness
population_template: SH series detected, performing FOD registration
population_template: initial alignment of images: mass
population_template: linear registration stages:
population_template: (00) rigid scale: 0.3000, niter: 100, lmax: 2
population_template: (01) rigid scale: 0.4000, niter: 100, lmax: 2
population_template: (02) rigid scale: 0.6000, niter: 100, lmax: 2
population_template: (03) rigid scale: 0.8000, niter: 100, lmax: 4
population_template: (04) rigid scale: 1.0000, niter: 100, lmax: 4
population_template: (05) rigid scale: 1.0000, niter: 100, lmax: 4
population_template: (06) affine scale: 0.3000, niter: 500, lmax: 2
population_template: (07) affine scale: 0.4000, niter: 500, lmax: 2
population_template: (08) affine scale: 0.6000, niter: 500, lmax: 2
population_template: (09) affine scale: 0.8000, niter: 500, lmax: 4
population_template: (10) affine scale: 1.0000, niter: 500, lmax: 4
population_template: (11) affine scale: 1.0000, niter: 500, lmax: 4
population_template: nonlinear registration stages:
population_template: (00) nonlinear scale: 0.3000, niter: 5, lmax: 2
population_template: (01) nonlinear scale: 0.4000, niter: 5, lmax: 2
population_template: (02) nonlinear scale: 0.5000, niter: 5, lmax: 2
population_template: (03) nonlinear scale: 0.6000, niter: 5, lmax: 2
population_template: (04) nonlinear scale: 0.7000, niter: 5, lmax: 2
population_template: (05) nonlinear scale: 0.8000, niter: 5, lmax: 2
population_template: (06) nonlinear scale: 0.9000, niter: 5, lmax: 2
population_template: (07) nonlinear scale: 1.0000, niter: 5, lmax: 2
population_template: (08) nonlinear scale: 1.0000, niter: 5, lmax: 4
population_template: (09) nonlinear scale: 1.0000, niter: 5, lmax: 4
population_template: (10) nonlinear scale: 1.0000, niter: 5, lmax: 4
population_template: (11) nonlinear scale: 1.0000, niter: 5, lmax: 4
population_template: (12) nonlinear scale: 1.0000, niter: 5, lmax: 4
population_template: (13) nonlinear scale: 1.0000, niter: 5, lmax: 4
population_template: (14) nonlinear scale: 1.0000, niter: 5, lmax: 4
population_template: (15) nonlinear scale: 1.0000, niter: 5, lmax: 4
population_template: Changing to scratch directory (mypath/myfolder/new_analysis/MY_TEMPLATE/population_template-tmp-I1F4XZ)
population_template: Generating initial template
Skipping command: mraverageheader -fill [mypath/myfolder/new_analysis/MY_TEMPLATE/sub-*_WM_FODs.mif (31 items)] - | mrgrid - regrid -voxel 1,1,1 average_header.mif
population_template: [ERROR] Unhandled Python exception:
population_template: [ERROR] TypeError: new() takes exactly 3 arguments (4 given)
population_template: [ERROR] Traceback:
population_template: [ERROR] /Users/biomorf/MRtrix3Tissue/bin/population_template:410 (in execute())
population_template: [ERROR] ‘mrgrid’, ‘-’, ‘regrid’, ‘-voxel’, ‘,’.join(voxel_size), ‘average_header.mif’])
population_template: [ERROR] /Users/biomorf/MRtrix3Tissue/lib/mrtrix3/run.py:260 (in command())
population_template: [ERROR] return CommandReturn(None, ‘’, ‘’)
population_template: Scratch directory retained; location: mypath/myfolder/new_analysis/population_template-tmp-I1F4XZ
Is there something wrong? notice that is the second time I try to restart the command from last successful file, the first it deleted my temporary folder since i didn’t set the -nocleanup option.
I’m working with mrtrix3 version 3Tissue_v5.2.8-2-gc82903bb
Thanks in advance!
Gianpaolo Error message from population_template Error message from population_template