Slice timing question

I need to provide slice acquisition times in order to do slice timing correction but I don’t know where to find these… Our protocol says we’re doing “Interleaved” but outside of that, I don’t know the order. When I open the BOLD scans in mricron the slice timing information is unavailable.

I tried following the SPM method of finding slice times (https://en.wikibooks.org/wiki/SPM/Slice_Timing#Siemens_scanners) but our dicom files are spit out with names like “1.3.12.2.11.345213535” and I have no way of knowing which ones are the bold scans…

I tried to do the calculations by hand according to their instructions but I don’t understand the “dummy scans”. They say " Dummy scans = ROUNDUP(3001/TR), and is enabled depending on the TR: if there is only one volume in the sequence, there is no dummy scan; if 1501 < TR <= 1001ms: 3 dummy scans; 3001 < TR <= 1501ms: 2 dummy scans; else if TR < = 3001ms: 1 dummy scan". I don’t see how a TR can be more than 1501 but less than 1001… I also don’t understand if these “dummy scans” are included in the .nii files at all or if I can just leave it out.

From the protocol sheet, I see my F>>H and I have an even number of slices. This leads me to believe my slice order would be “2 4 1 3” but I don’t know how this works with multiband. The multi-band accel. factor is 8…

We have a script that unpacks them into .nii format but I can’t seem to find a way to get slice timing data from .nii files. Does anyone know of a way? I’ve included a snapshat of our protocol. Any help is appreciated!

I believe if you use dcm2niix (https://github.com/rordenlab/dcm2niix) to unpack your dicom files, you will get .json files populated with descriptive information about your scan sequences, including slice times.

1 Like

It did print out a .json, thanks!! I do have another question though…

When attempting to use bidsify, I have a slight problem and was hoping there may be a solution. My dicom names are spit out with no identifiable characteristics… When dcm2niix converts them to Nifti, it names them appropriately with identifiers. Is there a pre-made script that is capable of converting ambiguously named dicoms into BIDs using the header info? Or is there a script that converts nifti into BIDs based off identifiers?

Dcm2Bids seems plausible but I don’t fully understand how to set up the configuration file. It seems that “dataType” organizes the output into the ‘anat’ and ‘func’ folders, “modalityLabel” is the BIDs label, but I’m unsure how to fill out the “criteria” so it will sort my files based off identifying markers.

Hi @Justin_Smith1, have you encountered HeuDiConv? It allows you to write a relatively small amount of code to bulk convert DICOMs to BIDS datasets. If your data is collected according to the ReproIn specifications, it can be done with no configuration at all.

2 Likes

This is exactly what I needed, thank you!!

It might be more a python-coding question
I use dcm2niix and get “SliceTiming” in json file, next I like to use it in A preprocessing workflow for Siemens resting state data.
https://nipype.readthedocs.io/en/latest/users/examples/rsfmri_vol_surface_preprocessing.html

I like my script to read slice_times from the .json of each subject. If you can help me with the coding it can be great!

Hi @tali.weiss. If you’re using PyBIDS, you can retrieve the BOLD metadata with:

import bids
layout = bids.BIDSLayout("/path/to/dataset")
bold_files = layout.get(suffix="bold", extension=[".nii", ".nii.gz"])
for bold_file in bold_files:
    metadata = bold_file.get_metadata()
    slice_timing = metadata["SliceTiming"]