error when constructing network matrix using command line but no error in GUI

27 views
Skip to first unread message

Chenglin

unread,
Sep 26, 2019, 4:12:45 PM9/26/19
to ExploreDTI
Dear All,

I used E_DTI_Network_analysis_exe command line in Matlab and ran into this type of error:

./elastix_L_64 -f network_results/tpe2d583b2_2175_4a93_920d_f54fb0bd0ac5_ER16101A_dwi_FP_MD_C_trafo/Fixed.nii -fMask network_results/tpe2d583b2_2175_4a93_920d_f54fb0bd0ac5_ER16101A_dwi_FP_MD_C_trafo/Fixed_mask.nii -m network_results/tpe2d583b2_2175_4a93_920d_f54fb0bd0ac5_ER16101A_dwi_FP_MD_C_trafo/Moving.nii -out network_results/tpe2d583b2_2175_4a93_920d_f54fb0bd0ac5_ER16101A_dwi_FP_MD_C_trafo -p /work2/chenglin/ExploreDTI_Pcode/Source/Misc/parrig_NN.txt -p /work2/chenglin/ExploreDTI_Pcode/Source/Misc/paraff_NN.txt -p /work2/chenglin/ExploreDTI_Pcode/Source/Misc/parbsp_NN.txt: Signal 126

ERROR: the output directory "network_results/tpe2d583b2_2175_4a93_920d_f54fb0bd0ac5_ER16101A_dwi_FP_MD_C_trafo/" does not exist.
You are responsible for creating it.

I don't understand why I should create temporary folders. But there was no error when I used GUI to create the matrix. My command is like this:

for i = 1:length(sub)

       [A_T, Vdim]=E_DTI_load_nii(strcat('AAL_aligned/', sub{i}, '_temp.nii'));
       A_T = double(A_T);
       A_T = A_T/max(A_T(:));
       A_L=E_DTI_load_nii(strcat('AAL_aligned/', sub{i}, '.nii'));
       E_DTI_Network_analysis_exe(strcat('dwi_EPI_crop_corrected/', sub{i}, '_dwi_FP_MD_C_trafo.mat'),strcat('dwi_EPI_crop_corrected/', sub{i}, '_dwi_FP_MD_C_trafo_Tracts_DTI.mat'),[],A_T,A_L,L,Vdim,'network_results/',[],[],2,'network_results/');

end

Could you please help me with that?

Best regards,
Chenglin

Samuel St-Jean

unread,
Sep 28, 2019, 2:45:24 AM9/28/19
to ExploreDTI
In the first version you are running directly elastix, and it wants you to create the folders.

In the second version you are calling it through the p-code, which likely creates those folder for you every time without explicitly telling you.

Chenglin

unread,
Sep 29, 2019, 4:20:42 PM9/29/19
to ExploreDTI
Hi Samuel,

Thanks for your reply! I fixed the error and ran across all the subjects. But the output of labels and templates are poor. I used SM/EC/EPI correction and got dwi images registered in T1 space. And I used FNIRT to registered the labels and templates to the T1 space as well. Before I use network analysis tool the dwi and atlas images matched well. But after the matrixes were done,  I checked the output label and template images in each subject's space and it became poorly matched. What might be going wrong with that?

I also checked the EPI corrected image and found that the image along with the z-axis exhibited some distortions both at the top and the bottom of the image. Could this be the origin of the poor registration after network construction? Could you please help me check whether the EPI correction is corrected or not? I attached a link to one subject's original and corrected dwi files and t1 file. https://drive.google.com/drive/folders/1rwQeqEIgMY2xFFyVLN8eyuylP5G8jnHV?usp=sharing

Best,
Chenglin

在 2019年9月28日星期六 UTC-4上午2:45:24,Samuel St-Jean写道:

Chenglin

unread,
Sep 30, 2019, 3:02:01 AM9/30/19
to ExploreDTI
Hi Samuel,

I compared the EPI-corrected results between DWI-to-native-t1 and DWI-to-AAL. I found that the registered results on native-t1 images are fine. The poor registration only happened when projecting DWI to aal template. The poor images looked like the outline of the template was been seen as the skull and other non-brain tissues so that the resulting image was smaller than the template. Is my guessing right? How could I solve this? I tried to adjust parameters about the EPI registration but I have no idea about which should be altered. Could you help me with it?

Best,
Chenglin

在 2019年9月28日星期六 UTC-4上午2:45:24,Samuel St-Jean写道:
In the first version you are running directly elastix, and it wants you to create the folders.
Reply all
Reply to author
Forward
0 new messages