brainlife / ezbids

A web service for semi-automated conversion of raw imaging data to BIDS

Home Page:https://brainlife.io/ezbids

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problem with PhaseEncodingDirection

joebathelt opened this issue · comments

Thank you for proving this excellent software. It was so much easier to use than all of the command line tools that I used before.

Unfortunately, I ran into an unexpected error. I tried out ezBIDS with some DWI data acquired on a Philips scanner. The conversion works fine and the BIDS validator did not indicate any warnings. However, there is an issue when I'm trying to run QSIPrep on it. QSIPrep crashes when it is trying to read the acquisition parameters from the JSON file. QSIPrep expects an entry called "PhaseEncondingDirection", which does not seem to exist. There is only an entry "InPlanPhaseEncodingDirectionDICOM".

How can I correct this when converting DWI data?

Thank you in advance for your help!

The conversion works fine and the BIDS validator did not indicate any warnings. However, there is an issue when I'm trying to run QSIPrep on it.

For DWI acquisitions, PhaseEncodingDirection is only a recommended field, which is why the validator didn't complain.

Thank you, @dlevitas. I'm acquiring HCP-style diffusion and resting-state data with two runs that differ in encoding direction. It would be super helpful to have 'PhaseEncodingDirection' as an optional field in the ezBIDS interfaces.

@joebathelt I've added this functionality, information regarding it can be found in the ezBIDS documentation (point 3: "Adding metadata information").

A couple of things to note:
1). In BIDS, the PhaseEncodingDireciton can only have one of six possible values: i, i-, j, j-, k, k-. ezBIDS thus limits you to these options. Information pertaining to how to determine this information without dcm2niix support can be found here.

2). Once this metadata has been added, you'll want to specify the direction (dir) entity label for the corresponding sequence. Information on this is here..

3). The dir entity label can be a little tricky, but all you really need is the sequence's orientation and the PhaseEncodingDirectionmetadata value ( ezBIDS tries to ascertain the orientation and display it on the page). Using something like this function (with those two values) gives you the dir value. In your situation, ezBIDS didn't have the relevant information to determine dir for you.

I apologize if you're already aware of this. I don't often encounter Philips data, so adding missing metadata can be a bit of a hassle.

Let me know if you have questions or problems.