BIDS Validation Error

466 views
Skip to first unread message

David Shin

unread,
Aug 9, 2017, 2:30:52 PM8/9/17
to bids-discussion
I have written a wrapper script that takes an exam folder (e.g. e700) from GE 3T system (MR750, DV25) and converts it into a bids compatible dataset. 

At the core, I am just invoking 'dcm2niix' with the BIDS sidecar option, making sure that the file name meets the BIDS Specification requirements.

I am getting an error when I run the CLI-based bids validator on the converted dataset (see screenshot below):

 



The error states that 'TaskName' must be defined but the functional image files already have the _task key/value pair defined as part of the file name. Any ideas?

Also, I am surprised that the dcm2niix script (compiled from commit #23805db) does not generate the slice timing info (shown as a warning above) exported to the json file. Any GE scanner users having the same issue? Are you putting these in manually?

Thanks!

Chris Gorgolewski

unread,
Aug 9, 2017, 2:44:40 PM8/9/17
to bids-discussion
Hi,

The TaskName refers to a field in the JSON file rather than a filename key/value. It seems that the relevant JSON files are not placed or named correctly. Could you share the full directory structure of this dataset? The 'tree' command on linux is handy for doing this.

Best,
Chris

--
You received this message because you are subscribed to the Google Groups "bids-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bids-discussion+unsubscribe@googlegroups.com.
To post to this group, send email to bids-discussion@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bids-discussion/470ddb6f-faa8-4cd0-a48d-88c9da5f4ce2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

David Shin

unread,
Aug 9, 2017, 2:54:49 PM8/9/17
to bids-discussion
Hi Chris,

I see... Good to know.

Please see below for the full directory structure:


The contents of one of the functional JSON files are shown below:



Thanks!

David


On Wednesday, August 9, 2017 at 11:44:40 AM UTC-7, Chris Gorgolewski wrote:
Hi,

The TaskName refers to a field in the JSON file rather than a filename key/value. Could you share the full directory structure of this dataset? The 'tree' command on linux is handy for doing this.

Best,
Chris

On Wed, Aug 9, 2017 at 11:30 AM, David Shin <david...@gmail.com> wrote:
I have written a wrapper script that takes an exam folder (e.g. e700) from GE 3T system (MR750, DV25) and converts it into a bids compatible dataset. 

At the core, I am just invoking 'dcm2niix' with the BIDS sidecar option, making sure that the file name meets the BIDS Specification requirements.

I am getting an error when I run the CLI-based bids validator on the converted dataset (see screenshot below):

 



The error states that 'TaskName' must be defined but the functional image files already have the _task key/value pair defined as part of the file name. Any ideas?

Also, I am surprised that the dcm2niix script (compiled from commit #23805db) does not generate the slice timing info (shown as a warning above) exported to the json file. Any GE scanner users having the same issue? Are you putting these in manually?

Thanks!

--
You received this message because you are subscribed to the Google Groups "bids-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bids-discussi...@googlegroups.com.
To post to this group, send email to bids-di...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to bids-discussi...@googlegroups.com.
To post to this group, send email to bids-di...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to bids-discussi...@googlegroups.com.
To post to this group, send email to bids-di...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to bids-discussi...@googlegroups.com.
To post to this group, send email to bids-di...@googlegroups.com.

Chris Gorgolewski

unread,
Aug 9, 2017, 2:59:00 PM8/9/17
to bids-discussion
Hi,

As you can see the JSON file is missing "TaskName" and "SliceTiming" fields which explains the error and the warning. Here are the field definitions from the spec:

TaskName: Name of the task. No two tasks should have the same name. Task label (“task-<task_label>”) included in the file name is derived from this field by removing all non alphanumeric ([a-zA-Z0-9]) characters. For example task name “faces n-back” will corresponds to task
label “facesnback”. An optional but recommended convention is to name resting state task using labels beginning with "rest".

SliceTiming: The time at which each slice was acquired during the acquisition. Slice timing is not slice order - it describes the time (sec) of each slice acquisition in relation to the beginning of volume acquisition. It is described using a list of times (in JSON format) referring to the acquisition time for each slice. The list goes through slices along the slice axis in the slice encoding dimension (see below). This parameter is required for sparse sequences.​ In addition without this parameter slice time correction will not be possible.

Best,
Chris

To unsubscribe from this group and stop receiving emails from it, send an email to bids-discussion+unsubscribe@googlegroups.com.
To post to this group, send email to bids-discussion@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bids-discussion/773ef4e3-6675-4cc4-8f96-a31938343fca%40googlegroups.com.

David Shin

unread,
Aug 9, 2017, 3:06:59 PM8/9/17
to bids-di...@googlegroups.com
I am using a GE product EPI sequence for the fMRI tasks. For the Slice Timing field, do you have a script that automates this, i.e parsing the info from the dicom header? Thanks.

--
You received this message because you are subscribed to a topic in the Google Groups "bids-discussion" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/bids-discussion/-yG3NjFHwEw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to bids-discussion+unsubscribe@googlegroups.com.

To post to this group, send email to bids-discussion@googlegroups.com.

Chris Gorgolewski

unread,
Aug 9, 2017, 3:16:55 PM8/9/17
to bids-discussion
I unfortunately do not, but maybe someone else on this list can help.

Best,
Chris

On Aug 9, 2017 12:06 PM, "David Shin" <david...@gmail.com> wrote:
I am using a GE product EPI sequence for the fMRI tasks. For the Slice Timing field, do you have a script that automates this, i.e parsing the info from the dicom header? Thanks.

David Shin

unread,
Aug 9, 2017, 3:22:14 PM8/9/17
to bids-di...@googlegroups.com
Okay, if nothing is out there, I can work on a version that I can share.

Out of curiosity, how are you dealing with this issue for OpenfMRI data from GE systems? Is the slice timing info hard coded into the JSON file?

Chris Gorgolewski

unread,
Aug 9, 2017, 4:02:18 PM8/9/17
to bids-discussion
On Wed, Aug 9, 2017 at 12:21 PM, David Shin <david...@gmail.com> wrote:
Okay, if nothing is out there, I can work on a version that I can share.

Out of curiosity, how are you dealing with this issue for OpenfMRI data from GE systems? Is the slice timing info hard coded into the JSON file?
OpenfMRI only accepts BIDS datasets instead of DICOM files (this reduces chances of accidental sharing of sensitive information and puts data producers in charge of providing meta-data).

It might be worth talking to scanner physicists at your institution to figure out what slice timing was prescribed for your sequence.

Best,
Chris 

Xiangrui Li

unread,
Aug 9, 2017, 5:41:47 PM8/9/17
to bids-di...@googlegroups.com
If you use Matlab, my NIfTI converter should extract slice timing from GE dicom files. Otherwise you can extract RTIA_timer (0021,105E) from GE dicom, but the NIfTI slice timing is in the order of slices in the image, so you will need to reverse it in case slices are flipped during NIfTI conversion. Hope this helps.
_____________

Xiangrui Li, Ph.D.

Center for Cognitive and Behavioral Brain Imaging

The Ohio State University

David Shin

unread,
Aug 9, 2017, 6:01:30 PM8/9/17
to bids-di...@googlegroups.com
Hi Xiangrui,

Awesome, thank you for your feedback.

I actually had your NifTI converter from MATLAB File Exchange on my development machine. Will start using it. 

David

On Wed, Aug 9, 2017 at 2:41 PM, Xiangrui Li <li....@osu.edu> wrote:
If you use Matlab, my NIfTI converter should extract slice timing from GE dicom files. Otherwise you can extract RTIA_timer (0021,105E) from GE dicom, but the NIfTI slice timing is in the order of slices in the image, so you will need to reverse it in case slices are flipped during NIfTI conversion. Hope this helps.
_____________

Xiangrui Li, Ph.D.

Center for Cognitive and Behavioral Brain Imaging

The Ohio State University

 
From: David Shin
Date: 2017-08-09 15:06
Subject: Re: [bids-discussion] BIDS Validation Error
I am using a GE product EPI sequence for the fMRI tasks. For the Slice Timing field, do you have a script that automates this, i.e parsing the info from the dicom header? Thanks.

--
You received this message because you are subscribed to a topic in the Google Groups "bids-discussion" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/bids-discussion/-yG3NjFHwEw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to bids-discussion+unsubscribe@googlegroups.com.
To post to this group, send email to bids-discussion@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


---
David D. Shin, Ph.D.
Center for Functional MRI
University of California, San Diego
E: dds...@ucsd.edu
P: (858) 822-0533
F: (858) 822-0605
http://fmri.ucsd.edu

On Wed, Aug 9, 2017 at 2:41 PM, Xiangrui Li <li....@osu.edu> wrote:
If you use Matlab, my NIfTI converter should extract slice timing from GE dicom files. Otherwise you can extract RTIA_timer (0021,105E) from GE dicom, but the NIfTI slice timing is in the order of slices in the image, so you will need to reverse it in case slices are flipped during NIfTI conversion. Hope this helps.
_____________

Xiangrui Li, Ph.D.

Center for Cognitive and Behavioral Brain Imaging

The Ohio State University

 
From: David Shin
Date: 2017-08-09 15:06
Subject: Re: [bids-discussion] BIDS Validation Error
I am using a GE product EPI sequence for the fMRI tasks. For the Slice Timing field, do you have a script that automates this, i.e parsing the info from the dicom header? Thanks.

--
You received this message because you are subscribed to a topic in the Google Groups "bids-discussion" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/bids-discussion/-yG3NjFHwEw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to bids-discussion+unsubscribe@googlegroups.com.
To post to this group, send email to bids-discussion@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages