LUT error in connectome viewing tool

Dear MRtrix3 community and developers,

I am not able to use this LUT2.txt in the connectome viewer. It gives the following error.

The only difference I am able to pin point between a working example LUT1.txt (generated from labelconvert of mrtrix3) and LUT2.txt (generated using R) is that subsets of nodes are grouped, and each group is mapped to a same color in LUT2.txt. Could that be the reason?

Could you kindly help me resolve this? Thank you for your help and advice!

Best regards,
Nagesh

P.S. I am also not sure why the third column is not an 8bit integer as shown in the screenshot above. I didn’t treat that column differently when writing from R! Would be happy to share my R code if that could help. I thought the LUT files might offer a good starting point.

Hi @nadluru,

There is no need for the colours in the LUT to be unique, nor is there any demand for the nodes to appear in any particular order (indeed generating your own LUT file with the nodes in the order that you desire for subsequent analysis / visualisation is the recommended approach).

The culprit is that in LUT2.txt there are multiple nodes for which the value in the third column - the green component in this particular LUT format - is 390. This is beyond the range that can be represented using an 8-bit integer (0-255). MRtrix3 detects this when it reads the tabulated data in a format-agnostic way, which means that when it then tries to establish correspondence between the actual content of the file and the set of LUT formats of which it is aware, the contents of this file do not match the AAL format. So you’ll need to backtrace and find out where those 390s are coming from.

Cheers
Rob

1 Like

Hi Rob,

So sorry about the delay in my reply. Just got check the forum. Thank you so much for finding the issue. I am embarrassed that I didn’t catch that. Truly appreciate your help!

Thank you again and best regards,
Nagesh