Good afternoon DIPY experts!
I am in the process of performing free water elimination (FWE) on an in-house HYDI dataset using DIPY. In my research regarding how to develop an effective FWE pipeline, I learned that it is necessary to exclude voxels with a high water volume fraction, which can be done by excluding voxels with FA values linked to volume fractions above 0.7. In creating my free-water corrected scalar maps, I have done this for my FA maps with the following lines of code:
FA = fwdtifit.fa
F = fwdtifit.f
FA[F > 0.7] = 0
It is still unclear to me as to how I should go about (1) extracting my other free-water corrected DTI scalar maps (i.e. MD, RD, AD), as well as (2) how I should go about controlling for these high water volume fractions voxels in non-FA scalars. To resolve the latter source of confusion, should I just exclude non-FA scalar values associated with a volume fraction exceeding 0.7? I am planning to attempt to get the volume-fraction corrected, free-water eliminated scalar maps with the following lines of code:
MD = fwdtifit.md
MD[MD > 0.7] = 0
RD = fwdtifit.rd
RD[RD > 0.7] = 0
AD = fwdtifit.ad
AD[AD > 0.7] = 0
Does this code make sense for what I need it for? That is, is this the correct way to be handling these issues? Also, might someone be able to explain to me what the ".f" function does?
Thank you so much for all of your help and consideration!
Dear Dipy developers and users,
I am planning to preprocess DWI data to study free-water in both white matter and grey matter. I have notice that there are at least 3 differnt denoising options (NLMEANS, local PCA and Marcenko-Pasteur PCA) and I would like to kindly ask (whoever wants to answer) , which are the pros and cons of each one, or which one is most commonly used by default.
Thanks in advance
Hospital del Mar,
Hi DIPY Experts,
I am interested in saving the diffusion tensor as a NIFTI file created as part of the free water implementation. I ran the following commands:
import numpy as np
import nibabel as nib
import dipy.reconst.fwdti as fwdti
import dipy.reconst.dti as dti
import matplotlib.pyplot as plt
img = nib.load(fdwi)
data = img.get_data()
affine = img.affine
mask = nib.load(mask_wb)
maskdata = mask.get_data()
fwdtimodel = fwdti.FreeWaterTensorModel(gtab,fit_method='NLS')
fwdtifit = fwdtimodel.fit(data, mask=maskdata)
1) The following errors were displayed even though the code ran after running the fwidtifit command above:
.../python_local/scipy/optimize/minpack.py:447: RuntimeWarning: Number of calls to function has reached maxfev = 1800.
...python_local/dipy/reconst/fwdti.py:454: RuntimeWarning: overflow encountered in exp
y = (1-f) * np.exp(np.dot(design_matrix, tensor[:7])) + \
I wanted to verify if this is just due to imperfect masking near the edge or if this means the code did not fully run and that there are errors to fix.
2) I ran the following code to save the tensor, as from my understanding fwdtifit uses the DTI tensorfit module:
img = nib.Nifti1Image(fwdtifit.quadratic_form, affine)
Is this the upper or lower triangle? The NIFTI standard is lower triangle, but given that in the DTI module has a lower_triangular function I am guessing DIPY default is the upper triangle.
I am having trouble using the lower_triangular function so if you can send me the correct way to interface with this command that would be much appreciated.
Thanks for your email. This data is part of the DIPY software package, so I
am adding the mailing list for this software. I don't know the parameters
of acquisition for this data, but someone here might know. I believe that
there should be a page in the documentation of the upcoming version that
will have some more details about these data.
On Thu, May 14, 2020 at 8:25 AM Tomasz Pięciak <tpieciak(a)gmail.com> wrote:
> Dear Ariel,
> I hope you are doing well.
> Just a simple question regarding Sherbrooke 3shell data that you have
> shared in 2017 (
> May I kindly ask you to provide exact parameters used to acquire this
> data? I mean the diffusion times (small and big deltas).
> Thank you.
> Have a nice day!
> Kind regards,
> Tomasz Pieciak
> Universidad de Valladolid, Valladolid, Spain
Hello DIPY experts,
I am attempting to apply a free water correction to my DWI data in order to look at structures such as the fornix. Normally I process data within FSL, though I do have experience coding with Python. To use the free water correction, do I need to do all of my preprocessing within DIPY, or am I able to use the data I have already preprocessed within FSL? Are there also any tutorials in using my own data for processing, rather than examples? I am able to process examples with no issue, but I am struggling with applying these commands to my own data. I have mainly been confused with where to house my data, and how to proceed when I have a different type of data than the example (I have multi-shelled HYDI data, but many examples are with HARDI). I have not been successful at loading my own data for any of the examples as of yet.
Any advice or resources would be extremely helpful. My lab believes that DIPY will be the way forward, so I am more than willing to learn how to do preprocessing within DIPY, it would just be convenient for my current project to use my already preprocessed data.
Thank you for your help,