Streamtubes not displayed in mrview

Hi guys,

I am attempting to view the streamlines used in my connectome, following the instructions here:

I produced the streamline assignments from the .tck and then exemplar .tck file as instructed:

tck2connectome -assignment_end_voxels -out_assignments ./out.txt ./tracks.tck ./parc_nodes2b0_reassign.nii.gz ./connectome_outassign_temp.csv 
connectome2tck -exemplars ./parc_nodes2b0_reassign.nii.gz -files single ./tracks.tck ./out.txt ./conn2tck_exemplar

However, when I try to load the ./conn2tck_exemplar in mrview, no streamlines/streamtubes are displayed (mrview -debug info below).

I did not see any previous thread about this issue, my apologies if this has already been addressed.

Any responses will be greatly appreciated!!


Following loading the exemplar streamline file…

mrview: [DEBUG] reading key/value file "<folder>/conn2tck_exemplar.tck"...
mrview: [INFO] mrview: Importing connection exemplars
mrview: [INFO] mrview: Importing connection exemplars [done]
mrview: [INFO] mrview: Generating connection streamtubes
mrview: [INFO] mrview: Generating connection streamtubes [done]
mrview: [DEBUG] compiling OpenGL vertex shader:

#version 330 core
layout (location = 0) in vec3 vertexPosition_modelspace;
uniform mat4 MVP;
uniform mat4 MV;
layout (location = 1) in vec3 vertexTangent_modelspace;
layout (location = 2) in vec3 vertexNormal_modelspace;

uniform float radius;
out vec3 normal;
void main() {
vec3 pos = vertexPosition_modelspace + (radius * vertexNormal_modelspace);
normal = normalize (mat3(MV) * vertexNormal_modelspace);
gl_Position = MVP * vec4 (pos, 1);

mrview: [DEBUG] compiling OpenGL fragment shader:
#version 330 core
uniform vec3 edge_colour;
out vec3 color;
uniform float ambient, diffuse, specular, shine;
uniform vec3 light_pos;
in vec3 normal;
void main() {
color = edge_colour;
color *= ambient + diffuse * clamp (dot (normal, light_pos), 0, 1);
color += specular * pow (clamp (dot (reflect (-light_pos, normal), vec3(0.0,0.0,1.0)), 0, 1), shine);

Welcome Chris!

Could you please compare your experiences against those described in this GitHub issue? I suspect you have encountered an issue identical to that of multiple other users, but I have never had physical access to a system where the issue occurs in order to be able to diagnose the fault.


Hi Rob,

I compared my experiences with 1330:

I modified ~/mrtrix3/gui/mrview/tool/connectome/edge.h as recommended and checked that ~/mrtrix3/gui/mrview/tool/connectome/connectome.cpp was as recommended. After recompiling I get the same result- a dialogue window briefly displays ‘loading streamlines from file’ (or something similar) and then nothing. The debug output looks exactly the same. I am on MacOS, although my mrview is not crashing, as in 1330. I can display the edges as cylinders, and everything else I’ve tried to display in mrview has so far worked, but not streamlines or streamtubes.

I tried re-installing the dependencies and MRTrix too.

Do you have any advice on how to proceed?


Do you have any advice on how to proceed?

Yeah: pester one of the MRtrix3 devs with a Mac to look into it :rofl:

I’ll see if I can find a Mac locally that I can give it a try on. But until I can actually reproduce the fault, even I can’t proceed…

Hi Rob,

Do you know of an example exemplar file & parcellation that I can try and display on my machine? Then I will know if I have produced the exemplar file incorrectly or not.

Otherwise, I will attempt to pester someone to look into it, although I’m not sure how I would go about this.


I’ve just got myself a shiny new desktop, equipped with an ATI/AMD GPU (this is what typically causes issues, rather than macOS necessarily). I’ll have a look into it if you can share some test data along with precise instructions to replicate.

If I can’t replicate, then the chances are it’ll relate to the progressbar popping up. It has historically caused all manner of issues for us. If that’s the problem, it’ll be simple enough to disable the graphical progressbar, although it’ll be a shame to lose it… But hopefully it won’t come to that…

Hi Donald,

Aha, I see- Yes please, that would be great.

The parcellation image and exemplar track file are now on WeTransfer here.

Here are the instructions to replicate:
Run mrview with the parcellation image: mrview parc_nodes2b0_reassign.nii.gz
In mrview:
View -> Hide main image
Tools -> Connectome
In the connector side bar:
Basic Setup, Node image, left button -> select parc_nodes2b0_reassign.nii.gz -> Open
Edge Visualisation, Geometry, drop-down menu -> streamlines/streamtubes -> select conn2tck_exemplar.tck -> Open

Thanks : )


OK, unfortunately WeTransfer appears to have issues with its SSL certificate or something – I can’t access your files using Chrome on Windows or Linux, Epiphany on Linux or Microsoft Edge on Windows… Is there any other way you can provide the data? Otherwise it might be a while before they get this fixed.

Ah, sorry about that. I just googled your contact and sent it to your KCL address. Hope that’s OK.

1 Like

Do you know of an example exemplar file & parcellation that I can try and display on my machine?

Related issue #1331 has some example data.

Thanks Rob