17#ifndef __dwi_directions_load_h__
18#define __dwi_directions_load_h__
24 namespace Directions {
29 template <
class MatrixType>
30 inline void save_cartesian (
const MatrixType& directions,
const std::string& filename)
32 if (directions.cols() == 2)
38 template <
class MatrixType>
39 inline void save_spherical (
const MatrixType& directions,
const std::string& filename)
41 if (directions.cols() == 3)
47 template <
class MatrixType>
48 inline void save (
const MatrixType& directions,
const std::string& filename,
bool cartesian)
void save_cartesian(const MatrixType &directions, const std::string &filename)
Eigen::MatrixXd load_spherical(const std::string &filename)
Eigen::MatrixXd load_cartesian(const std::string &filename)
void save(const MatrixType &directions, const std::string &filename, bool cartesian)
void save_spherical(const MatrixType &directions, const std::string &filename)
std::enable_if< VectorType1::IsVectorAtCompileTime, void >::type spherical2cartesian(const VectorType1 &az_el_r, VectorType2 &&xyz)
convert spherical coordinates to Cartesian coordinates
std::enable_if< VectorType1::IsVectorAtCompileTime, void >::type cartesian2spherical(const VectorType1 &xyz, VectorType2 &&az_el_r)
convert Cartesian coordinates to spherical coordinates
void save_matrix(const MatrixType &M, const std::string &filename, const KeyValues &keyvals=KeyValues(), const bool add_to_command_history=true)
write the matrix M to file