17#ifndef __dwi_tractography_connectome_matrix_h__
18#define __dwi_tractography_connectome_matrix_h__
24#include "connectome/connectome.h"
34namespace Tractography {
54 using vector_type = Eigen::Matrix<T, Eigen::Dynamic, 1>;
56 Matrix (
const node_t max_node_index,
const stat_edge stat,
const bool vector_output,
const bool track_assignments) :
58 vector_output (vector_output),
59 track_assignments (track_assignments),
60 mat2vec (vector_output ?
63 data (vector_type::Zero (vector_output ?
64 (max_node_index + 1) :
65 mat2vec->vec_size())),
67 vector_type::Zero (vector_output ?
68 (max_node_index + 1) :
69 mat2vec->vec_size()) :
73 data = vector_type::Constant (vector_output ? (max_node_index + 1) : mat2vec->vec_size(), std::numeric_limits<T>::infinity());
75 data = vector_type::Constant (vector_output ? (max_node_index + 1) : mat2vec->vec_size(), -std::numeric_limits<T>::infinity());
83 void error_check (
const std::set<node_t>&);
85 void write_assignments (
const std::string&)
const;
87 bool is_vector()
const {
return (vector_output); }
89 void save (
const std::string&,
const bool,
const bool,
const bool)
const;
94 const bool vector_output;
95 const bool track_assignments;
97 const std::unique_ptr<MR::Connectome::Mat2Vec> mat2vec;
104 FORCE_INLINE void apply_data (
const size_t,
const T,
const T);
105 FORCE_INLINE void apply_data (
const size_t,
const size_t,
const T,
const T);
108 FORCE_INLINE void inc_count (
const size_t,
const size_t,
const T);
A class to specify a command-line option.
const App::Option EdgeStatisticOption
MR::Connectome::node_t node_t
const char * statistics[]
constexpr node_t node_count_ram_limit
Eigen::Array< value_type, Eigen::Dynamic, 1 > vector_type