Mrview - orientation


i am trying to use the -orientation option for mrview, but when doing so, i get the following error: “-orientationlabel option expects a boolean”
Seemingly, mrview seems to try to run the orientationlabel option instead. Anyone else experienced this problem?

Hi @matthy,

Sounds like a bug that we’re going to have to fix – sorry…

In the meantime, did you install from source or using the precompiled packages. If the former, we can easily send you a quick fix. Not so easy otherwise.

All the best,

Hi Donald,

thank you for your quick response. I used Homebrew to install. That would be great


OK, if you build from source with homebrew, then all you need to do is edit the file src/gui/mrview/window.cpp as shown in this commit, save, and re-issue the ./build command.

All this change does is rename the -orientationlabel option to -orientlabel to avoid conflicting with the -orientation option. This is all due to our option shortening feature, which can cause trouble when we’re not careful, as has clearly been the case here…

Thank you! however, rookie question with regards to building. How do i access that file?

Hi again, found the file and did the rebuild. But seems, that the bug had already been fixed, when i rebuild my entire mrtrix. However, now the orientation option seems to be missing, i get an error when tryinhg to apply it to mrview, and it is not to be found in the window.cpp file either.

Hi @matthy,

OK, that had me stumped for a bit… But it all makes sense, thankfully.

Yes, I committed the change to the master branch, and that was merged pretty quickly (see pull request 2569). But as it turns out, I hadn’t appreciated that the -orientation option is only available on the dev branch (this pull request), so you will indeed find that there is no such option if you build the master branch.

So I might revert the change on master, since it’s not necessary (and changes the interface, which we typically try to avoid on the release branch), and leave it on dev only (which will eventually make it out as the 3.1.0 release).

Hope that all makes sense…

Hi Donald,

Thank you for all your help. So now i’m running the dev version instead. The option is now enabled. But when i open the tractography using the orientation option, the actual reorientation does not seem to take place. The mrview window shows the tractography i volume render mode but doesn’t not reorient it. However, as soon as i hold command and start to drag the object, it jumps to my chosen orientation.
So the options seems to work, but the mrview does not refresh/update until i manually start manipulating the orientation. I do not get any error messages.

mrview ROIs/roi_16_10.mif -tractography.load Streamline/16-0_streams.tck -mode 3 -orientation 1,2,1,3