Developer documentation
Version 3.0.3-105-gd3941f44
predefined.h
Go to the documentation of this file.
1/* Copyright (c) 2008-2022 the MRtrix3 contributors.
2 *
3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
6 *
7 * Covered Software is provided under this License on an "as is"
8 * basis, without warranty of any kind, either expressed, implied, or
9 * statutory, including, without limitation, warranties that the
10 * Covered Software is free of defects, merchantable, fit for a
11 * particular purpose or non-infringing.
12 * See the Mozilla Public License v. 2.0 for more details.
13 *
14 * For more details, see http://www.mrtrix.org/.
15 */
16
17#ifndef __dwi_directions_predefined_h__
18#define __dwi_directions_predefined_h__
19
20
21#include "types.h"
22
23
24namespace MR {
25 namespace DWI {
26 namespace Directions {
27
36
37 namespace {
38 inline Eigen::MatrixXd copy (const default_type* p, ssize_t rows) {
39 Eigen::MatrixXd d (rows, 2);
40 for (ssize_t i = 0; i < rows; ++i) {
41 d(i,0) = *p++;
42 d(i,1) = *p++;
43 }
44 return d;
45 }
46 }
47
48
49
50 inline Eigen::MatrixXd electrostatic_repulsion_60 () { return copy (electrostatic_repulsion_60_data, 60); }
51 inline Eigen::MatrixXd electrostatic_repulsion_300 () { return copy (electrostatic_repulsion_300_data, 300); }
52 inline Eigen::MatrixXd electrostatic_repulsion_5000 () { return copy (electrostatic_repulsion_5000_data, 5000); }
53
55 inline Eigen::MatrixXd tesselation_129 () { return copy (tesselation_129_data, 129); }
56
58 inline Eigen::MatrixXd tesselation_321 () { return copy (tesselation_321_data, 321); }
59
61 inline Eigen::MatrixXd tesselation_469 () { return copy (tesselation_469_data, 469); }
62
64 inline Eigen::MatrixXd tesselation_513 () { return copy (tesselation_513_data, 513); }
65
67 inline Eigen::MatrixXd tesselation_1281 () { return copy (tesselation_1281_data, 1281); }
68
69 }
70 }
71}
72
73#endif
74
const default_type electrostatic_repulsion_300_data[]
const default_type tesselation_1281_data[]
const default_type tesselation_469_data[]
Eigen::MatrixXd tesselation_129()
3rd-order tessellation of an octahedron
Definition: predefined.h:55
Eigen::MatrixXd electrostatic_repulsion_300()
Definition: predefined.h:51
Eigen::MatrixXd tesselation_1281()
4th-order tessellation of an icosahedron
Definition: predefined.h:67
const default_type electrostatic_repulsion_60_data[]
const default_type tesselation_129_data[]
Eigen::MatrixXd tesselation_321()
3rd-order tessellation of an icosahedron
Definition: predefined.h:58
Eigen::MatrixXd tesselation_513()
4th-order tessellation of an octahedron
Definition: predefined.h:64
Eigen::MatrixXd electrostatic_repulsion_60()
Definition: predefined.h:50
const default_type electrostatic_repulsion_5000_data[]
Eigen::MatrixXd tesselation_469()
4th-order tessellation of a tetrahedron
Definition: predefined.h:61
Eigen::MatrixXd electrostatic_repulsion_5000()
Definition: predefined.h:52
const default_type tesselation_321_data[]
const default_type tesselation_513_data[]
Definition: base.h:24
double default_type
the default type used throughout MRtrix
Definition: types.h:228
void copy(InputImageType &&source, OutputImageType &&destination, size_t from_axis=0, size_t to_axis=std::numeric_limits< size_t >::max())
Definition: copy.h:27