Using mrtrix3 with designer

I’ve no experience with the designer pipeline, but it looks like the check for whether MRtrix is in the PATH assumes that you’ve placed the executables in a folder that contains the token mrtrix3 – which is not a particularly safe assumption, as your case illustrates.

I am however surprised that the executables would be located in /msys64/mingw64/bin, and the library in /lib/mrtrix3. That’s not the way to install MRtrix3. I assume this is a Windows install? Why was the installation split in this way? More information on what’s expected on our docs - particularly this statement:

The only requirement is that these 3 folders are co-located alongside each other, so that the executables can find the MRtrix3 shared library, and the scripts can find the requisite python modules.

I recommend we try to ensure your installation adheres to expectations, and then we can try to sort out the designer script issue.


Assuming you’ve got a ‘compliant’ install (i.e. where the MRtrix3 bin, lib & share folders are co-located), and you’re confident MRtrix is in the PATH (i.e. you can invoked e.g. mrinfo from the command-line), and things still don’t work because the parent folder doesn’t contain the token mrtrix3, then we’ll need to fix things up. I have a feeling we’re going to have to get in touch with the developers and get them to use our recommended approach to locate the MRtrix3 modules.

To cut a long story short, what we would recommend is that you remove lines 6-11 and lines 14 & 15, and then use one of the approaches recommended on our docs to locate the MRtrix3 install. In your case, and assuming you’re on Windows so that symbolic links are not an option, I’d recommend:

  • copy our mrtrix3.py file and place alongside the designer script.
  • create a file in the parent folder of the designer script, containing simply the location of the MRtrix3 build script (this depends on where it’s installed). Don’t worry if the build script doesn’t actually exist, as long as the location is where it would have been (i.e. in the top-level folder of the MRtrix3 tree, e.g. /usr/build if you’ve installed the executables in /usr/bin, the library in /usr/lib, etc).

Happy to help if this is all a bit confusing…
I’ll contact the designer developer in the meantime, see if we can figure out a long-term solution to this.