diff --git a/cpp/cmd/sh2peaks.cpp b/cpp/cmd/sh2peaks.cpp index 8cf46a9cab..b17ceea8e8 100644 --- a/cpp/cmd/sh2peaks.cpp +++ b/cpp/cmd/sh2peaks.cpp @@ -16,6 +16,7 @@ #include "algo/loop.h" #include "command.h" +#include "dwi/directions/predefined.h" #include "file/matrix.h" #include "image.h" #include "math/SH.h" @@ -298,10 +299,10 @@ void run() { opt = get_options("seeds"); Eigen::Matrix dirs; - if (!opt.empty()) - dirs = File::Matrix::load_matrix(opt[0][0]); + if (opt.empty()) + dirs = DWI::Directions::electrostatic_repulsion_60().cast(); else - dirs = Eigen::Map>(default_directions, 60, 2); + dirs = File::Matrix::load_matrix(opt[0][0]); if (dirs.cols() != 2) throw Exception("expecting 2 columns for search directions matrix"); @@ -348,17 +349,3 @@ void run() { Thread::run_queue(loader, Thread::batch(Item()), Thread::multi(processor)); } - -value_type default_directions[] = { - 0, 0, -3.14159, 1.3254, -2.58185, 1.50789, 2.23616, 1.46585, 0.035637, 0.411961, - 2.65836, 0.913741, 0.780743, 1.23955, -0.240253, 1.58088, -0.955334, 1.08447, 1.12534, 1.78765, - 1.12689, 1.30126, 0.88512, 1.55615, 2.08019, 1.16222, 0.191423, 1.06076, 1.29453, 0.707568, - 2.794, 1.24245, 2.02138, 0.337172, 1.59186, 1.30164, -2.83601, 0.910221, 0.569095, 0.96362, - 3.05336, 1.00206, 2.4406, 1.19129, 0.437969, 1.30795, 0.247623, 0.728643, -0.193887, 1.0467, - -1.34638, 1.14233, 1.35977, 1.54693, 1.82433, 0.660035, -0.766769, 1.3685, -2.02757, 1.02063, - -0.78071, 0.667313, -1.47543, 1.45516, -1.10765, 1.38916, -1.65789, 0.871848, 1.89902, 1.44647, - 3.08122, 0.336433, -2.35317, 1.25244, 2.54757, 0.586206, -2.14697, 0.338323, 3.10764, 0.670594, - 1.75238, 0.991972, -1.21593, 0.82585, -0.259942, 0.71572, -1.51829, 0.549286, 2.22968, 0.851973, - 0.979108, 0.954864, 1.36274, 1.04186, -0.0104792, 1.33716, -0.891568, 0.33526, -2.0635, 0.68273, - -2.41353, 0.917031, 2.57199, 1.50166, 0.965936, 0.33624, 0.763244, 0.657346, -2.61583, 0.606725, - -0.429332, 1.30226, -2.91118, 1.56901, -2.79822, 1.24559, -1.70453, 1.20406, -0.582782, 0.975235};