Print

Print


I googled and there are fragments at best on this issue.

Could you tell me if this stream is heading in the right direction ?

The images this produces are not as good of a correction as when I used the
epi_reg example given in this email stream.

Also I am considering using a method Jesper mentioned in another email
stream - Runing eddy first, then use fugue on the eddy corrected images
with the fieldmaps to unwarp. Do you have a clear stream for that ?
Please I have read the fsl/wiki on all of these subjects and can not piece
this stuff together....

# TEXT FILES
# ACQP.TXT - INFORM EDDY WHAT DIRECTION THE DISTORTIONS ARE LIKELY TO GO IN
# PHASE ENCODING DIRECTION A >>> P --> Y DIRECTION
# ACCORDING TO DTI64 IMAGE REVIEW - HAS NEGATIVE BLIPS (DEPRESSIONS IN
FRONTAL LOBE)
# [0 -1 0] IMPLIES LOWER FREQUENCY IS ASSOCIATED WITH A POSITION HIGHER UP
Y(I.E. NEGATIVE BLIPS)
#  "DWELL TIME" x " PE STEPS - 1" AND IT IS ALSO THE RECIPROCAL OF THE PE
BANDWIDTH/PIXEL.
# ECHO SPACING = 0.00069 SECS && EPI FACTOR = 110 (0.00069 * (110 - 1) =
0.07521
# TAKING THE FORM 0 -1 0 0.075
# 0 1 0 0.075

# INDEX.TXT - USED TO DETERMINE NUMBER OF VIABLE SLICES IN DTI64 - TO
INCLUDE B0s


 "*************************************    SINGLE B0 VOLUME PREP
*********************************"
# EXTRACT FIRST IMAGE FROM DTI (SHOULD BE NON DIFFUSION WIEGHTED IMAGE)
fslroi DTI64 NODIF_B0 0 1

# SKULL STRIPPED NONDIFF BRAIN MASK USED TO CONTRAIN EDDY CORRECTION
bet2 NODIF_B0 NODIF_B0_brain -m -f .25

echo "*************************************     PREPARE FIELD MAP
 **********************************************"
# EXTRACT FIRST IMAGE FROM MAGNITUDES (MAG)
fslroi dtiFMmag1mag2 dtiFMmag 0 1

# BRAIN EXTRACT FIRST MAG FOR FSL_PREP_FIELDMAP
bet dtiFMmag dtiFMmag_brain

# ERODE MAG
fslmaths dtiFMmag_brain -ero dtiFMmag_brain

# PHASE FM INTO RADIANS/S - DIFFERENCE IN MAGS ECHO TIME 2.46 SECS
(7.38-4.92)
fsl_prepare_fieldmap SIEMENS dtiFMphase.nii.gz dtiFMmag_brain dtiFMrads 2.46

# I THINK THIS MAKES FIELDMAPS INTO Hz????
prelude -c dtiFMrads -u dtiFM_Hz

# RIGDID BODY REGISTRATION - FIELMAP MAG TO B0 AND CREATE MATRIX
TRANSFORMATION (.MAT)
# flirt -ref NODIF_B0 -in dtiFMmag -schedule
${FSLDIR}/etc/flirtsch/sch2D_3dof -out dtiFMmag_2_B0 \
-omat dtiFM_2_B0_mat.mat

# APPLY .MAT TO DTI FIELDMAP IN Hz FOR EDDY
# flirt -ref NODIF_B0 -in dtiFMphase -out dtiFMphase_2_B0 -init
dtiFM_2_B0_mat.mat -applyxfm

echo "*************************************    EDDY
 ******************************************************"
# EDDY CURRENT, MOTION, & WARPING CORRECTION
eddy --imain=DTI64 --mask=NODIF_B0_brain_mask --index=index.txt
--acqp=acqp.txt \
--bvecs=bvec --bvals=bval --field=dtiFM_Hz --out=DTI64_EDCOR











