Bst_duneuro format of DTI tensor, and missing libldl.so.2

I am starting to use the bst_duneuro forward model, as a script.

1--I can run it in windows. When I try the same cfg call in linux it says missing the libldl.so.2 . What lib is that file in, what gcc or lib needs to be available?

2--I can run it without the DTI tensor. I understand the contents of the tensor, the first 9 being the eivenvectors of the DTI "V" matrices, and the last 3 being something related to the eigenvalues, L values. However, I cannot find instructions how to format these.

Thanks, John Richards

Hi @johnerichards

I think I replied to your email earlier, but let me summarize it here.

For the issue with libldl, please check this post: DUNEURO error libdl.so.2
This may solve your issue, and let us know if you are still facing the same error after adding the missing library.

You were right regarding the organization of DTI files within the Brainstorm database with these 12 values. For additional reference, you can consult the documentation here:

Regarding the DWI processing, the recommended approach is to use the raw DWI data, since Brainstorm handles the full registration pipeline internally (DWI → T1 → FEM mesh and tensors). This ensures consistent alignment across all modalities.

That said, it is also possible to use a precomputed DTI, though this may require an additional transformation step to ensure proper spatial alignment with the Brainstorm anatomy.

If your DTI is already in T1 space, you can import it as a NIfTI file in Brainstorm and obtain the [DTI-EIG] output expected by Brainstrom. See the relevant code section here:

By default, Brainstorm uses BrainSuite to process DWI data, with the expected output named like this: output_mri.dwi.RAS.correct.T1_coord.eig.nii.gz

In most cases, this naming matches most of the other tools [FreeSurfer, SPM, ...]. [@Anand_Joshi please confirm this statement]

So, your DTI is already aligned with your T1; you should be able to proceed by creating the corresponding MATLAB file (DTI-EIG) and organizing it within the 12 values.

From there, you can map the DTI to the FEM mesh and generate the FEM tensors using Brainstorm as explained in thturilas.

To verify that the tensors are correctly aligned and before running any FEM computation, I recommend visualizing them within the interface and checking that their shape and orientation appear anatomically consistent.

Let me know if you have questions about any of these steps.

Best,
Takfarinas