users > eddy current correction error
Showing 1-7 of 7 posts
Display:
Results per page:
Oct 31, 2018  09:10 AM | Therese Sjoholm
eddy current correction error
Hello,

I want to use cmtk for unwarping EPI with eddy current correction, but I've run into problems with the eddy current correction. When running 'correct_dwi_distortion' for a set of diffusion weighted imaging data I get this error message:


Computing eddy current correction for S1_fwd_2.nii.gz...

ERROR: could not recursively create path for "...../eddy/b0_S1_fwd_2.xform/studylist"



Correction of B0 field distortion works fine for the same data. I'm running cmtk using cygwin.


Does anyone know what the problem might be?

Best,
Therese
Nov 2, 2018  03:11 AM | Torsten Rohlfing
RE: eddy current correction error
Hi Therese -

This looks very much like either a file permission or path syntax problem.

Specifically, if you actually posted the error message verbatim, the presence of five periods in the path would certainly explain why the file in question cannot be created.

Would you mind posting the complete command line here, including all complete file names? That should tell us more.

Best,
  Torsten
Nov 5, 2018  09:11 AM | Therese Sjoholm
RE: eddy current correction error
Hi Torsten,

Many thanks for your quick reply. The complete comand line is:

$ cmtk correct_dwi_distortion /cygdrive/c/Users/thesj165/Documents/dwi/scans/pilot/UPMR0044_Pilot1/cmtk_dc/test /cygdrive/c/Users/thesj165/Documents/dwi/scans/pilot/UPMR0044_Pilot1/raw/DWI_STIR_2b_PA_1/S1_rev_1.nii.gz /cygdrive/c/Users/thesj165/Documents/dwi/scans/pilot/UPMR0044_Pilot1/raw/DWI_SSRF_S1/S1_fwd_1.nii.gz /cygdrive/c/Users/thesj165/Documents/dwi/scans/pilot/UPMR0044_Pilot1/raw/DWI_SSRF_S1/S1_fwd_2.nii.gz
which: no lockfile in (/usr/local/bin:/usr/bin:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/System32/Wbem:/cygdrive/c/WINDOWS/System32/WindowsPowerShell/v1.0:/cygdrive/c/Program Files/MATLAB/R2018b/bin:/cygdrive/c/Program Files/MATLAB/R2018a/bin:/cygdrive/c/Program Files/dotnet:/cygdrive/c/WINDOWS/System32/OpenSSH:/cygdrive/c/Users/thesj165/AppData/Local/Microsoft/WindowsApps:/cygdrive/c/Program Files/elastix_v4.8:/cygdrive/c/Users/thesj165/AppData/Local/Continuum/anaconda3:/cygdrive/c/Users/thesj165/AppData/Local/Continuum/anaconda3/Scripts:/usr/lib)
========================================================================
CREATE /cygdrive/c/Users/thesj165/Documents/dwi/scans/pilot/UPMR0044_Pilot1/cmtk_dc/test/eddy/b0_S1_fwd_2.xform
========================================================================
Computing eddy current correction for S1_fwd_2.nii.gz...
ERROR: could not recursively create path for "/cygdrive/c/Users/thesj165/Documents/dwi/scans/pilot/UPMR0044_Pilot1/cmtk_dc/test/eddy/b0_S1_fwd_2.xform/studylist"
========================================================================
CREATE /cygdrive/c/Users/thesj165/Documents/dwi/scans/pilot/UPMR0044_Pilot1/cmtk_dc/test/dfield_fwd.nrrd
========================================================================
Computing deformation...
========================================================================
MISSING SOURCE /cygdrive/c/Users/thesj165/Documents/dwi/scans/pilot/UPMR0044_Pilot1/cmtk_dc/test/eddy/b0_S1_fwd_2.xform
========================================================================




Best,
Therese
Nov 10, 2018  02:11 AM | Torsten Rohlfing
RE: eddy current correction error
Hmmm... what do you get if you try

mkdir -p /cygdrive/c/Users/thesj165/Documents/dwi/scans/pilot/UPMR0044_Pilot1/cmtk_dc/test/eddy/b0_S1_fwd_2.xform

?
Nov 13, 2018  02:11 PM | Therese Sjoholm
RE: eddy current correction error
Hello,

If I first create the b0_S1_fwd_2.xform folder it seems like the eddy current correction step is not run. The complete command line is then:

