BrkRaw / brkraw

BrkRaw: A comprehensive tool to access raw Bruker Biospin MRI data
https://brkraw.github.io
GNU General Public License v3.0
42 stars 28 forks source link

DTI conversion #75

Open araikes opened 2 years ago

araikes commented 2 years ago

Describe the bug Using the current github version of brkraw, I'm able to convert all of my PV360.2 data (after a bit of manipulation to some files to fix the acquisition name for the DTI sequence). However, my diffusion data do not have the correct b-vector ordering. Currently, the b-vectors are being obtained from the method file and the $PVDwGradVec key. This orders the vectors in read/phase/slice order. However, we are applying left-to-right gradients, so my data are actually ordered phase/read/slice. The JSON confirms that the phase encoding direction is i- and slice is k-

It would be beneficial to determine the read/phase/slice ordering of the data and then use the individual PVDwGrad<Read/Phase/Slice> keys to correctly build the b-vectors.

Can happily supply a dataset if needed.

dvm-shlee commented 2 years ago

@araikes Sorry for the delayed response, I could help it to be a more seamless process in brkraw. but unfortunately, I'm not that familiar on how the gradient vectors need to be processed according to the reconstructed image yet, so it would be really helpful for me if you could provide some logic on what would be the best way to generalize the method to build b-vectors?

So is it helpful that I swap the axis based on the order of vector presented in phase encoding direction?

dvm-shlee commented 2 years ago

@araikes Hi, I just found that 'PVM_SPackArrGradOrient' might be useful to determine the orientation of the gradient? So do you think it is useful to re-order the bvec and determine their sign according to this information?

@gdevenyi any suggestion?

gdevenyi commented 2 years ago

@gdevenyi any suggestion?

Unfortunately, I don't have any experience in DTI/DWI, so I can't offer help here.

araikes commented 2 years ago

Hi @dvm-shlee,

I definitely think that using the SPackArrGradOrient likely makes sense. Read direction is usually in the head-foot direction. Using the gradient table as it is currently written automatically writes it in read-phase-slice irrespective of which axes are which.

I'll gather up a clear example on Monday and get back you.

gdevenyi commented 2 years ago

Following up here on if you managed to construct an example?

araikes commented 2 years ago

Sorry... This dropped off my radar.. I'll try and get one put together.