# LUT error in connectome viewing tool

**URL:** <https://community.mrtrix.org/t/lut-error-in-connectome-viewing-tool/4580>\
**Category:** Uncategorized\
**Tags:** connectomics\
**Created:** [February 20, 2021, 2:51am UTC](https://community.mrtrix.org/t/lut-error-in-connectome-viewing-tool/4580 "2021-02-20T02:51:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nadluru](https://community.mrtrix.org/user_avatar/community.mrtrix.org/nadluru/32/1445_2.png) [@nadluru](https://community.mrtrix.org/u/nadluru)\
**Post date:** [February 20, 2021, 2:51am UTC](https://community.mrtrix.org/t/lut-error-in-connectome-viewing-tool/4580/1 "2021-02-20T02:51:22Z")

</div>

Dear MRtrix3 community and developers,

I am not able to use this [LUT2.txt](http://brainimaging.waisman.wisc.edu/~adluru/LUT2.txt) in the connectome viewer. It gives the following error.

 ![Screen Shot 2021-02-19 at 8.38.13 PM](https://community.mrtrix.org/uploads/default/original/2X/d/d24775dd5b29c5a4958b6b0a407fb240305ea85f.png)

The only difference I am able to pin point between a working example [LUT1.txt](http://brainimaging.waisman.wisc.edu/~adluru/LUT1.txt) (generated from labelconvert of mrtrix3) and [LUT2.txt](http://brainimaging.waisman.wisc.edu/~adluru/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.

---

<div class="post-metadata">

**Author:** ![rsmith](https://community.mrtrix.org/user_avatar/community.mrtrix.org/rsmith/32/2672_2.png) [@rsmith](https://community.mrtrix.org/u/rsmith)\
**Post date:** [March 12, 2021, 6:24am UTC](https://community.mrtrix.org/t/lut-error-in-connectome-viewing-tool/4580/2 "2021-03-12T06:24:01Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![nadluru](https://community.mrtrix.org/user_avatar/community.mrtrix.org/nadluru/32/1445_2.png) [@nadluru](https://community.mrtrix.org/u/nadluru)\
**Post date:** [March 16, 2021, 4:50pm UTC](https://community.mrtrix.org/t/lut-error-in-connectome-viewing-tool/4580/3 "2021-03-16T16:50:36Z")

</div>

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
