Diffusion MRI bvec file polarity change by Python

Introduction

The polarity of bvec, which is an important MPG Gradient Table in diffusion MRI, is not compatible with MRI equipment and analysis software. Since there are more than 200 subjects, it is difficult to modify each one. Therefore, I created a script that can arbitrarily change the polarity in the bvec file in Python. Isn't there a command to modify the polarity of bvec in FSL or MRtrix?

For detailed explanation and code, see Diffusion MRI bvec file polarity change by Python.

Recommended Posts

Diffusion MRI bvec file polarity change by Python
Read the file line by line in Python
Read the file line by line in Python
Read line by line from a file with Python
Command execution triggered by file update (python edition)
Script python file
Python file processing
python> Change file owner> os.chown ("path / to / file", uid, gid)
Read the xml file by referring to the Python tutorial
[Python] Change standard input from keyboard to text file
[Work efficiency] How to change file names in Python
Speech file recognition by Google Speech API v2 using Python