(direct copy from previous discussion)
I've been thinking for a while now that it would be good to use a different license than the GPL to allow integration of MRtrix into other projects, whether proprietary or that simply use different licenses. Something like the Mozilla Public License or even MIT/BSD. This would require stripping out all GSL dependencies - it's the only GPL component used in MRtrix.
I've had a quick look through to find which bits would need to be modified. Obviously all the linear algebra stuff would need to be modified. For this, I've just come across the FLENS project, which is basically a templated C++ header-only implementation of all of BLAS and LAPACK, which is perfect. That would basically replace a lot of the lib/math
folder in one go...
Other things that would need re-implementation are actually not too bad. I'd already re-implemented the SH & Legendre functions, so that's no issue. The FFT stuff is currently not used in the main branch, but it would be trivial to use something like kissFFT if needed. The only other sticking point is a decent multidimensional optimiser, which is currently only used in gendir, so no big deal. I've come across one decent-looking implementation of the BFGS conjugate gradient optimiser, which looks relatively simple to adapt to our needs.
So all in all, nothing too difficult to do, but would nonetheless require a fair bit of work. Question is, is this something that we'd consider important, and if so, is this something that we want done before release, or are we happy to wait till later...?
It might also be worth looking into the boost library. In particular the Math, Random and uBLAS parts might be useful. Math has special functions implemented, but apparently you already coded those. uBlas provides templated c++ BLAS. As fas as I know LAPACK is not included though... Also Eigen might be interesting for linear algebra. Pretty sure it will cover most of your linear algebra needs... Not sure if it's license is liberal enough.
Eigen looks good - it's C++98, while FLENS uses C++11 features. I'd like to move to C++11, there's a lot of features that we could use straight away, for example the Mersenne Twister random number generator, which is what we use with the GSL currently. Only issue with moving to C++11 is that it might prevent deployment on older clusters and HPC setups - but then they can always compile static binaries if required. Maybe it's time we tried it...
Otherwise, Eigen is MPL, which is what I was leaning towards anyway. We'll need to discuss the best license at some point if we're going to switch. In the short term though, I think we'll need to release under the GPL to get the software out...
As to FLENS, the license seems very relaxed. The other advantage is it's header-only, so we can simply include it within the MRtrix code if we want. I'm slightly concerned about the level of support though - it looks like Eigen has a bigger community around it, which is definitely a big advantage...
Eigen is header-only as well. I haven't used it myself, but some of our colleagues here are using it and I hear nothing but good stories.