Ordered LUT for Schäfer2018 atlas

Hello,

does anyone know where to get an ordered, 1-increasing version, in the sense of a target LUT for labelconvert, of a LUT for the Schäfer2018 atlas(es)? Specifically, we would like to use the 400 parcels, 17 network option but weren’t able to find a corresponding ordered LUT yet.

Of course omitting irrelevant rows and columns after connectome matrix construction would also be an option but having an target table for labelconvert would probably be more elegant.

Cheers,
Darius

Hi Darius,

I’m not 100% sure I get all the subtleties of LUT handling that @rsmith has cooked up, but as a wild guess, I reckon this might at least give you a reasonable starting point, assuming you want to keep the order in the original LUT and just make the labels sequential:

cat original_LUT.txt | grep -o '^[^#]*' | awk '{ $1=NR; print $0; }'

The grep stage in the pipeline strips out comments and empty lines, the awk stage replaces the index value with its line number. I think that would then be suitable for use with labelconvert (hopefully @rsmith will confirm one way or the other…).

Cheers,
Donald.

Hi Darius,

I’ve not yet implemented support for those parcellations in my own tools yet (though have been meaning to do so for a long time).

It seems that if you’re doing a volumetric registration, there is already such a file. So I’m assuming you’re doing a surface-based projection, and are therefore getting an image containing values according to this LUT. In that case it’s not only a matter of making the indices within the existing LUT increase sequentially from 1, but also removing entries in that LUT that you do not with to be present in the connectome (e.g. ventricles). The LUTs I’ve produced myself and included in share/mrtrix3/labelconvert/ have simply been done the laborious way. While it might be quite a drag to produce such, it does better facilitate interrogation of the connectome having direct correspondence between rows / columns of the matrix data and the entries in the LUT.

Also, if you do go to that effort, it faciliates the opportunity to contribute them to the MRtrix3 repository for others to use, and get recognition for your efforts :wink:

Cheers
Rob