I’m in the process of trying to run FBA on GRE dwi sequences. Sought advice about this a while ago here (Extracting PA and AP from dicom - #5 by edrazich) and was advised to try --field in eddy.
So far, I’ve successfully run and QCed the following:
mrcat -force ${path_DTI}/dwi*.nii.gz ${path_DTI}/merged_dwi.nii.gz
paste -d" " ${path_DTI}/bvec*.bvec >> ${path_DTI}/merged_bvec.bvec
paste -d" " ${path_DTI}/bval*.bval >> ${path_DTI}/merged_bval.bval
dwidenoise -force ${path_DTI}/merged_dwi.nii.gz ${path_mrtrix_preprocessed}/dwi_denoised.nii.gz -noise ${path_mrtrix_preprocessed}/noise.nii.gz
mrdegibbs -force ${path_mrtrix_preprocessed}/dwi_denoised.nii.gz ${path_mrtrix_preprocessed}/dwi_denoised_unringed.nii.gz -axes 0,1
Prepare fieldmaps for manual eddy input:
bet ${path_DTI}/fieldmap_e1_mag.nii.gz ${path_DTI}/fieldmap_e1_mag_bet.nii.gz
fsl_prepare_fieldmap SIEMENS ${path_DTI}/fieldmap_ph ${path_DTI}/fieldmap_e1_mag_bet ${path_DTI}/fieldmap.nii.gz 2.5
flirt -in ${path_DTI}/fieldmap.nii.gz -ref ${path_mrtrix_preprocessed}/dwi_denoised_unringed.nii.gz -dof 12 -omat ${path_DTI}/field2dwi_12dof_mat -out ${path_DTI}/field2dwi_12dof.nii.gz
flirt -in ${path_DTI}/fieldmap.nii.gz -ref ${path_mrtrix_preprocessed}/dwi_denoised_unringed.nii.gz -applyxfm -init ${path_DTI}/field2dwi_12dof_mat -o ${path_DTI}/field2dwi_12dof_applyxfm.nii.gz
However, when running:
dwifslpreproc -force -fslgrad ${path_DTI}/merged_bvec.bvec ${path_DTI}/merged_bval.bval ${path_mrtrix_preprocessed}/dwi_denoised_unringed.nii.gz ${path_mrtrix_preprocessed}/dwi_denoised_unringed_preproc.nii.gz -rpe_none -pe_dir AP -eddy_options " --field=${path_DTI}/field2dwi_12dof_applyxfm"
I do get some issues.
eddy cuda
fails with the following error:
eddy_cuda9.1: error while loading shared libraries: libcublas.so.9.1: cannot open shared object file: No such file or directory
with eddyopenmp
My first patient ran to completion, but the image was hugely distorted. None of my subsequent patients ran successfully, and this was the error:
Reading images
Performing volume-to-volume registration
Running Register
Loading prediction maker
Evaluating prediction maker model
Calculating parameter updates
Iter: 0, Total mss = 4177.44
Loading prediction maker
Evaluating prediction maker model
Calculating parameter updates
Iter: 1, Total mss = 4190.25
Loading prediction maker
Evaluating prediction maker model
Calculating parameter updates
Iter: 2, Total mss = 4189.59
Loading prediction maker
Evaluating prediction maker model
Calculating parameter updates
Iter: 3, Total mss = 4189.96
Loading prediction maker
Evaluating prediction maker model
Calculating parameter updates
Iter: 4, Total mss = 4196.02
Running sm.ApplyB0LocationReference
Running sm.PolateB0MovPar
Running Register
Loading prediction maker
Evaluating prediction maker model
EDDY::: NewSphericalKMatrix::GetHyperParGuess: Unable to find valid hyperparameters
EDDY::: KMatrix.cpp::: virtual std::vector<double> EDDY::NewSphericalKMatrix::GetHyperParGuess(const std::vector<armawrap::AWColVector<double> >&) const: Exception thrown
EDDY::: HyParEstimator.cpp::: virtual void EDDY::FullMontyHyParEstimator::Estimate(std::shared_ptr<const EDDY::KMatrix>, bool): Exception thrown
EDDY::: DiffusionGP.cpp::: virtual void EDDY::DiffusionGP::EvaluateModel(const NEWIMAGE::volume<float>&, float, bool): Exception thrown
EDDY::: eddy.cpp::: std::shared_ptr<EDDY::DWIPredictionMaker> EDDY::LoadPredictionMaker(const EDDY::EddyCommandLineOptions&, EDDY::ScanType, const EDDY::ECScanManager&, unsigned int, float, NEWIMAGE::volume<float>&, bool): Exception thrown
EDDY::: eddy.cpp::: EDDY::ReplacementManager* EDDY::Register(const EDDY::EddyCommandLineOptions&, EDDY::ScanType, unsigned int, const std::vector<float, std::allocator<float> >&, EDDY::SecondLevelECModel, bool, EDDY::ECScanManager&, EDDY::ReplacementManager*, NEWMAT::Matrix&, NEWMAT::Matrix&): Exception thrown
EDDY::: Eddy failed with message EDDY::: eddy.cpp::: EDDY::ReplacementManager* EDDY::DoVolumeToVolumeRegistration(const EDDY::EddyCommandLineOptions&, EDDY::ECScanManager&): Exception thrown
from this thread, looks like it might be because I haven’t supplied a mask:
https://www.jiscmail.ac.uk/cgi-bin/wa-jisc.exe?A2=FSL;574528e6.2006
Would it be acceptable to transform my T1 mask into dwi space and use this as a mask? Or should I be making a mask directly from the dwi?
Any other ideas what might be going on and how to fix it? Thanks so much!