Print

Print


Matt, 
Thank you very much for your assistance. I have prepared the data  and apply FM to DWI images according to this description below
 and the DWI images look better after FM correction for me. If you want to check please see: 
https://www.dropbox.com/sh/emfsu2rg3u7j57e/AAAc8Q5KB3rhMyQ1hYR8QPu1a?dl=0
1) ### convert the data (MRI converter with option ,,save multivolme series as 4D files) from DICOM to NIFI format ####
2) #### prepare the Magnitude image ####
bet Magnitude.nii.gz Magnitude_brain.nii.gz -f .3 –m
3) #### calcute the fmap in rads (fmap_rad) ####
fsl_prepare_fieldmap SIEMENS Phase.nii Magnitude_brain.nii.gz fmap_rad 2.46
4)### masking (fmap_rad) ####
fslmaths fmap_rad.nii.gz -mas Magnitude_brain_mask.nii.gz fmap_rad_brain.nii.gz
5) ####  smooth the field map using –s 4 ###
fugue --loadfmap=fmap_rad_brain.nii.gz -s 4 --savefmap=fmap_brain_s4
6) ####  fslroi  ###
fslroi data1.nii. nodif 0 1
7) #### applying eddy_correction to the DWI data ####
eddy_correct data1.nii.gz data1_corr.nii.gz 0
8) #### brain extract the b0 image ####
bet nodif.nii.gz nodif_brain -m -f .3
9) ####  warp the magnitude image according to the deformation specified in the field map ####
fugue -v –i Magnitude_brain --unwarpdir=y- --dwell=0.00082 --loadfmap=fmap_rad.nii.gz -w Magnitude_brain_warpped
10) ####  linearly register the deformed magnitude image to the brain extracted b0 image ####
flirt -in Magnitude_brain_warpped.nii.gz -ref nodif_brain.nii.gz -out Magnitude_brain_warpped_2_nodif_brain -omat fieldmap2diff.mat
11) #### apply this linear transformation to the field map ####
flirt -in fmap_rad_brain_s4.nii.gz –ref nodif_brain -applyxfm -init fieldmap2diff.mat -out fmap_rad_brain_s4_2_nodif_brain
12) #### undistort the full DTI dataset using the registered field map ####
fugue -v -i data1_corr.nii.gz --icorr --unwarpdir=y - --dwell=0.00082 --loadfmap=fmap_rad_brain_s4_2_nodif_brain.nii.gz -u data.nii.gz

I want to be sure if I have prepared it correctly:
1) step I if the data could be converted in that particular way? ( I have one DWI nifit file (as 4D) , one Phase nifiti file (4D) and one Magnitude nifit file (4D))
2) bet nodif.nii.gz nodif_brain -m -f .3 - if I have one nifti file for my DWI data and  there are included 128 DWI images (64 directions repaeted twice) and two b0 values files  this option will extract the non diffusion data - Am I right? 
3) could I omit  the step with eddy_corr (step 7) because I want to perform preprocessing in other program (resampling, motion correction), if not could I repeat this preprocess (ex. motion correction) in other software? 



You are very helpful, thank you again! 

2016-06-02 11:41 GMT-07:00 Natalia Kowalczyk <[log in to unmask]>:
Matt, 
Thanku very much for your assistance. I have prepare like this and the DWI images looks better after FM correction for me. If you want to check please see: 
https://www.dropbox.com/sh/emfsu2rg3u7j57e/AAAc8Q5KB3rhMyQ1hYR8QPu1a?dl=0
1) ### convert the data (MRI converter with option ,,save multivolme series as 4D files) from DICOM to NIFI format ####
2) #### prepare the Magnitude image ####
bet Magnitude.nii.gz Magnitude_brain.nii.gz -f .3 –m
3) #### calcute the fmap in rads (fmap_rad) ####
fsl_prepare_fieldmap SIEMENS Phase.nii Magnitude_brain.nii.gz fmap_rad 2.46
4)### masking (fmap_rad) ####
fslmaths fmap_rad.nii.gz -mas Magnitude_brain_mask.nii.gz fmap_rad_brain.nii.gz
5) ####  smooth the field map using –s 4 ###
fugue --loadfmap=fmap_rad_brain.nii.gz -s 4 --savefmap=fmap_brain_s4
6) ####  fslroi  ###
fslroi data1.nii. nodif 0 1
7) #### applying eddy_correction to the DWI data ####
eddy_correct data1.nii.gz data1_corr.nii.gz 0
8) #### brain extract the b0 image ####
bet nodif.nii.gz nodif_brain -m -f .3
9) ####  warp the magnitude image according to the deformation specified in the field map ####
fugue -v –i Magnitude_brain --unwarpdir=y- --dwell=0.00082 --loadfmap=fmap_rad.nii.gz -w Magnitude_brain_warpped
10) ####  linearly register the deformed magnitude image to the brain extracted b0 image ####
flirt -in Magnitude_brain_warpped.nii.gz -ref nodif_brain.nii.gz -out Magnitude_brain_warpped_2_nodif_brain -omat fieldmap2diff.mat
11) #### apply this linear transformation to the field map ####
flirt -in fmap_rad_brain_s4.nii.gz –ref nodif_brain -applyxfm -init fieldmap2diff.mat -out fmap_rad_brain_s4_2_nodif_brain
12) #### undistort the full DTI dataset using the registered field map ####
fugue -v -i data1_corr.nii.gz --icorr --unwarpdir=y - --dwell=0.00082 --loadfmap=fmap_rad_brain_s4_2_nodif_brain.nii.gz -u data.nii.gz