On Thu, Jul 12, 2018 at 3:18 AM, Jesper Andersson <
[log in to unmask]> wrote:

> Dear Joseph,
>
> I think eddy needs -
>
> I think I got the acqp.txt and index.txt part values right
>
> but what to put into --field_mat ?
>
> I have to make a .mat file like the following?
>
> fsl_prepare_fieldmap SIEMENS dtiFMphase.nii.gz dtiFMmag_brain dtiFMrads
> 2.46
>
> flirt -ref first_Vol_in_Dti -in dtiFMrads -init my_matfile -applyxfm
>
> so my eddy command will look like this?
>
> eddy --imain=DTI64 --mask=first_Vol_in_Dti_mask --index=index.txt
> --acqp=acqp.txt \
> --bvecs=bvec --bvals=bval --field=dtiFMrads --field_mat=my_mat_file
> --out=DTI64_EDY
>
>
> if you do a google search on “eddy fieldmap” you should find the help page
> where this is described. In general the eddy online help is quite good, so
> it makes sense to take a look there if you have a problem.
>
> https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/eddy/UsersGuide#A--field
>
> As you can see there there are two important caveats when using a
> dual-echo fieldmap with eddy. There is actually a third one too, which is
> that the resulting voxel-displacement-map has to be invertible. Because of
> these caveats we are getting a lot of reports from people who are having
> problems with using a measured fieldmap. I am currently working on a tool
> that will “massage” a measured fieldmap into a format that works with eddy.
>
> But we _strongly_ recommend acquiring a reverse-PE-polarity fieldmap
> instead of a dual-echo fieldmap.
>
> Jesper
>
>
>
> On Wed, Jul 11, 2018 at 11:17 AM, VA Research <n.n.di.methyl.tryptamine1@
> gmail.com> wrote:
>
>> Agreed, I am trying to figure out how to do that right now.
>>
>>
>> On Wed, Jul 11, 2018 at 11:01 AM, Danny Kim <[log in to unmask]> wrote:
>>
>>> Hi
>>>
>>>
>>> Why use epi_reg?
>>>
>>> Why not just use eddy and specifying the field map you collected to do
>>> distortion correction?
>>>
>>>
>>> Danny Kim
>>> ------------------------------
>>> *From:* FSL - FMRIB's Software Library <[log in to unmask]> on behalf
>>> of VA Research <[log in to unmask]>
>>> *Sent:* Tuesday, July 10, 2018 6:17 PM
>>>
>>> *To:* [log in to unmask]
>>> *Subject:* Re: [FSL] BEDPOSTX - Still Running After 5 Days
>>>
>>> I think epi_reg is the culprit - after eddy correction - run epi_reg
>>> with fieldmaps to unwarp - which works but yes it does upsample like crazy
>>> by registering my dti to my mprage
>>>
>>> Can I use epi_reg to remove warping WITHOUT registering to the T1?
>>>
>>> #   UNWARP WITH FIELMAPS & REGISTER DTI64 TO MPRAGE
>>> # EFFECTIVE ECHO SPACING FOR DTI = 0.69 ms
>>> # PHASE ENCODING DIRECTION FOR DTI64 = ANTERIOR >>> POSTERIOR = -Y
>>> epi_reg --echospacing=0.00069 --wmseg=T1_wmseg --fmap=dtiFMrads
>>> --fmapmag=dtiFMmag --fmapmagbrain=dtiFMmag_brain --pedir=-y
>>> --epi=DTI64_EDY --t1=oMPRAGE --t1brain=oMPRAGE_brain --out=EDCOR_FUNC2STRUCT
>>>
>>> On Tue, Jul 10, 2018 at 3:01 PM, Stamatios Sotiropoulos <
>>> [log in to unmask]> wrote:
>>>
>>>> Hi
>>>>
>>>> Whatever you have done in “Preprocessing” has massively and
>>>> unnecessarily upsampled your data, which is why bedpostx now takes ages
>>>> (you go from a 110x110 matrix and 65 slices to  192x256 matrix with 256
>>>> slices). This looks wrong, so before worrying about bedpostx you should get
>>>> your preprocessing right, there is no need for any upsampling when you do
>>>> distortion correction.
>>>>
>>>> Cheers
>>>> Stam
>>>>
>>>>
>>>> On 10 Jul 2018, at 22:42, VA Research <n.n.di.methyl.tryptamine1@GMA
>>>> IL.COM> wrote:
>>>>
>>>> DTI IN 64 DIRECTIONS
>>>>
>>>> AFTER RUNNING PREPROCESSING I JUST USE THE DEFAULT bedpostx DTI (no
>>>> options)
>>>>
>>>> DTI BEFORE RUNNING EDDY AND UNWARPING WITH FIELDMAPS EPI_REG
>>>> data_type      INT16
>>>> dim1           110
>>>> dim2           110
>>>> dim3           65
>>>> dim4           69
>>>> datatype       4
>>>> pixdim1        2.000000
>>>> pixdim2        2.000000
>>>> pixdim3        2.000000
>>>> pixdim4        11.700000
>>>> cal_max        0.0000
>>>> cal_min        0.0000
>>>> file_type      NIFTI-1+
>>>>
>>>> DTI AFTER RUNNING THOSE PREPROCESSING
>>>>
>>>> data_type      FLOAT32
>>>> dim1           192
>>>> dim2           256
>>>> dim3           256
>>>> dim4           69
>>>> datatype       16
>>>> pixdim1        1.000000
>>>> pixdim2        1.000000
>>>> pixdim3        1.000000
>>>> pixdim4        1.000000
>>>> cal_max        0.0000
>>>> cal_min        0.0000
>>>> file_type      NIFTI-1+
>>>>
>>>>
>>>>
>>>>
>>>> On Tue, Jul 10, 2018 at 1:56 PM, Stamatios Sotiropoulos <
>>>> [log in to unmask]> wrote:
>>>>
>>>>> Hi Joseph
>>>>>
>>>>> What is the resolution of your data and how many directions do you
>>>>> have? And how do you call bedpostx?
>>>>>
>>>>> Bedpostx is not multi-threaded. It can only use multiple cores via SGE
>>>>> or similar cluster scheduler. If you do not have that, every slice will be
>>>>> processed serially on a single core, so for high resolution data and
>>>>> depending on how many MCMC iterations/model type you have asked this can
>>>>> take very long. Which is why we developed a GPU version, as Moises pointed
>>>>> out.
>>>>>
>>>>> Cheers
>>>>> Stam
>>>>>
>>>>>
>>>>> On 10 Jul 2018, at 20:29, Krieger, Donald N. <[log in to unmask]>
>>>>> wrote:
>>>>>
>>>>> Hopefully one of the FSL people will weight in on this.
>>>>> I'm interested to hear what they say.
>>>>>
>>>>> When I saw something comparable, I just assumed there was something
>>>>> wrong with the scan which was tripping FSL up.
>>>>>
>>>>> Best - Don
>>>>>
>>>>> ------------------------------
>>>>> *From:* FSL - FMRIB's Software Library <[log in to unmask]> on behalf
>>>>> of VA Research <[log in to unmask]>
>>>>> *Sent:* Tuesday, July 10, 2018 1:58:25 PM
>>>>> *To:* [log in to unmask]
>>>>> *Subject:* Re: [FSL] BEDPOSTX - Still Running After 5 Days
>>>>>
>>>>> Every slice seems to be taking 3+ hours to complete.
>>>>>
>>>>> I have plenty of cores(12) and ram (64gb) available.
>>>>>
>>>>> looking the activity monitor  xfibres 156MB of ram
>>>>>
>>>>> On Tue, Jul 10, 2018 at 3:24 AM, Krieger, Donald N. <[log in to unmask]
>>>>> > wrote:
>>>>>
>>>>> Hi Joseph,
>>>>>
>>>>> If it’s still running take a look at how much memory it is using, both
>>>>> resident and virtual.
>>>>> I have seen bedpostx jobs run interminably on a single core when I had
>>>>> more than two jobs running on a multi-core device which shares 8 GBytes of
>>>>> memory.
>>>>> I a lot of virtual memory is in use, the job is likely going to the
>>>>> disk often for memory space which slows things down by more than an order
>>>>> of magnitude.
>>>>> I also have had jobs which ran interminably for no reason that I could
>>>>> identify but I presumed that there was a problem with the scan quality
>>>>> which was causing the problem.
>>>>>
>>>>> I hope this is helpful.
>>>>>
>>>>> Best – Don
>>>>>
>>>>> *From:* FSL - FMRIB's Software Library [mailto:[log in to unmask]] *On
>>>>> Behalf Of *Moises Hernandez
>>>>> *Sent:* Monday, July 9, 2018 10:45 PM
>>>>> *To:* [log in to unmask]
>>>>> *Subject:* Re: [FSL] BEDPOSTX - Still Running After 5 Days
>>>>>
>>>>> Hi Joseph,
>>>>>
>>>>> It is possible that something did not work correctly,
>>>>> but bedpostx can take 1 or 2 days if you use a single CPU core,
>>>>> or even more if your data is high resolution.
>>>>>
>>>>> Do you get any message at all?
>>>>>
>>>>> An alternative is to use an NVIDIA gpu:
>>>>> https://users.fmrib.ox.ac.uk/~moisesf/Bedpostx_GPU/
>>>>>
>>>>> Moises.
>>>>>
>>>>> On 9 July 2018 at 21:39, VA Research <n.n.di.methyl.tryptamine1@gma
>>>>> il.com> wrote:
>>>>>
>>>>> Hello Experts,
>>>>>
>>>>> Any ideas, why it would be taking this long to complete one DTI image?
>>>>>
>>>>> Thanks so much,
>>>>>
>>>>> Joseph Veliz
>>>>>
>>>>> ------------------------------
>>>>> To unsubscribe from the FSL list, click the following link:
>>>>> https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=FSL&A=1
>>>>>
>>>>>
>>>>>
>>>>> ------------------------------
>>>>> To unsubscribe from the FSL list, click the following link:
>>>>> https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=FSL&A=1
>>>>>
>>>>> ------------------------------
>>>>> To unsubscribe from the FSL list, click the following link:
>>>>> https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=FSL&A=1
>>>>>
>>>>>
>>>>>
>>>>> ------------------------------
>>>>> To unsubscribe from the FSL list, click the following link:
>>>>> https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=FSL&A=1
>>>>>
>>>>> ------------------------------
>>>>> To unsubscribe from the FSL list, click the following link:
>>>>> https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=FSL&A=1
>>>>>
>>>>>
>>>>>
>>>>> ------------------------------
>>>>>
>>>>> To unsubscribe from the FSL list, click the following link:
>>>>> https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=FSL&A=1
>>>>>
>>>>
>>>>
>>>> ------------------------------
>>>>
>>>> To unsubscribe from the FSL list, click the following link:
>>>> https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=FSL&A=1
>>>>
>>>>
>>>>
>>>> ------------------------------
>>>>
>>>> To unsubscribe from the FSL list, click the following link:
>>>> https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=FSL&A=1
>>>>
>>>
>>>
>>> ------------------------------
>>>
>>> To unsubscribe from the FSL list, click the following link:
>>> https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=FSL&A=1
>>>
>>> ------------------------------
>>>
>>> To unsubscribe from the FSL list, click the following link:
>>> https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=FSL&A=1
>>>
>>
>>
>
> ------------------------------
>
> To unsubscribe from the FSL list, click the following link:
> https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=FSL&A=1
>
>
>
> ------------------------------
>
> To unsubscribe from the FSL list, click the following link:
> https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=FSL&A=1
>

########################################################################

To unsubscribe from the FSL list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=FSL&A=1