GithubHelp home page GithubHelp logo

output diffusion gradients about brkraw HOT 12 CLOSED

brkraw avatar brkraw commented on June 14, 2024
output diffusion gradients

from brkraw.

Comments (12)

lconcha avatar lconcha commented on June 14, 2024 1

You are fast! Thanks for the patch.

It seems to be working properly, even for multi-shell acquisitions.
Of note, Bruker stores gradient directions without normalizing the vectors, with those corresponding to maximum bvalue having a norm=1, and the others gradient vectors scaled according to b value. brkraw outputs the bvecs and bvals according to this style. Not all dMRI software likes this convention, so the user may need to normalize the gradient vectors.

I have compared the gradient directions that are obtained through brkraw and mrtrix (using mrinfo -bvalue_scaling false -export_grad_mrtrix (see here) from the same data set. Note that the gradient vectors are normalized in the mrtrix output, and not in brkraw (this is not a bug, I'm just pointing it out). Also note that the z gradient sign appears flipped between the two (this one I need to run more tests on different acquisiton orientations).

So, in general, your implementation seems to do the job, and I thank you for it!

Screenshot from 2020-06-03 10-37-32

from brkraw.

lconcha avatar lconcha commented on June 14, 2024 1

Thanks for the patches. Seems to be working now.
Regarding gradient vector sign, I cannot get dcm2niix to output gradients from bruker dicoms, so I have not been able to compare the two. I do not have much access to the scanner these days (covid), but will try to run some simple tests to figure out which version is the one that reflects the user-specified gradients.

Just a note on the new patch: the converted .nii.gz gets placed in the specified output folder, but the .bvec .bvec and .bmat files are written to the current working directory.

Thanks again for all your help.

from brkraw.

dvm-shlee avatar dvm-shlee commented on June 14, 2024

@lconcha
Yes, it can output the gradient direction, just I had not activated it for other functions

from version 0.3.3rc8, the gradient direction files will be generated as default.
It will work only the sequence contains 'dti' (without case sensitive) in their Method filed in method parameter file.

Not sure the generated file is the correct form that you can employ the analysis directly,
If you have any issue, please let me know, I will make a quick update for that.

Thank you!

from brkraw.

dvm-shlee avatar dvm-shlee commented on June 14, 2024

@lconcha Thank you for your feedback and providing useful information. If the normalization function would be preferred, I could also integrate it so please let me know.

Regarding the Z direction, since the data from BrkRaw just extract raw value from raw data without conversion, there would be some facter that MRtrix conver it intentionally. so hope to ask if you could share raw data (at least method and visu_pars without 2dseq) of the data you present. That would be great help to figure out to resolve this issue!

Thank you!

from brkraw.

dvm-shlee avatar dvm-shlee commented on June 14, 2024

@lconcha Thank you for sharing the data, but I couldn't found any clue from here what can cause the inverse-sign at the Z axis.

The only difference with my usual setting will be the animal position is Head_Prone instead of Head_Supine. but according to this document. It seems the bvec that I parsed from PVM_DwGradVec no need to correct the position.

And also there was some discussion on here regarding the invert sign issue you shown. But ended up with no answer.

Since I'm not familiar with DTI image, could you provide later which signed direction gives correct DTI measurement (mrtrix vs brkraw) if it can be figured out from the result?
According to the github link above, If you get bvec after Dicom conversion, it may relate that. but not sure. :(

BTW, I found that there is some bug on the conversion of reconstructed DTI, I will figure out the solution and patch it once I figure out.

Again, Thank you for sharing the data!

from brkraw.

eugenegkim avatar eugenegkim commented on June 14, 2024

@dvm-shlee Does bids_convert have an option to write out the bvec and bval files?

from brkraw.

dvm-shlee avatar dvm-shlee commented on June 14, 2024

@eugenegkim there is no option, it just outputs bvec and bval files always if the data is DTI.
(in the condition that 'Method' parameter in method contains string 'dti')
But I can consider putting some options if you think its better than just outputting always.

Thanks!

from brkraw.

eugenegkim avatar eugenegkim commented on June 14, 2024

@dvm-shlee I've found that bvec and bval files are written if the modality for the DTI scan is set to 'dwi' in the BIDS datasheet. But the modality was initially blank after running bids_helper. So maybe bids_helper can be updated to set the modality of all DTI scans to 'dwi'? And I would say that it's fine to always output the bvec and bval files.

Oh and BIDS wants the bvecs in 3 rows. They are currently written out in 3 columns.

from brkraw.

dvm-shlee avatar dvm-shlee commented on June 14, 2024

@eugenegkim The BIDS helper documents are not related to the bvec and bval conversion, its internally check the parameter file. but I can make default value for DTI to have dwi.

Also, I will correct output of bvec to have 3 rows instead of 3 columns,
thank you for your suggestion and for reporting the issue!

from brkraw.

dvm-shlee avatar dvm-shlee commented on June 14, 2024

@eugenegkim The bvec now has 3 rows and DTI will have default modality as dwi on BIDS excel sheet
Please let me know if you still have any issues. (from 0.3.3)

@lconcha
After release the version 0.3.3, I realized that 'tonii' option does not generate automatically gradient direction in case no scan id provided. This has been pached on the github. In case you need this function, please install the brkraw through github.

Thanks!

from brkraw.

eugenegkim avatar eugenegkim commented on June 14, 2024

@dvm-shlee Thanks for your quick responses!

from brkraw.

dvm-shlee avatar dvm-shlee commented on June 14, 2024

@lconcha Thank you for report additional bug. I will check and make a patch for it!

from brkraw.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.