thesj165@RUD-L11331 ~
$ cmtk correct_dwi_distortion /cygdrive/c/Users/thesj165/Documents/dwi/scans/pil ot/UPMR0044_Pilot1/cmtk_dc/test /cygdrive/c/Users/thesj165/Documents/dwi/scans/p ilot/UPMR0044_Pilot1/raw/DWI_STIR_2b_PA_1/S1_rev_1.nii.gz /cygdrive/c/Users/thes j165/Documents/dwi/scans/pilot/UPMR0044_Pilot1/raw/DWI_SSRF_S1/S1_fwd_1.nii.gz / cygdrive/c/Users/thesj165/Documents/dwi/scans/pilot/UPMR0044_Pilot1/raw/DWI_SSRF _S1/S1_fwd_2.nii.gz
which: no lockfile in (/usr/local/bin:/usr/bin:/cygdrive/c/WINDOWS/system32:/cyg drive/c/WINDOWS:/cygdrive/c/WINDOWS/System32/Wbem:/cygdrive/c/WINDOWS/System32/W indowsPowerShell/v1.0:/cygdrive/c/Program Files/MATLAB/R2018b/bin:/cygdrive/c/Pr ogram Files/MATLAB/R2018a/bin:/cygdrive/c/Program Files/dotnet:/cygdrive/c/WINDO WS/System32/OpenSSH:/cygdrive/c/Users/thesj165/AppData/Local/Microsoft/WindowsAp ps:/cygdrive/c/Program Files/elastix_v4.8:/cygdrive/c/Users/thesj165/AppData/Loc al/Continuum/anaconda3:/cygdrive/c/Users/thesj165/AppData/Local/Continuum/anacon da3/Scripts:/usr/lib)
========================================================================
CREATE /cygdrive/c/Users/thesj165/Documents/dwi/scans/pilot/UPMR0044_Pilot1/cmtk _dc/test/dfield_fwd.nrrd
========================================================================
Computing deformation...
========================================================================
CREATE /cygdrive/c/Users/thesj165/Documents/dwi/scans/pilot/UPMR0044_Pilot1/cmtk_dc/test/S1_fwd_2.nii.gz
========================================================================
Unwarping /cygdrive/c/Users/thesj165/Documents/dwi/scans/pilot/UPMR0044_Pilot1/raw/DWI_SSRF_S1/S1_fwd_2.nii.gz
The file/directory /cygdrive/c/Users/thesj165/Documents/dwi/scans/pilot/UPMR0044_Pilot1/cmtk_dc/test/eddy/b0_S1_fwd_2.xform does not seem to be in a supported transformation format


Best,
Therese
Nov 15, 2018  02:11 AM | Torsten Rohlfing
RE: eddy current correction error
Okay, yes, if you create the directory manually, the rest of the procedure will fail. That is expected. I was just trying to sort out if there was something wrong with your file permissions, the path of the intended output, etc. But if you can mkdir the target, then clearly it's not the case.

The only other problem I could think of would be if your path contained any "space" characters, but that does not appear to be the case.

At this point I am really at a loss.

There is are two more things you might try though:

First, use relative rather than absolute paths, like so:

cd /cygdrive/c/Users/thesj165/Documents/
cmtk correct_dwi_distortion dwi/scans/pilot/UPMR0044_Pilot1/cmtk_dc/test dwi/scans/pilot/UPMR0044_Pilot1/raw/DWI_STIR_2b_PA_1/S1_rev_1.nii.gz dwi/scans/pilot/UPMR0044_Pilot1/raw/DWI_SSRF_S1/S1_fwd_1.nii.gz dwi/scans/pilot/UPMR0044_Pilot1/raw/DWI_SSRF_S1/S1_fwd_2.nii.gz

Because there is a conflict of path syntax between native Windows and Cygwin, there might be some bug parsing absolute paths.

(A potentially useful side effect of using relative paths, by the way, is that you can move around your data and paths will remain valid, so long as you always run CMTK's binaries from the same directory relative to the data.)

Second, do you have both the Cygwin and the native Windows package of CMTK installed? If so, are you sure you are using the Cygwin version? That is, are you sure the Windows version isn't also in the Cygwin search path, and listed before the one for the Cygwin CMTK package?

Sorry if this seems silly to ask, but like I said, otherwise I am pretty much out of ideas.
Nov 15, 2018  09:11 AM | Therese Sjoholm
RE: eddy current correction error
Hi Torsten,

Using relative paths works!

I'm very grateful for your help - thank you so much. 

Best wishes,
Therese