I want to be sure if I prepared it correctly:
1) step I if the data could be converted in that particular way? ( I have one DWI nifit file (as 4D) , one Phase nifiti file (4D) and one Magnitude nifit file (4D))
2) bet nodif.nii.gz nodif_brain -m -f .3 - if I have one nifti file for my DWI data and  there are included 128 DWI images (64 directions repaeted twice) and two b0 values files  this option will extract the non diffusion data - Am I right? 
3) could I omit  the step with eddy_corr (step 7) because I want to perform preprocessing in other program (resampling, motion correction), if not could I repeat this preprocess (ex. motion correction) in other software? 



You are very helpful, thank you again! 

Natalia 




2016-06-01 19:12 GMT-07:00 Matt Glasser <[log in to unmask]>:
Just take the output of the prepare field map script and your magnitude brain mask image and use fslmaths to do the masking (with the –mas flag).

Peace,

Matt.

From: FSL - FMRIB's Software Library <[log in to unmask]> on behalf of Natalia Kowalczyk <[log in to unmask]>
Reply-To: FSL - FMRIB's Software Library <[log in to unmask]>
Date: Wednesday, June 1, 2016 at 9:04 PM

To: <[log in to unmask]>
Subject: Re: [FSL] Field Maps FSL

Thank you Matt for your suggestions.

 I will try to do EPI reg on T1w image (after fslreorient2std). 

Could you please provide some details about the option  ,,processed filed map image after masking'' I could not find this option in FSL website. I suspect that it will be  with fudge? 

I'm sorry to ask such questions but I'm a beginner with Field Maps correction to DWI images. 

2016-06-01 17:36 GMT-07:00 Matt Glasser <[log in to unmask]>:
Maybe post the processed field map image after masking and also try running EPI reg on a T1w image that has had fslreorient2std run on it.

Peace,

Matt.

From: FSL - FMRIB's Software Library <[log in to unmask]> on behalf of Natalia Kowalczyk <[log in to unmask]>
Reply-To: FSL - FMRIB's Software Library <[log in to unmask]>
Date: Wednesday, June 1, 2016 at 6:43 PM

To: <[log in to unmask]>
Subject: Re: [FSL] Field Maps FSL

Here is also my phase image (no correction, no unwrapping), maybe somethig is wrong with these image: https://www.dropbox.com/s/5x4n736ldm2sbw2/original%20phase%20image.png?dl=0

2016-06-01 16:11 GMT-07:00 Natalia Kowalczyk <[log in to unmask]>:

2016-06-01 15:46 GMT-07:00 Matt Glasser <[log in to unmask]>:
Dropbox links like that are valid only for you, you need to get a “send link” link.

Peace,

Matt.

From: FSL - FMRIB's Software Library <[log in to unmask]> on behalf of Natalia Kowalczyk <[log in to unmask]>
Reply-To: FSL - FMRIB's Software Library <[log in to unmask]>
Date: Wednesday, June 1, 2016 at 5:23 PM

To: <[log in to unmask]>
Subject: Re: [FSL] Field Maps FSL

Yes I worried about the streaks. I do not know why there appeard? 
You mean field map brain extraction as a magnitude image after skull stripping (bet)? It looks correct for me, you could check here: https://www.dropbox.com/home/Field%20Map%20Magnitude%20Image%20after%20skull%20stripping

Thank you for your interest!

2016-06-01 14:36 GMT-07:00 Matt Glasser <[log in to unmask]>:
Are the streaks the main thing that is bothering you?  It looks like the overall shape might be being corrected.  Is the field map brain extraction good?

Peace,

Matt.

From: FSL - FMRIB's Software Library <[log in to unmask]> on behalf of Natalia Kowalczyk <[log in to unmask]>
Reply-To: FSL - FMRIB's Software Library <[log in to unmask]>
Date: Wednesday, June 1, 2016 at 10:18 AM

To: <[log in to unmask]>
Subject: Re: [FSL] Field Maps FSL


2016-05-31 23:07 GMT-07:00 Natalia Kowalczyk <[log in to unmask]>:
Sure.  

