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

[ENH] add BIDS column to table in README #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Remi-Gau
Copy link

@Remi-Gau Remi-Gau commented Mar 7, 2022

I need to cross check a couple of things but this could be what an update of the table in the README could look like for where to find the relevant info in a BIDS dataset.

I got this demo script that uses bids.matlab to query a dataset and get the relevant info. Let me know if that could be of interest.

clear;
clc;

path_to_bids_dataset = FIXME

PartialFourierInSlice = 6 / 8;
EchoSpacing = 0.0072;

subLabel = '01'

BIDS = bids.layout(path_to_bids_dataset, 'use_schema', false);

uniT1 = bids.query(BIDS, 'data', 'suffix', 'UNIT1');
metadata_inv1 = bids.query(BIDS, 'metadata', 'sub', subLabel, 'suffix', 'MP2RAGE', 'inv', 1);
metadata_inv2 = bids.query(BIDS, 'metadata', 'sub', subLabel, 'suffix', 'MP2RAGE', 'inv', 2);

hdr = spm_vol(uniT1);

estimateT1.UNI = uniT1;
estimateT1.B0 = metadata_inv1.MagneticFieldStrength;
estimateT1.TR = metadata_inv1.RepetitionTimePreparation;
estimateT1.EchoSpacing = EchoSpacing;                              % "hard coded" :-(
estimateT1.TI = [metadata_inv1.InversionTime, metadata_inv2.InversionTime];
estimateT1.FA = [metadata_inv1.FlipAngle metadata_inv2.FlipAngle];
estimateT1.nrSlices = hdr{1}.dim(1); % Not ideal
estimateT1.PartialFourierInSlice = PartialFourierInSlice;          % "hard coded" :-(
estimateT1.FatSat = 'yes';                                         % "hard coded" :-(
estimateT1.outputT1.prefix = 'qT1_';
estimateT1.outputR1.prefix = 'qR1_';

matlabbatch{1}.spm.tools.mp2rage.estimateT1 = estimateT1;

@Remi-Gau Remi-Gau marked this pull request as ready for review July 23, 2023 10:17
@Remi-Gau Remi-Gau changed the title [WIP][ENH] add BIDS column to table in README [ENH] add BIDS column to table in README Jul 23, 2023
@benoitberanger
Copy link
Owner

UNI image : appears in ImageType
EchoSpacing : RepetitionTimeExcitation
PartialFourierInSlice : not sure which is reported by the JSON : Slice or Phase ?

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

Successfully merging this pull request may close these issues.

2 participants