MRtrix3 / mrtrix3

MRtrix3 provides a set of tools to perform various advanced diffusion MRI analyses, including constrained spherical deconvolution (CSD), probabilistic tractography, track-density imaging, and apparent fibre density
http://www.mrtrix.org
Mozilla Public License 2.0
293 stars 180 forks source link

labelconvert: LUTs not compatible with FreeSurfer 7 #2065

Closed Lestropie closed 4 years ago

Lestropie commented 4 years ago

As reported on forum

Contents of FreeSurferColorLUT.txt version 6:

47  Right-Cerebellum-Cortex                 230 148 34  0
48  Right-Thalamus                          0   118 14  0
49  Right-Thalamus-Proper                   0   118 14  0
50  Right-Caudate                           122 186 220 0

Contents of FreeSurferColorLUT.txt version 7 (also in previous "dev" version but I never came across it):

47  Right-Cerebellum-Cortex                 230 148 34  0
48  Right-Thalamus-unused                   0   118 14  0
49  Right-Thalamus                          0   118 14  0
50  Right-Caudate                           122 186 220 0

So the image intensities remain unchanged (everything labelled as 49, intensity 48 never occurs). Unfortunately this screws me up as all of my processing is based on matching names.

For the sake of conversion (i.e. labelconvert), this is easy: just include "Right-Thalamus" and "Right-Thalamus-Proper", with the same target node index, and the data will be converted correctly regardless of which FreeSurfer LUT file is used.

Where this however makes things complicated is in subsequent usage. During conversion the code is quite happy to have a many-to-one mapping, i.e. multiple input indices mapping to the same output index. If however you are doing some form of manipulation or analysis of the resulting connectome matrix, you want to have one and only one entry in your lookup table for each index. I think that the only place such is enforced is in the mrview Connectome tool here; but I'm not 100% on that.

So there are three solutions as far as I can tell:

  1. Provide separate lookup table files for FreeSurfer 6 and 7.

  2. Provide separate lookup tables for "conversion" of the label image, and subsequent lookup of the result, as must be done for the lobe-based parcellations.

  3. Relax the restriction on the presence of multiple labels per index in the mrview Connectome tool (and anywhere else I've not thought of), issuing an appropriate warning to indicate that e.g. the first row of the lookup table file with that index will be utilised.

Given the potential for huge confusion arising from such a subtle change, I'm in favour of option 3.

Lestropie commented 4 years ago

Thankfully users will be met with a warning message telling them that their thalami are being excluded; but nevertheless want to push a fix for this out reasonably quickly.