Mrview ROI tool

Dear all,

I am using mrview to create manual ROI using the ROI editor.
However as soon as I try to mark multiple regions (on one ROI), the former disappears.

What am I doing wrong?


I’m sorry - this seems to be a problem on my Linux version of mrtrix3 only (debian8). It works fine on the windows version.

I’m not sure I understand the issue exactly… Can you give us exact steps to reproduce the issue? Also, any information about your system, particularly the graphics card and drivers in use (the MRView OpenGL info dialog is useful for this - or just run mrview -debug).

What I’m struggling to understand is whether you’re trying to edit one ROI image or several? Or are you trying to edit two different regions within the same ROI image? Does the other region disappear completely, or has it simply gone out of slice?

Sorry for being so unspecific.

Here is what happens step-by-step:

  1. Loading .mif image (I’m trying to manually correct segmentations on a 5tt file, but it’s the same if I load other types of images as well)
  2. Opening ROI editor
  3. Create new ROI
  4. click edit, brush, size 1 (or any other)
  5. click on the image to mark area (which works)
  6. click a second time on distant area on the SAME slice, then the first marked area from 5 disappears.

Interestingly I am able to mark one area per slice (but not multiple, single areas on one slice). I am also able to create multiple ROIs per slice (that is, repeating step 3).

I am working on a debian 8 system
Graphic card: MSI geforce GT720 (NVIDIA Corp. Device 1288 rev a1).

I have attached the output of mrview -debug below.

Everything works fine on with Windows, so I guess it’s a problem specific to my hardware.


eve@eve:~/mrtrixtracking/ca_010$ mrview 5tt_fs.mif -debug
mrview: [DEBUG] No config file found at "/etc/mrtrix.conf"
mrview: [DEBUG] No config file found at ".mrtrix.conf"
mrview: [INFO] GL renderer:  Gallium 0.4 on llvmpipe (LLVM 3.5, 256 bits)
mrview: [INFO] GL version:   3.3 (Core Profile) Mesa 10.3.2
mrview: [INFO] GL vendor:    VMware, Inc.
mrview: [DEBUG] loading font into OpenGL texture...
mrview: [DEBUG] compiling OpenGL vertex shader:
#version 330 core
layout(location = 0) in vec2 pos;
layout(location = 1) in vec2 font_pos;
uniform float scale_x;
uniform float scale_y;
out vec2 tex_coord;
void main () {
  gl_Position = vec4 (pos[0]*scale_x-1.0, pos[1]*scale_y-1.0, 0.0, 1.0);
  tex_coord = font_pos;

OK, I think there’s a few issues here. First, it looks like you’re actually running within a virtual machine? In which case I’m impressed you got MRView to work at all. I’m actually surprised to see the GL version reported to be 3.3, I wouldn’t expect virtual machines to be able to support hardware acceleration at this stage. Maybe VMware has made progress on this of late, or more likely, it’s using software rendering, which will be really slow - too slow to be useable for anything but the simplest tasks.

The other issue is that the drivers you are using probably aren’t quite up to it. It’s reporting using the open-source mesa drivers, version 10.3.2 - in my experience, you need at least mesa 10.6 for things to work properly with OpenGL 3.3.

The thing is, MRView uses modern OpenGL to handle the rendering - this is what allows us to render what are really very complex scenes with interactive frame rates. While virtual machines are handy, they generally prevent direct access to the hardware, making MRView (or any other intensive OpenGL application) essentially unusable. I’d strongly recommend you try running it natively if you can…

I’m quite sure VMware actually allows for this since quite a while already. :wink:

I stand corrected - VMware does indeed support OpenGL 3.3. That might change the advice I give VM users considerably…

However, my comment about the mesa version stands. I’m pretty sure you’ll need mesa 10.6 or above in the guest OS for things to work properly…

Actually, this page suggests that getting OpenGL 3.3 support to work in VMware is still far from trivial, it would require the guest OS to run Linux kernel 4.3 and mesa 11.1, and the host OS to support OpenGL 4. If you’re running Ubuntu, anything older than 16.04 won’t work out of the box…