EDDY CORRECTION PROBLEM

447 views
Skip to first unread message

Ítalo César Porto Xavier

unread,
Oct 5, 2022, 4:57:05 PM10/5/22
to DSI Studio
The following doesn't output the volume with eddy current, movement and susceptibility correction. What is the problem?

Capture.PNG

Regards,

Ítalo

Fang-Cheng Yeh

unread,
Oct 5, 2022, 5:01:58 PM10/5/22
to dsi-s...@googlegroups.com
You may redirect the output by adding  > log.txt at the end of the command line.
The log output may give a hint.
You may also need to update DSI Studio if it is more than 6 month old.
Frank


--
You received this message because you are subscribed to the Google Groups "DSI Studio" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dsi-studio+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dsi-studio/b93efd0d-ed47-4eb6-a30b-6f69e9b7a0edn%40googlegroups.com.

Ítalo César Porto Xavier

unread,
Oct 5, 2022, 5:11:12 PM10/5/22
to DSI Studio
Ops, thanks.

Now the following error occurred. I have already downloaded and installed it again.

Capture.PNG

Ítalo

Ítalo César Porto Xavier

unread,
Oct 5, 2022, 5:26:15 PM10/5/22
to DSI Studio
Just for confirm, can I the following CL to do the same? How can I create the mask before executing it?

C:\Users\italo\Downloads\dsi_studio_win\plugin\eddy_cuda.exe --imain=1dwi.nii.src.gz.nii.gz --mask=1dwi.nii.src.gz.mask.nii.gz --acqp=1dwi.topup.acqparams.txt --index=1dwi.nii.src.gz.index.txt --bvecs=1dwi.nii.src.gz.bvec --bvals=1dwi.nii.src.gz.bval --out=1dwi.nii.src.gz.corrected --verbose=1

Thanks,

Ítalo

Fang-Cheng Yeh

unread,
Oct 5, 2022, 6:42:17 PM10/5/22
to dsi-s...@googlegroups.com
You need to install cuda toolkit as mentioned at https://dsi-studio.labsolver.org/download.html
or you would need to use the CPU version.
Frank

Ítalo César Porto Xavier

unread,
Oct 5, 2022, 6:57:08 PM10/5/22
to DSI Studio
I have already CUDA11.7 installed.

My log.txt:

+ [1;34mDSI Studio version: Chen"陳" command line [0m
| + [1;34mchecking CUDA drivers [0m
| | CUDA Driver Version: 11070 CUDA Run Time Version: 11050
| | Device Count:1
| | + [1;34mDevice Number:0 [0m
| | | Arch: 50
| | | Device name: NVIDIA GeForce 840M
| | | Memory Clock Rate (KHz): 900000
| | | Memory Bus Width (bits): 64
| | | Peak Memory Bandwidth (GB/s): 14.4
| | |_0 ms
| |_115 ms
| DSI Studio version: Chen"陳" CPU/GPU computation enabled
| action=rec
| source=1dwi.nii.src.gz
| + [1;34mrun rec [0m
| | + [1;34mopen SRC file [0m
| | | + [1;34mopening 1dwi.nii.src.gz [0m
| | | |_1.022 s
| | |_2.369 s
| | + [1;34mreconstruction parameters: [0m
| | | method=4
| | | odf_resolving=0
| | | record_odf=0
| | | dti_no_high_b=1
| | | check_btable=0
| | | other_output=fa,ad,rd,md,iso,rdi,nrdi
| | | r2_weighted=0
| | | thread_count=4
| | | param0=1.25
| | | param1=3000
| | | param2=0.05
| | |_0 ms
| | + [1;34mspecify mask [0m
| | | mask=1
| | |_1 ms
| | + [1;34mpreprocessing [0m
| | | preprocessing=0
| | | motion_correction=0
| | |_0 ms
| | + [1;34madditional processing steps [0m
| | | cmd=[Step T2][Corrections][EDDY]
| | | + [1;34m[Step T2][Corrections][EDDY] [0m
| | | | run eddy
| | | | eddy without topup
| | | | get the bounding box for speeding up topup/eddy
| | | | trim "1dwi.nii.src.gz" for eddy
| | | | range: (0,0,0) to (256,256,70)
| | | | + [1;34msaving [0m
| | | | |_12.971 s
| | | | + [1;34msaving [0m
| | | | |_29 ms
| | | | run C:/Users/italo/Downloads/dsi_studio_win/plugin/eddy_cuda.exe
| | | | path:C:/Users/italo/Desktop/testehoje/teste DSI

| | | | --imain=1dwi.nii.src.gz.nii.gz
| | | | --mask=1dwi.nii.src.gz.mask.nii.gz
| | | | --acqp=1dwi.topup.acqparams.txt
| | | | --index=1dwi.nii.src.gz.index.txt
| | | | --bvecs=1dwi.nii.src.gz.bvec
| | | | --bvals=1dwi.nii.src.gz.bval
| | | | --out=1dwi.nii.src.gz.corrected
| | | | --verbose=1
| | | | completed.
| | | |_1.01883 m
| | | [1;31mERROR:eddy failed to process data [0m
| | |_1.01885 m
| |_1.0591 m
|_1.06118 m


Fang-Cheng Yeh

unread,
Oct 5, 2022, 6:59:54 PM10/5/22
to dsi-s...@googlegroups.com
Sorry about the problem.
Could you send me the src.gz file to debug?
You may also try the CPU version.
Frank

Ítalo César Porto Xavier

unread,
Oct 5, 2022, 7:10:10 PM10/5/22
to DSI Studio

Fang-Cheng Yeh

unread,
Oct 5, 2022, 7:19:08 PM10/5/22
to dsi-s...@googlegroups.com
It needs permission, or you may send the data using the upload link provided on the DSI Studio website.

Ítalo César Porto Xavier

unread,
Oct 5, 2022, 7:29:09 PM10/5/22
to DSI Studio
Ops my fault

I changed the permission, try again, please

Fang-Cheng Yeh

unread,
Oct 5, 2022, 7:40:57 PM10/5/22
to dsi-s...@googlegroups.com
I checked the file, and eddy worked on my windows desktop.
It seems that the problem is still the CUDA toolkit.

Perhaps you may also try the CPU version?
Frank

On Wed, Oct 5, 2022 at 6:41 PM Fang-Cheng Yeh <fran...@gmail.com> wrote:
>
> You need to install cuda toolkit as mentioned at https://dsi-studio.labsolver.org/download.html
> or you would need to use the CPU version.
> Frank
>
> On Wed, Oct 5, 2022 at 5:26 PM Ítalo César Porto Xavier <italo....@gmail.com> wrote:
>>
>> Just for confirm, can I the following CL to do the same? How can I create the mask before executing it?
>>
>> C:\Users\italo\Downloads\dsi_studio_win\plugin\eddy_cuda.exe --imain=1dwi.nii.src.gz.nii.gz --mask=1dwi.nii.src.gz.mask.nii.gz --acqp=1dwi.topup.acqparams.txt --index=1dwi.nii.src.gz.index.txt --bvecs=1dwi.nii.src.gz.bvec --bvals=1dwi.nii.src.gz.bval --out=1dwi.nii.src.gz.corrected --verbose=1
>>
>> Thanks,
>>
>> Ítalo
>> Em quarta-feira, 5 de outubro de 2022 às 18:11:12 UTC-3, Ítalo César Porto Xavier escreveu:
>>>
>>> Ops, thanks.
>>>
>>> Now the following error occurred. I have already downloaded and installed it again.
>>>
>>>
>>> Ítalo
>>>
>>> Em quarta-feira, 5 de outubro de 2022 às 18:01:58 UTC-3, Frank Yeh escreveu:
>>>>
>>>> You may redirect the output by adding > log.txt at the end of the command line.
>>>> The log output may give a hint.
>>>> You may also need to update DSI Studio if it is more than 6 month old.
>>>> Frank
>>>>
>>>>
>>>> On Wed, Oct 5, 2022 at 4:57 PM Ítalo César Porto Xavier <italo....@gmail.com> wrote:
>>>>>
>>>>> The following doesn't output the volume with eddy current, movement and susceptibility correction. What is the problem?
>>>>>
>>>>>

Ítalo César Porto Xavier

unread,
Oct 6, 2022, 1:49:56 PM10/6/22
to DSI Studio
I tried CPU version as you said. I got my CPU on 95%, 4Gb of memory and passed 1 hour processing didn't finish, I had to end the task.

I downloaded the CUDA 11 (local) again and still the error, in GUI works but in the command line doesn't.

With Batch:
Capture.PNG

Ítalo Xavier

Fang-Cheng Yeh

unread,
Oct 6, 2022, 1:57:19 PM10/6/22
to dsi-s...@googlegroups.com

I tried CPU version as you said. I got my CPU on 95%, 4Gb of memory and passed 1 hour processing didn't finish, I had to end the task.

CPU eddy usually runs for several hours, especially for more advanced DWI.
 

I downloaded the CUDA 11 (local) again and still the error, in GUI works but in the command line doesn't.

Interesting. Is CLI here DSI Studio's CLI or did you call the eddy_cuda directly? 
Frank
 

Ítalo César Porto Xavier

unread,
Oct 6, 2022, 2:05:16 PM10/6/22
to DSI Studio
Executed in GUI (15 min) but I want to execute in CMD. How do I call eddy_cuda directly?

Ítalo Xavier

Ítalo César Porto Xavier

unread,
Oct 6, 2022, 2:07:03 PM10/6/22
to DSI Studio
I mean, I don't know if in GUI, you call eddy.exe or eddy_cuda.exe by the way

Ítalo Xavier

Fang-Cheng Yeh

unread,
Oct 6, 2022, 2:08:46 PM10/6/22
to dsi-s...@googlegroups.com
Open the [console...] mode and check out what it tells when you run GUI eddy.

Ítalo César Porto Xavier

unread,
Oct 6, 2022, 2:33:54 PM10/6/22
to DSI Studio
It runs eddy_cuda.exe

Fang-Cheng Yeh

unread,
Oct 6, 2022, 2:39:39 PM10/6/22
to dsi-s...@googlegroups.com
You should be able to get the same from CLI.

One possible cause is the running directory.
eddy_cuda from TinyFSL disabled error reporting and may exist
prematurely without prompting the correct error.

On Thu, Oct 6, 2022 at 2:33 PM Ítalo César Porto Xavier
<italo....@gmail.com> wrote:
>
> It runs eddy_cuda.exe
>
> Em quinta-feira, 6 de outubro de 2022 às 15:08:46 UTC-3, Frank Yeh escreveu:
>>
>> Open the [console...] mode and check out what it tells when you run GUI eddy.
>>
>> On Thu, Oct 6, 2022 at 2:07 PM Ítalo César Porto Xavier <italo....@gmail.com> wrote:
>>>
>>> I mean, I don't know if in GUI, you call eddy.exe or eddy_cuda.exe by the way
>>>
>>> Ítalo Xavier
>>>
>>> Em quinta-feira, 6 de outubro de 2022 às 15:05:16 UTC-3, Ítalo César Porto Xavier escreveu:
>>>>
>>>> Executed in GUI (15 min) but I want to execute in CMD. How do I call eddy_cuda directly?
>>>>
>>>> Ítalo Xavier
>>>> Em quinta-feira, 6 de outubro de 2022 às 14:57:19 UTC-3, Frank Yeh escreveu:
>>>>>>
>>>>>>
>>>>>> I tried CPU version as you said. I got my CPU on 95%, 4Gb of memory and passed 1 hour processing didn't finish, I had to end the task.
>>>>>
>>>>>
>>>>> CPU eddy usually runs for several hours, especially for more advanced DWI.
>>>>>
>>>>>>
>>>>>>
>>>>>> I downloaded the CUDA 11 (local) again and still the error, in GUI works but in the command line doesn't.
>>>>>
>>>>>
>>>>> Interesting. Is CLI here DSI Studio's CLI or did you call the eddy_cuda directly?
>>>>> Frank
>>>>>
>>>>>>
>>>>>>
>>>>>> With Batch:
>>>>>>
> To view this discussion on the web visit https://groups.google.com/d/msgid/dsi-studio/d9345a85-6dfa-4746-a734-e3057e7f9da7n%40googlegroups.com.

Ítalo César Porto Xavier

unread,
Oct 6, 2022, 2:48:54 PM10/6/22
to DSI Studio
The runnin directory is the same (C:\Users\italo\Desktop\testehoje\teste DSI). PS.: When I runs in cmd console the .exe path, it shows me the help, shows me the help for eddy.exe but for eddy_cuda.exe give me the same error:

Capture.PNG

Ok, so let me try calling the executables directly. What is the sequence, for calling eddy_cuda.exe and the parameters?

Waiting for your help mate.

Ítalo Xavier

Fang-Cheng Yeh

unread,
Oct 6, 2022, 2:52:57 PM10/6/22
to dsi-s...@googlegroups.com
The calling parameters are listed in the console mode output.
As for the missing dll file, copying the dll file to the same directory may handle the error message. But I am not sure why it happened. I tested on my windows desktop, but did not show this error message.
Frank

Ítalo César Porto Xavier

unread,
Oct 6, 2022, 2:59:07 PM10/6/22
to DSI Studio
What's the output on your console?

Fang-Cheng Yeh

unread,
Oct 6, 2022, 3:08:09 PM10/6/22
to dsi-s...@googlegroups.com

+ eddy

| + [Step T2][Corrections][EDDY]

| | run eddy

| | eddy without topup

| | get the bounding box for speeding up topup/eddy

| | trim "1dwi.nii.src.gz" for eddy

| | range: (50,29,0) to (208,231,70)

| | + saving

| | |_13.471 s

| | + saving

| | |_27 ms

| | run E:/Dropbox/work/GitHub/DSI-Studio-CMAKE/plugin/eddy_cuda.exe

| | path:C:/Users/YEHFC/Downloads

| | --imain=1dwi.nii.src.gz.nii.gz

| | --mask=1dwi.nii.src.gz.mask.nii.gz

| | --acqp=1dwi.topup.acqparams.txt

| | --index=1dwi.nii.src.gz.index.txt

| | --bvecs=1dwi.nii.src.gz.bvec

| | --bvals=1dwi.nii.src.gz.bval

| | --out=1dwi.nii.src.gz.corrected

| | --verbose=1

| | Reading images

| | Performing volume-to-volume registration

| | Running Register


Ítalo César Porto Xavier

unread,
Oct 6, 2022, 4:46:16 PM10/6/22
to DSI Studio
Hm not much differences.

Two questions:

1. Whats is the command for the acquisition parameters (.txt)?
2. Why my source image fliped 180º after eddy correction reconstruction?

Ítalo Xavier

Fang-Cheng Yeh

unread,
Oct 6, 2022, 5:12:54 PM10/6/22
to dsi-s...@googlegroups.com
Perhaps I can check your SRC file at my side (Have you sent me your
SRC to check? Sorry for my poor memory.)
Frank

On Thu, Oct 6, 2022 at 4:46 PM Ítalo César Porto Xavier
> To view this discussion on the web visit https://groups.google.com/d/msgid/dsi-studio/a6fe4f9a-6280-4317-a257-602a892c3755n%40googlegroups.com.

Ítalo César Porto Xavier

unread,
Oct 6, 2022, 5:22:30 PM10/6/22
to DSI Studio
All my files is on the link: https://drive.google.com/drive/folders/1j5_ZGXOM_JNM-ZrpQ8uhwi0DP9MNNx35

Capture.PNG

You forget the first question too XD

Ítalo Xavier

Fang-Cheng Yeh

unread,
Oct 6, 2022, 5:43:07 PM10/6/22
to dsi-s...@googlegroups.com
The first question is about FSL's eddy which you can find answers at https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/eddy

Fang-Cheng Yeh

unread,
Oct 6, 2022, 5:49:27 PM10/6/22
to dsi-s...@googlegroups.com
From the files you showed, the eddy was done correctly.

> 2. Why my source image fliped 180º after eddy correction reconstruction?

NIFTI file can be saved in LPS and RAS provided the srow is written correctly: https://nifti.nimh.nih.gov/

Ítalo César Porto Xavier

unread,
Oct 10, 2022, 1:48:18 PM10/10/22
to DSI Studio
Hi! Appreciate your response,

eddy_cuda worked after updating drives and the VS.

How can I identify the differences after eddy?

Ítalo Xavier

Fang-Cheng Yeh

unread,
Oct 10, 2022, 2:06:26 PM10/10/22
to dsi-s...@googlegroups.com
You would need to visually check the eddy distortion: https://www.youtube.com/watch?v=stL4GMeTC1I
For the command line, use quality control (--action=qc) and check the NDC value.
Frank

Ítalo César Porto Xavier

unread,
Oct 10, 2022, 2:59:46 PM10/10/22
to DSI Studio
Actually the source file fliped not the corrected file after eddy. I didn't understand this translation.

Quality control tells what about eddy?

Here the NDC (Step T1a) = 0.794313

Ítalo Xavier

Fang-Cheng Yeh

unread,
Oct 10, 2022, 3:09:19 PM10/10/22
to dsi-s...@googlegroups.com
NDC needs to compare before/after eddy correction.
Frank

Fang-Cheng Yeh

unread,
Oct 10, 2022, 3:11:50 PM10/10/22
to dsi-s...@googlegroups.com
> Actually the source file fliped not the corrected file after eddy. I didn't understand this translation.

Could you let me know how you confirmed it is flipped?
Frank

Ítalo César Porto Xavier

unread,
Oct 10, 2022, 3:29:15 PM10/10/22
to DSI Studio
I've confirmed the source file fliped visually using O1: View Images. 

Capture.PNG

I am afraid NDC checked the same file, because quality control ask for the folder not the file.

Ítalo Xavier

Fang-Cheng Yeh

unread,
Oct 10, 2022, 3:38:29 PM10/10/22
to dsi-s...@googlegroups.com
Thanks for attaching the screenshot. 
As I mentioned, the voxel orders are only saved in different orders (LPS vs RPS), and the head position is still the same.
===> NIFTI file can be saved in LPS and RAS provided the srow is written correctly: https://nifti.nimh.nih.gov/

--
You received this message because you are subscribed to the Google Groups "DSI Studio" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dsi-studio+...@googlegroups.com.

Fang-Cheng Yeh

unread,
Oct 10, 2022, 3:54:11 PM10/10/22
to dsi-s...@googlegroups.com
Hi Ítalo,

    I checked the screenshot in detail and the DSI Studio code again. You are right that the SRC file is flipped. This is a visualization bug when showing the content of the SRC file. The file content is okay.

    I am updating DSI Studio to avoid this issue: https://github.com/frankyeh/DSI-Studio/actions/runs/3221971871 (should be ready in an hour).

     Thanks a lot for the help, and I am sorry for the inconvenience caused.

Best,
Frank

Ítalo César Porto Xavier

unread,
Oct 11, 2022, 3:14:54 PM10/11/22
to DSI Studio
Hi Frank,

How you concluded that is ok with the .src? 

How you compare before and after eddy? The quality control only check the source files as your site describes:
Capture.PNG

I would like to know how can I defend that the eddy actually corrected the image.

Regards,

Ítalo Xavier

Fang-Cheng Yeh

unread,
Oct 11, 2022, 3:24:19 PM10/11/22
to dsi-s...@googlegroups.com
I would save a new SRC file after eddy

There is a --save_src parameter with --action=rec for this purpose  

Ítalo César Porto Xavier

unread,
Oct 11, 2022, 3:43:09 PM10/11/22
to DSI Studio
I collected 3 examples before and after eddy:
Capture.PNG

Renamed the corrected file as the same as the .src file, with other prefix:
Capture.PNG

Couldn't load the files after eddy:
Capture.PNG

Ítalo Xavier

Fang-Cheng Yeh

unread,
Oct 11, 2022, 4:04:53 PM10/11/22
to dsi-s...@googlegroups.com
SRC files are not NIFTI files. Renaming them won't work out.
You would need to save SRC files from DSI Studio.

Ítalo César Porto Xavier

unread,
Oct 11, 2022, 4:13:32 PM10/11/22
to DSI Studio
What? The corrected file after eddy correction has .src in name. Do you want me to do what with the corrected file if the file is already a src?

Capture.PNG

I don't get it...

Fang-Cheng Yeh

unread,
Oct 11, 2022, 4:22:20 PM10/11/22
to dsi-s...@googlegroups.com
Renamed the corrected file as the same as the .src file, with other prefix <= this won't work correctly.


Ítalo César Porto Xavier

unread,
Oct 11, 2022, 4:26:58 PM10/11/22
to DSI Studio
This I understand mate.

Do I have to create a copy of bvec and bval for the same subject, create the source file for the corrected, and then rerun the Quality Control?

Fang-Cheng Yeh

unread,
Oct 11, 2022, 4:31:27 PM10/11/22
to dsi-s...@googlegroups.com
It is one solution.
What I usually did is use --save_src with --action=rec to save another copy, or in the GUI, use the [File] menu to save a corrected copy.
Frank

Ítalo César Porto Xavier

unread,
Oct 11, 2022, 5:42:13 PM10/11/22
to DSI Studio
1. '--save_src' ask for input?
2. Must I put --action=rec also --action=qc?
3. Can I do it in one line?

Ítalo Xavier

Fang-Cheng Yeh

unread,
Oct 11, 2022, 5:51:33 PM10/11/22
to dsi-s...@googlegroups.com
1. --save_src=new.src.gz
2. No
3. No


Ítalo César Porto Xavier

unread,
Oct 14, 2022, 7:14:12 AM10/14/22
to DSI Studio
Thank you Frank. Do you know how to solve the bug while executing eddy_cuda?

Capturar.PNG

Fang-Cheng Yeh

unread,
Oct 14, 2022, 8:41:30 AM10/14/22
to dsi-s...@googlegroups.com
You need to install cuda toolkit.
If still does not work, then use the CPU version of DSI Studio.
Frank


Ítalo César Porto Xavier

unread,
Oct 14, 2022, 3:30:41 PM10/14/22
to DSI Studio
Thank you!

Ítalo César Porto Xavier

unread,
Nov 23, 2022, 12:48:24 PM11/23/22
to DSI Studio
Hi mate, I'm here again.

I am executing the eddy_cuda.exe in command line and sometime I get the error on the image, Do you know what it is?

Regards,
Ítalo
Capturar.PNG

Ítalo César Porto Xavier

unread,
Nov 23, 2022, 1:17:33 PM11/23/22
to dsi-s...@googlegroups.com
See that I ran again and didn't get any error:

You received this message because you are subscribed to a topic in the Google Groups "DSI Studio" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/dsi-studio/F_YvhnkYHm0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dsi-studio+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dsi-studio/52969337-d0a1-4ad6-92e5-07bb6d1cce6dn%40googlegroups.com.
Capturar.PNG

Fang-Cheng Yeh

unread,
Nov 23, 2022, 8:39:38 PM11/23/22
to dsi-s...@googlegroups.com
It would be a problem with the CUDA driver, but there could be other causes.

unfortunataely, i am not familiar with CUDA in Ubuntu.

Frank

Ítalo César Porto Xavier

unread,
Nov 24, 2022, 7:12:49 AM11/24/22
to dsi-s...@googlegroups.com
I'm using the CUDA in Windows. I'll check the driver update.

Thank you Fang

Ítalo César Porto Xavier

unread,
Dec 10, 2022, 7:43:46 AM12/10/22
to DSI Studio
Hi Frank!

My DWI data has distortion from posterior to anterior (image below), and I've checked that the MR uses the following parameters: 0 1 0 0.1 (dir=+y)
When I ran the Eddy correction in GUI, generated the .txt with 0 -1 0 0.5, this change the results, what should I do to change it in command line?

Regards,

Ítalo Xavier

Capturar.PNG
Reply all
Reply to author
Forward
0 new messages