Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calculate B1map and MPM maps without SPM environment #106

Open
franciscofritz opened this issue Oct 6, 2024 · 4 comments
Open

Calculate B1map and MPM maps without SPM environment #106

franciscofritz opened this issue Oct 6, 2024 · 4 comments

Comments

@franciscofritz
Copy link

I would like to ask if it is a way to calculate the B1map (using the EPI method) and the MPM maps without using neither the SPM batch or SPM batch-derived script. Or, in other words, if there are specific .m functions from the hMRI toolbox that can be called and/or modified in a different script, either in Matlab or Python, without using the SPM job file approach.

We are currently analysing quite a big dataset which has been standarised using BIDS-conform approach (with bidscoin software). However, we are finding a lot of problems with the nifti outpus, either the problem comes from the metadata (which it is sorted out in the last release) or the hard-coded B1map calculation (e.g. expecting the data to be loaded as a pair SE-STE per angle or being single 3D volumes instead of two 4D volumes with SE and STE data, the mixing time not defined as the difference between the two echo times, etc). And we need to iterate for several subjects, sessions and runs, which makes these problems difficult to deal one by one.

@lukeje
Copy link
Member

lukeje commented Oct 6, 2024

No, the B1 mapping is all written within the SPM job manager environment: https://github.com/hMRI-group/hMRI-toolbox/blob/master/hmri_create_b1map.m

However all your problems sound like they are due to malformed BIDS. If you get your BIDS sidecar right (and follow the hints here), everything should work out of the box.

Edit: Also note that 3D NIfTIs for 3D-EPI SE/STE is specified precisely in the qMRI BIDS format.

@Barisevrenugur
Copy link
Contributor

Barisevrenugur commented Oct 7, 2024

being single 3D volumes instead of two 4D volumes with SE and STE data,

you can input your data from 4D volumes without a problem: please simply choose the corresponding Frame in the batch (by default it is set to 1 for 3d volumes)

you might also wanna check which version of SPM/hmri-toolbox you are using, very early versions of SPM may not have the option available for working with 4D niftis but all recent version have this option (e.g. SPM12)

@lukeje
Copy link
Member

lukeje commented Oct 7, 2024

@Barisevrenugur That doesn't work for qMRI BIDS 3D EPI SE/STE, as the echo times and flip angles must be provided in the sidecar file for each individual volume.

@Barisevrenugur
Copy link
Contributor

@lukeje you are right, then it cannot read the metadata...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants