External Email - Use Caution        

Dear Eugenio,

thank you for your prompt answer.
I tested again but I but I can't get it to work.
I wrote (bash):

vboxuser@freesurfer-ub22:~$ export TUTORIAL_DATA=/home/vboxuser/SIEMENS
vboxuser@freesurfer-ub22:~$ export SUBJECTS_DIR=$TUTORIAL_DATA/GRUPPO_1_6
vboxuser@freesurfer-ub22:~$ cd $SUBJECTS_DIR

ls $FREESURFER_HOME/bin | grep segmentThalamicNuclei
segmentThalamicNuclei_DTI
segmentThalamicNuclei.sh

vboxuser@freesurfer-ub22:~/SIEMENS/GRUPPO_1_6$ segmentThalamicNuclei_DTI.sh -s ./subj_01            
segmentThalamicNuclei_DTI.sh: command not found

segmentThalamicNuclei_DTI -s subj_01
segmentThalamicNuclei_DTI: error while loading shared libraries: libmwlaunchermain.so: cannot open shared object file: No such file or directory

Then I tried once again:

/home/vboxuser/freesurfer/ThalamicNucleiDTI/linux_x86_64/run_SegmentThalamicNuclei_DTI.sh /usr/local/MATLAB/MATLAB_Runtime/v97 -s subj_01
------------------------------------------
Setting up environment variables
---
LD_LIBRARY_PATH is .:/usr/local/MATLAB/MATLAB_Runtime/v97/runtime/glnxa64:/usr/local/MATLAB/MATLAB_Runtime/v97/bin/glnxa64:/usr/local/MATLAB/MATLAB_Runtime/v97/sys/os/glnxa64:/usr/local/MATLAB/MATLAB_Runtime/v97/sys/opengl/lib/glnxa64
THIS IS THE NEW COMPILED VERSION 2======================================================
subj_01, DTI model DSWbeta.
======================================================
======================================================
Error while running segmentation. Saving error struct.
======================================================
Error using TS_fnc_thalamus_seg_gem_joint (line 250)
The value of 'ASEGsharedParamsPath' is invalid. It must satisfy the function: @(x)exist(x,'file').

Error in TS_fnc_jointSegmentationWrapper (line 64)

MATLAB:InputParser:ArgumentFailedValidation

What shoud I do?

Thank you again,

Antonio

Da: Iglesias Gonzalez, Juan E. <JIGLESIASGONZALEZ@mgh.harvard.edu>
Inviato: venerdì 31 ottobre 2025 14:43
A: Freesurfer support list <freesurfer@nmr.mgh.harvard.edu>
Cc: Nolan, Jackson <JNOLAN5@mgh.harvard.edu>
Oggetto: [Freesurfer] Re: T1 + DTI for thalamus segmentation
 
Dear Antonio,
For the Bayesian network, the entry point is segmentThalamicNuclei_DTI.sh. So, after sourcing FreeSurfer, simply run segmentThalamicNuclei_DTI.sh as explained in the wiki (https://surfer.nmr.mgh.harvard.edu/fswiki/ThalamicNucleiDTI).
For the CNN, I’ll defer to Jackson (CCed).
Cheers,
/Eugenio

--

Juan Eugenio Iglesias

http://www.jeiglesias.com

From: Antonio Di Renzo <antoniomp777@hotmail.it>
Date: Friday, October 31, 2025 at 7:11 AM
To: Freesurfer support list <freesurfer@nmr.mgh.harvard.edu>
Subject: [Freesurfer] T1 + DTI for thalamus segmentation

        External Email - Use Caution        
Messers Freesurfer developers,

I am using the joint segmentation of thalamic nuclei from T1 scan and DTI, but unfortunately I did not achieve results. 
I installed: Freesurfer 7.4.1, OS Ubuntu 22.04.5 jammy and VM Oracle 7.0.6 r155176.

- Bayesian Tool

Bash:

export TUTORIAL_DATA=/home/vboxuser/SIEMENS
export SUBJECTS_DIR=$TUTORIAL_DATA/GRUPPO_1_6
cd $SUBJECTS_DIR

# Subject's data are stored in subj_01 folder


source $FREESURFER_HOME/SetUpFreeSurfer.sh


export MCRROOT=/usr/local/MATLAB/MATLAB_Runtime/v97
export LD_LIBRARY_PATH=$MCRROOT/runtime/glnxa64:$MCRROOT/bin/glnxa64:$MCRROOT/sys/os/glnxa64:$MCRROOT/sys/opengl/lib/glnxa64:$LD_LIBRARY_PATH

# Run segmentation for subj_01 using the simplified -s option
/home/vboxuser/freesurfer/ThalamicNucleiDTI/linux_x86_64/run_SegmentThalamicNuclei_DTI.sh $MCRROOT -s subj_01

Answer: 

/home/vboxuser/freesurfer/ThalamicNucleiDTI/linux_x86_64/run_SegmentThalamicNuclei_DTI.sh $MCRROOT -s subj_01 ------------------------------------------ Setting up environment variables --- LD_LIBRARY_PATH is .:/usr/local/MATLAB/MATLAB_Runtime/v97/runtime/glnxa64:/usr/local/MATLAB/MATLAB_Runtime/v97/bin/glnxa64:/usr/local/MATLAB/MATLAB_Runtime/v97/sys/os/glnxa64:/usr/local/MATLAB/MATLAB_Runtime/v97/sys/opengl/lib/glnxa64 THIS IS THE NEW COMPILED VERSION 2====================================================== subj_01, DTI model DSWbeta. ====================================================== ====================================================== Error while running segmentation. Saving error struct. ====================================================== Error using TS_fnc_thalamus_seg_gem_joint (line 250) The value of 'ASEGsharedParamsPath' is invalid. It must satisfy the function: @(x)exist(x,'file'). Error in TS_fnc_jointSegmentationWrapper (line 64) MATLAB:InputParser:ArgumentFailedValidation

-CNN tool

Bash:

CNN segmentation does work, previous steps were performed accurately and without errors.

mri_segment_thalamic_nuclei_dti_cnn --t1 $SUBJECTS_DIR/subj_01/mri/norm.dwispace.mgz --aseg $SUBJECTS_DIR/subj_01/mri/aseg.dwispace.mgz --fa $SUBJECTS_DIR/subj_01/dmri/dtifit_FA.nii.gz --v1 $SUBJECTS_DIR/subj_01/dmri/dtifit_V1.nii.gz --o $SUBJECTS_DIR/subj_01/dmri/segthal.nii.gz --vol $SUBJECTS_DIR/subj_01/dmri/segthal_vol.csv --threads 1

Answer: 

Illegal instruction (core dumped)

How can I do to solve these issues?

Thank you in advance,

Antonio