Dear AFNI experts,
Due to some software issue of the MRI machine, our time slicing data was lost in the original DICOM files. I know the slice scan order is alt+z = altplus = alternating in the plus direction. So I got the time info by calculating the slice creation time. I want to add this info to the Nifti files. Is it possible? Anyone encounter this issue before? I am trying to do this by Python.
The data were acquired on a whole-body Philips 3.0T Acheva TX.
Thank you. I tried
3dTcat -prefix test -tpattern altplus S004.nii
But the time is still 0 for all slices. I saw 3drefit in the help text of 3dTcat. Is that the one you recommend? 3drefit -Tslices a b c d …
You’ll need to use backquotes to expand what’s in the 1D file.
** If you have the slice time offsets stored in a text file
as a list of values, then you can input these values on
the command line using the Unix backquote operator, as in
-Tslices `cat SliceTimes.1D`
Ok - so a few things going on… The dataset has 45 slices and 200 TRs, with a TR of 2.5s. So the test45.1D file you uploaded has the correct number of slices but is just in an ascending format (seqplus). The test.1D file has far too much data in it for what is represented in the dataset. It also looks to be ascending (instead of alt+z) and just repeated over and over again.
Since you said in the first post that your data was in alt+z/altplus, I ran 3dTcat on it with the -tpattern option I get the corrected dataset. Details below!
And yes, that should work just fine. Except that it looks like the text file (test45.1D) isn’t representing the altplus/alt+z timing information. Instead it just goes from slice 1 to slice 45 in an ascending way.
So if the data is actually ascending you could use -tpattern seqplus. If it’s supposed to be altplus or alt+z then you should use that information or a text file that appropriately represents it.
The @t is the TR time, e.g. index * TR.
To view the slice timing info, you can use 3dinfo -VERB.
Actually I am following the Slice Timing Correction tutorial here: https://www.youtube.com/watch?v=V0aDOnIajcQ&ab_channel=AndrewJahn
According to the video, the @t is suppose to be different among slices. But now in the graph, it’s 0 everywhere. Is there any place I could check time slicing on AFNI image?
But when open in AFNI graph. For the sagittal and coronal slices, in the first volumn, @t is supposed to be same as the slicing time. I need to do a time slicing correction to it then @t is corrected to be 0. Right? https://i.ibb.co/QdmDcV8/Screen-Shot-2021-07-12-at-1-23-26-PM.png
It looks like there is confusion in the AFNI header in this case, we will have to review it.
But after running 3dTcat to create a NIFTI dataset, remove the old extension.
Yes, the NIFTI header extension (separate from the AFNI info) seems to be throwing off the AFNI viewer. Once you remove the header you should be able to see the slice timing in the graph view of AFNI like Andy demonstrates.
The vox_offset is the number of bytes into the .nii file that the voxel data starts at.
In the no-extension case, the offset is 352, which is the size of the nifti header structure.
Originally, the offset also included space for the AFNI extension.
The vox_offset has no impact on anything, except to tell the NIFTI library where the data begins.
The
National Institute of Mental Health (NIMH) is part of the National Institutes of
Health (NIH), a component of the U.S. Department of Health and Human
Services.