Dear Julien,
>
> I'm having problems running the applytopup command.
>
> We collected one DWI scan with 20 directions (b0 + 19*b=1000) as well as 2 smaller DWI scans with 3 b0 images of opposite phase encoding directions. I have run the following topup comand:
>> topup --imain=15_16_17_PA_AP_AP --datain acqparams.txt --out=topup_params --iout=15_16_17_PA_AP_AP_corrected
>
> with
>> more acqparams.txt:
> 0 -1 0 1
> 0 -1 0 1
> 0 -1 0 1
> 0 1 0 1
> 0 1 0 1
> 0 1 0 1
> 0 1 0 1
> and 15_16_17_PA_AP_AP.nii obtained using
>> fslmerge -t 15_16_17_PA_AP_AP 15_PA 16_AP 17_AP
> and 17_AP obtained using
>> fslroi 17_AP 17-ep2d_advdiff_2mm 0 110 0 110 0 42 0 1
>
> I then want to apply the calculated fields with applytopup, but I get an error:
>> applytopup --imain=17-ep2d_advdiff_2mm --datain=acqparams.txt --inindex=7 --topup=topup_params --out=17-ap2d_advdiff_2mm_corrected
>
> ApplyTopup:: msg=Invalid combination of phase-encode vectors for least-squares restoration
> terminate called after throwing an instance of 'TOPUP::ApplyTopupException'
> what(): ApplyTopup:: msg=Invalid combination of phase-encode vectors for least-squares restoration
> Abort (core dumped)
It is because the default resampling method is “least squares”, which you can only use if all dwis have been acquired twice with opposing PE directions. If you add --method=jac to your call I think you should be fine.
Also, we no longer recommend using applytopup. We now recommend feeding the topup results into eddy, which will do essentially the same thing as applytopup, but in addition also correcting your dwis for eddy currents and subject movement.
Jesper
|