biac:analysis:topup_correction
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
biac:analysis:topup_correction [2019/02/21 19:29] – cmp12 | biac:analysis:topup_correction [2024/06/21 15:44] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 7: | Line 7: | ||
There will be two series of single timepoint EPI images. | There will be two series of single timepoint EPI images. | ||
- | You need to calculate readout time in seconds ( the physical time it takes to get the acquisition matrix of a single slice ) and get the polarity direction ( phase encode direction ). | + | You need to calculate readout time in seconds |
the readout time in seconds for the parameter file will be: | the readout time in seconds for the parameter file will be: | ||
- | < | + | **For singleband images :** |
+ | < | ||
+ | readout = (echospacing * (acquisitionmatrix[0] * (percentsampling/ | ||
echospacing in the BXH header is in microseconds | echospacing in the BXH header is in microseconds | ||
Line 16: | Line 19: | ||
- | the polarity | + | **For mutli-band images the readout calculation is more complex:** |
+ | < | ||
+ | readout = ( ( ceil ((1/ | ||
+ | |||
+ | AcquisitionMatrixPE = the acquisition size of the data ( acquisitionmatrix[0] ) | ||
+ | Round_factor = 4 if partial fourier ( PFF is in scanoptions ), 2 if full fourier. | ||
+ | Asset_R_factor = the reciprocal of the first value of dcm tag (0043, | ||
+ | </ | ||
+ | |||
+ | unfortunately at this point the polarity | ||
+ | |||
+ | Here is a rough guide to help with inspection. | ||
+ | {{: | ||
reverse will be " | reverse will be " | ||
Line 62: | Line 78: | ||
applytopup --imain=../ | applytopup --imain=../ | ||
applytopup --imain=../ | applytopup --imain=../ | ||
+ | </ | ||
+ | |||
+ | If you have the scenario where the functional data was acquired with acceleration, | ||
+ | |||
+ | < | ||
+ | echospacing in the BXH header is in microseconds | ||
</ | </ | ||
Line 88: | Line 110: | ||
==== Create your acq_params.txt file === | ==== Create your acq_params.txt file === | ||
- | the readout time in seconds for the parameter file will be: | + | calculate your readout time from above |
- | < | + | |
- | + | ||
- | echospacing in BXH header is in microseconds | + | |
- | </ | + | |
the regular B0s will get the " | the regular B0s will get the " | ||
Line 181: | Line 199: | ||
[[https:// | [[https:// | ||
- | ==== Calculate your readout time ==== | + | If you are running dwidenoise, do it BEFORE dwipreproc. |
- | < | + | |
- | echospacing in BXH header is in microseconds | + | ==== Calculate your readout time as mentioned above ==== |
- | </ | + | |
==== Prepare your input datasets ==== | ==== Prepare your input datasets ==== | ||
there are 2 scenarios that typically apply here | there are 2 scenarios that typically apply here | ||
- | 1) a short acquisition with RPE B0s | + | 1) DWI and a short acquisition with RPE B0s |
- | 2) an entire | + | 2) 2 entire |
In both scenarios it is important to create your data with normal phase encoding direction first, followed by reversed. | In both scenarios it is important to create your data with normal phase encoding direction first, followed by reversed. | ||
Line 198: | Line 214: | ||
==== Prepare your input datasets ==== | ==== Prepare your input datasets ==== | ||
+ | |||
+ | Specify that a set of images (typically b=0 volumes) will be provided for use in inhomogeneity field estimation only | ||
For scenario 1, create your blip up / blip down B0 data the same way as above. | For scenario 1, create your blip up / blip down B0 data the same way as above. | ||
Line 204: | Line 222: | ||
bxhselect --timeselect 0 bia6_00197_013.bxh bd | bxhselect --timeselect 0 bia6_00197_013.bxh bd | ||
fslmerge -t bud bu.nii.gz bd.nii.gz | fslmerge -t bud bu.nii.gz bd.nii.gz | ||
+ | rm bu.* bd.* | ||
</ | </ | ||
Line 220: | Line 239: | ||
#put THOSE back into the mif header | #put THOSE back into the mif header | ||
mrconvert -grad grads.b dwi.mif dwi.mif -force | mrconvert -grad grads.b dwi.mif dwi.mif -force | ||
+ | |||
</ | </ | ||
- | The last step seems redundant, but there is an issue with how mrtrix3 tools are handling the multi-shell GE data produced on our scanners. | + | The last step seems redundant, but there is an issue with how mrtrix3 tools are handling the multi-shell GE data produced on our scanners. |
- | ===== Run dwipreproc -rpe_pair | + | ==== Run dwipreproc -rpe_pair ==== |
Run [[https:// | Run [[https:// | ||
< | < | ||
- | dwipreproc | + | dwifslpreproc |
-rpe_pair specifies you're providing a pair of B0s ( regular, reversed ) | -rpe_pair specifies you're providing a pair of B0s ( regular, reversed ) | ||
Line 246: | Line 266: | ||
===== Scenario 2 ===== | ===== Scenario 2 ===== | ||
- | You have an entire acquisition with the same gradient table as your DWI sequence, but with reverse phase encoding. | + | You have an entire acquisition with the same gradient table as your DWI sequence, but with reverse phase encoding. This information will be used to perform a recombination of image volumes (each pair of volumes with the same b-vector but different phase encoding directions will be combined together into a single volume). |
Calculate the readout time in the same way as above | Calculate the readout time in the same way as above | ||
Line 256: | Line 276: | ||
< | < | ||
#concat the 2 series ( regular, reversed ) | #concat the 2 series ( regular, reversed ) | ||
- | bxh_concat | + | bxh_concat |
+ | 7_LAS.bxh bia6_00260_008_LAS.bxh both | ||
#extract the gradients | #extract the gradients | ||
- | extractdiffdirs --fsl both bvecs bvals | + | extractdiffdirs --fsl both.bxh bvecs bvals |
#convert to mif | #convert to mif | ||
Line 281: | Line 302: | ||
dwipreproc dwi.mif dwi_corr.mif -rpe_all -pe_dir AP -readout_time 0.10656 -debug | dwipreproc dwi.mif dwi_corr.mif -rpe_all -pe_dir AP -readout_time 0.10656 -debug | ||
- | -rpe_all signals that you've replicated ALL the directions with a rpe acquisition | + | - rpe_all signals that you've replicated ALL the directions with a rpe acquisition |
- | -pe_dir is the phase encode direction of your regular acquisition | + | - pe_dir is the phase encode direction of your regular acquisition |
- | -readout_time from above | + | - readout_time from above |
</ | </ | ||
+ | |||
+ | {{ : | ||
biac/analysis/topup_correction.txt · Last modified: 2024/06/21 15:44 by 127.0.0.1