1) original DWI image 

2) corrected DWI images -  script: fsl_prepare_fieldmap SIEMENS field_maphase.nii field_map_brain.nii fmap_rads.nii 2.46
Before I used this script I have performed skul stripping (Magnitude image) like: bet filedmap_mag.nii field_map_brain_nii -f 0.3  (with option -f <f> fractional intensity threshold (0->1, value 0.3)
Then I tried to apply Field Map to my DWI images using  script: fugue -i dwi_image01_raw.nii --dwell=0.00082 --loadfmap=fmap_rads.nii --unwarpdir=y- -u resul

3) corrcted using epi_reg- script: epi_reg --epi=dwi_image_raw.nii --t1=struct --t1brain=struct_brain --out=epi2struct --fmap=fmap_rads.nii.gz --fmapmag=fmap_mag fmapmagbrain=fmap_mag_brain --echospacing=0.00082 --pedir=y-

Would be really great if anyone could help me with this.

Thanks in advance!

2016-05-31 21:42 GMT-07:00 Natalia Kowalczyk <[log in to unmask]>:
Sure. 
1) original DWI image 

2) corrected DWI images -  script: fsl_prepare_fieldmap SIEMENS field_maphase.nii field_map_brain.nii fmap_rads.nii 2.46
Before I used this script I have performed skul stripping (Magnitude image) like: bet filedmap_mag.nii field_map_brain_nii -f 0.3  (with option -f <f> fractional intensity threshold (0->1, value 0.3)
Then I tried to apply Field Map to my DWI images using  script: fugue -i dwi_image01_raw.nii --dwell=0.00082 --loadfmap=fmap_rads.nii --unwarpdir=y- -u resul

3) corrcted using epi_reg- script: epi_reg --epi=dwi_image_raw.nii --t1=struct --t1brain=struct_brain --out=epi2struct --fmap=fmap_rads.nii.gz --fmapmag=fmap_mag fmapmagbrain=fmap_mag_brain --echospacing=0.00082 --pedir=y-

Would be really great if anyone could help me with this.

Thanks in advance!

2016-05-31 17:08 GMT-07:00 Matt Glasser <[log in to unmask]>:
Post some before and after images.

Peace,

Matt.

From: FSL - FMRIB's Software Library <[log in to unmask]> on behalf of Natalia Kowalczyk <[log in to unmask]>
Reply-To: FSL - FMRIB's Software Library <[log in to unmask]>
Date: Tuesday, May 31, 2016 at 7:01 PM
To: <[log in to unmask]>
Subject: Re: [FSL] Field Maps FSL

Thanks for your help! 

I have tried with epi_reg :

 epi_reg --epi=dwi_image_raw.nii --t1=struct --t1brain=struct_brain --out=epi2struct --fmap=fmap_rads.nii.gz --fmapmag=fmap_mag fmapmagbrain=fmap_mag_brain --echospacing=0.00082 --pedir=y-

but epi_reg funtion does not improve my DWI data. 

I’m looking forward to hearing other suggetions. 

Bests, 

Natalia 

2016-05-31 14:28 GMT-07:00 Sheena Sharma <[log in to unmask]>:
Hi Natalia,

I have had the same issue and I'm not quite sure the answer but I thought I'd point you to this thread.The thread suggests epi_reg as a better alternative to fugue. However, for me epi_reg gave me worse results then fugue on DWI data, but perhaps I did something wrong. Please let me know how you get on if you try epi_reg. 

Best
Sheena

On Wed, Jun 1, 2016 at 7:27 AM, Natalia K <[log in to unmask]> wrote:
Dear FSL experts,

I would like to correct my orginal DWI data with Field Maps.
I have SIMENS data so I used script: fsl_prepare_fieldmap SIEMENS field_maphase.nii field_map_brain.nii fmap_rads.nii 2.46
Before I used this script I have performed skul stripping (Magnitude image) like: bet filedmap_mag.nii field_map_brain_nii -f 0.3  (with option -f <f> fractional intensity threshold (0->1, value 0.3)
Then I tried to apply Field Map to my DWI images using  script: fugue -i dwi_image01_raw.nii --dwell=0.00082 --loadfmap=fmap_rads.nii --unwarpdir=y- -u result

To conclude the DWI image does not looks better after FM correction. Did I made some mistake during these 3 steps (described above)?

I have also few questions:
1) Should I preprocess the DWI data before applying Field Map? (motion correction etc. using eddy_current)
2) I would like just to apply the FM to the DWI images, other steps I will be doing in other software (preprocessing: resampling, head motion correction etc).
3) Should I use FEAT at FSL to apply FM to DWI images? - I just want to apply the FM to DWI images and all other preprocessing steps I would like to perform in other program.

Any help or ideas would be greatly appreciated!

Thanks so much,

Natalia