muscbridge / PyDesigner

A hands-free DTI, DKI, FBI and FBWM preprocessing pipeline. Information on algorithms and preprocessing steps are available at https://www.biorxiv.org/content/10.1101/2021.10.20.465189v1 A video tutorial on PyDesigner and its usage is now available at https://www.youtube.com/watch?v=mChQFuQqX3k
https://pydesigner.readthedocs.io/en/latest/
Other
22 stars 7 forks source link

Fitting before DKI #266

Closed surendra116083 closed 2 years ago

surendra116083 commented 2 years ago

Hello PyDesigner Developers,image Happy Thanksgiving. I have a small issue. There are signal void areas in the corpus callosum in the Mean Kurtosis map obtained from DIPY.

The data is PCA denoised, Gibbs' artifact removed, eddy-corrected, normalized, nonlocal mean filtered, and patch2self filtered in DIPY. I will really appreciate outlier detection and removal from PyDesigner. Would you please guide me through how to do this?

Also, I am interested in the iterative least-squares fitting of the data.

Many Thanks, Suren

TheJaeger commented 2 years ago

Hi Suren,

My recommendation would be to run the PyDesigner pipeline with standard preprocessing in its entirety to ensure optimal results. This would include the preprocessing and extraction of DTI/DKI parameters in the order:

  1. MP-PCA Denoising
  2. Gibbs unringing
  3. Eddy current correction, motion correction, EPI distortion correction, and outlier replacement
  4. Brain masking
  5. Smoothing
  6. Rician correction
  7. IRLLS outlier detection
  8. Constrained tensor fitting (K > 0)
  9. AKC tensor correction
  10. DTI/DKI/WMTI parameter extraction

You would do this on the raw DKI data, and is as simple as parsing the -s or --standard flag to PyDesigner. You input argument would then be

pydesigner -s --verbose -o [PATH TO OUTPUT DIRECTORY] [PATH TO INPUT DWI]

However, if this undesired and you'd like to stick to your preprocessed DWI, you may parse it into PyDesigner without any flags. This would change the above argument to

pydesigner -o [PATH TO OUTPUT DIRECTORY] [PATH TO INPUT DWI]

Doing so will bypass all preprocessing steps and advance to tensor fitting.

On the topic of iterative reweighted linear least-squares (IRLLS) fitting, we use it ONLY for outlier detection. The actual tensor fitting is performed with a constrained weighted linear least-squares (WLLS). There is currently no way to switch between fitting algorithms. The only two fitting options are either constrained fitting (uses LLS), or unconstrained (used Moore-Penrose inverse matrix), where both are WLS methods.

EDIT: Correct me if I'm wrong but this seems like this is non-human brain, so some preprocessing steps will not work. I'd advice going with the latter option where you use your own preprocessed DWI. Our paper PyDesigner: A Pythonic Implementation of the DESIGNER Pipeline for Diffusion Tensor and Diffusional Kurtosis Imaging details a comparison between some popular DKI programs, where issues with fitting in CC are shown. PyDesigner could help you in rectifying the fitting errors you noticed in your image.

surendra116083 commented 2 years ago

Hello @TheJaeger ,

Thank you very much for your detail response. I really appreciate this. Just one quick question, how can I possibly remove susceptibility distortion if I don’t have T1 weighted image (for registration) and also reverse phase encoding gradient images. In other words, I only have single direction diffusion MRI data.

I am waiting for your favourable response.

Many Thanks, Suren

TheJaeger commented 2 years ago

You can generate a synthetic undistorted B0 using the tool Synb0-DISCO provided that you have an anatomical T1. This would be the only option if you don't have a reverse phase encoded image. However, since you don't have both, I'm afraid there is no way to correct susceptibility induced distortion.

surendra116083 commented 2 years ago

Hello @TheJaeger ,

Thank you very much for your prompt response. I have anatomical T2WI and DWI data. Is it possible to use topup for distortion correction using DWI and T2WI (in place of reverse PE b0 image)? Then, is it to use topup_coef map for eddy?

I am waiting for your favorable response.

Many Thanks, Suren

TheJaeger commented 2 years ago

I don't think there is any other way, as far as I know. You may reach out to the developers of Synb0-DISCO to see if they have any idea or if T1 could be inverted for their program.