Labelconvert and connectome visualisation


I’m having troubles with labelconvert and using the connectome tab from mrview.

1- In labelconvert, I would need some help regarding the parameter ‘lut_out’.
From what I understand, however it’s called ‘out’, it’s an input that should contain some kind of template to guide the modifications that I want to have in my parcellation.
Is that correct ? So I have to manually modify my indices to increment from 1 everytime ?
I have tried the format that you suggest in ‘labelconvert: Explanation & demonstration’ with the colors however labelconvert doesn’t recognize the format.

2- Regarding the visualisation of my connectome:
When I load my parcellation (image output of labelconvert) in Node image, the nodes that I get are all aligned on one sagittal plane.
Am I missing any extra step ? For now in labelconvert lut_out I use the same lut as in lut_in (index and name) but with an increment from one in the indices.

Thanks for your help!


Hi Céline,

  1. Yes, that argument is not actually an “output”; I should think of a different name for it. It’s the lookup table to which you want your output image to conform.

    Generally if you’ve taken a lookup table that MRtrix3 can already read, and simply modified the indices, then there shouldn’t be a problem. However it only takes one slightly erroneous line for the code to detect an inconsistency in the formatting and hence be unable to read the file: It’s looking for a consistent number of columns in each row. While the list of supported formats isn’t in the documentation, you can see the possibilities in the code here. I do have code somewhere for making errors in parsing here more verbose in response to this thread, but I can’t recall where it went; if you get stuck, you can try posting the contents of the file here.

  2. It took me a moment, but I think I know what’s going wrong here. The connectome tool determines the centre of mass of each node in 3D, and draws the node (by default a sphere) at that location. For all of the nodes to be aligned on a sagittal plane would require that the centre of mass of every single node lies on a sagittal plane. There are only two ways in which this could occur:

    • (unlikely) Every node only contains voxels on a single sagittal plane.

    • (likely) Every node is labelled identically in both hemispheres, resulting in a centre of mass that lies on the mid-sagittal plane.

    The latter I believe I’ve observed in FSL atlases, and was the reason why I haven’t provided lookup tables for those atlases within MRtrix3: That labelling can’t be resolved for use with tck2connectome using labelconvert, explicit image manipulation is instead required. I imagine that you would need to find / derive a hemisphere mask image, and add some integer number to node values within that masked hemipshere, in order to get a unique integer for each node (including homologous regions between hemispheres).


Hi Rob,
thank you very much for your help!
Yes, you are right my brain is identically labelled in both hemispheres !

Hello @rsmith

I am tryting to add the Brainnetome Atlas to mrtrix using batman tutorial. according to your comments, I modified a mrtrix lookup table. when i use lableconvert in order to convert brainnetome atlas label to the format that mrtrix understand, i encounter the following massage:
labelconvert $SUBJECTS_DIR/sub-50328/mri/aseg+aprac.mif $FREESURFER_HOME/BN_Atlas_246_LUT.txt /home/arman/mrtrix3/share/mrtrix3/labelconvert/BN1_ordered_fs1.txt aseg+aprac_test.mif
labelconvert: [WARNING] Unexpected values detected in input image; suggest checking input image thoroughly

is everything ok? can i use aseg+aprac_test.mif for connectome counstruction using tck2connectome?

Thanks in advance for your help!


Hi Milad,

That specific warning is seemingly triggered by the presence of image intensities in the input image that are larger in magnitude than the maximal value in the input lookup table. Depending on the data you’re dealing with, it’s entirely possible that this is an erroneous warning and can be ignored. But given you’re uncertain about the operation and are dealing with manual modification of lookup tables, it’s probably not a bad suggestion, even if the logic behind its generation may be a red herring. So don’t treat it as being guaranteed to be indicative of a problem, but do be diligent in checking your data regardless.


HI @rsmith

sorry for long delay in reply. I appreciate you for your response. The problem was actually due to the lookup table of Brainnetome atlas. So it was manually modified (if anyone need it, i can share) according to other tables that are readable by mrtrix and i didn’t see any warning.

best regards,


Hi @Milad, I’m Joan. I’m also trying to modify a brain atlas lookup table, can you please share the lookup table of the Brainnetome atlas with me? Thanks.

Hi @Joanne

Surly, please use the following links:

Thanks Milad! Please just a follow up question, how did you get the different RGBA intensities for the brain regions in the LUT. Did you use any software in particular?

You’re welcome Joanne. No, I just downloaded the BN atlas in the freesurfer format (Brainnetome Atlas | Download) and manually modified its lookup table.

1 Like

Thanks Milad.