QMICodeBase / TORTOISEV4

Official TORTOISE Diffusion MRI Processing Pipeline V4 Source Code and Documentation
GNU General Public License v3.0
18 stars 4 forks source link

How to re-compute BMatrix TORTOISE automatically generates after importing and/or DIFFPREP the images? #1

Closed cepa995 closed 1 year ago

cepa995 commented 1 year ago

Hi!

First of all, let me acknowledge the great work you did for putting up such a tool! Really appreciate it!

Could you please point me to the part of the code where you create .bmtxt file? I am interested in computations that are going on under the hood, because I would like to combine TORTOISE with some other tools, but in order to do that I need to know how BMatrix file is being computed (e.g. after ImportDICOM how do you generate .bmtxt file?)

Specifically, I would like to SPLIT 4D image after distortion correction (DRBUDDI) and store each 3D volume inside a folder named after it's new GRADIENT DIRECTION.

Thanks, Stefan

eurotomania commented 1 year ago

Hello Stefan,

The relevant files to you would be in TORTOISEV4/src/tools/ORTOISEBmatrixToFSLBVecs folder. Especially, in the file fsl_bvecs_tortoise_bmatrix.cxx , the lines 56-74.

But also I should mention that this is when bvecs/bvals are available. Some scanner systems, like Bruker, some newer versions of clinical systems directly output the Bmatrices, which also consider the effects of imaging gradients. In those case, we extract the Bmatrices from the DICOMs and directly use them. Such Bmatrices would not have a direct (or single) bvecs/bvals pairs as they would have more than one (generally two: one for diffusion one for imaging gradients) non-zero eigenvalues.

hope this helps.

On Wed, Jan 25, 2023 at 1:35 AM Stefan Milorad Radonjić < @.***> wrote:

Hi!

First of all, let me acknowledge the great work you did for putting up such a tool! Really appreciate it!

Could you please point me to the part of the code where you create .bmtxt file? I am interested in computations that are going on under the hood, because I would like to combine TORTOISE with some other tools, but in order to do that I need to know how BMatrix file is being computed (e.g. after ImportDICOM how do you generate .bmtxt file?)

Specifically, I would like to SPLIT 4D image after distortion correction (DRBUDDI) and store each 3D volume inside a folder named after it's new GRADIENT DIRECTION.

— Reply to this email directly, view it on GitHub https://github.com/eurotomania/TORTOISEV4/issues/1, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEFQZWCBJLEAXRUYZGF7TD3WUDCTXANCNFSM6AAAAAAUF6ITAE . You are receiving this because you are subscribed to this thread.Message ID: @.***>

-- M. Okan Irfanoglu Graduate Student & GTA Computer Sciences & Engineering Ohio State University

cepa995 commented 1 year ago

Awesome! I will look into it and report back!

Thank you so much for fast reply.

Another question, related to solving my initial one I guess, is it possible to perform "SLICE-WISE" DISTORTION CORRECTION?

For example: could I supply 3D volume instead of 4D image, where this 3D volume is NIFTI image with particular gradient direction? Or do I have to construct 4D image and then de-construct it back to 3D volumes?

Thanks

eurotomania commented 1 year ago

No the code is not setup to do slice-wise EPi distortion correction. Sorry.

On Wed, Jan 25, 2023 at 12:58 PM Stefan Milorad Radonjić < @.***> wrote:

Awesome! I will look into it and report back!

Thank you so much for fast reply.

Another question, related to solving my initial one I guess, is it possible to perform "SLICE-WISE" DISTORTION CORRECTION?

For example: could I supply 3D volume instead of 4D image, where this 3D volume is NIFTI image with particular gradient direction? Or do I have to construct 4D image and then de-construct it back to 3D volumes?

Thanks

— Reply to this email directly, view it on GitHub https://github.com/eurotomania/TORTOISEV4/issues/1#issuecomment-1404015047, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEFQZWAORNLJVUH5NZX72KDWUFSU3ANCNFSM6AAAAAAUF6ITAE . You are receiving this because you commented.Message ID: @.***>

-- M. Okan Irfanoglu Graduate Student & GTA Computer Sciences & Engineering Ohio State University

cepa995 commented 1 year ago

Oh, okay.

Thank you so much for your help!

I am currently trying to replicate this code in Python, so I think we can close this issue.

Thanks!