vistalab / vistasoft

VISTASOFT is the main software repository of the VISTA lab at Stanford University.
http://vistalab.stanford.edu
148 stars 142 forks source link

Add functions enabling .tck export compatible with MRTrix3 MRView #343

Open htakemur opened 4 years ago

htakemur commented 4 years ago

Overview of the problem

Original version of code (dtiExportFibersMrtrix.m) was written on the basis of older version of MRTrix 0.2. Therefore, exported .tck file is not compatible with MRTrix3's MRView.

Proposed solution at this point We figured out that header information of .tck file is not identical between MRTrix 0.2 and MRTrix3. Specifically, header "mrtrix fibers" becomes "mrtrix tracks" in MRTrix3. I made minimum change in dtiExportFibersMrtrix.m incorporating this header change, and created a new function (dtiExportFibersMrtrix3.m) supporting .tck export for MRTrix3.

I confirmed that we could load .tck file exported from fg structure in vistasoft in MRView (of MRTrix3) using this function.

What will happen after this change? As you see in edits on fgWrite.m, the default output of tck file will become compatible with MRTrix3, not MRTrix 0.2 after merging this commit. Original function supporting MRTrix0.2 remains, and can be used if you specified type of exporting format as "tck2", in fgWtite.m function.

Therefore, I am making newest version of .tck as default, while keeping the option to export older file format in fgWrite.