17#ifndef __dwi_shells_h__
18#define __dwi_shells_h__
34#define DWI_SHELLS_EPSILON 80
36#define DWI_SHELLS_MIN_LINKAGE 3
39#define DWI_SHELLS_MIN_DIRECTIONS 6
41#define DWI_SHELLS_BZERO_THREHSOLD 10.0
60 namespace App {
class OptionGroup; }
97 stream <<
"Shell: " <<
S.volumes.size() <<
" volumes, b-value "
98 <<
S.mean <<
" +- " <<
S.stdev <<
" (range [" <<
S.min <<
" - " <<
S.max <<
"])";
124 for (
const auto& it :
shells)
131 for (
size_t n = 0; n <
count(); ++n)
138 for (
size_t n = 0; n <
count(); ++n)
139 b[n] =
shells[n].get_mean();
143 Shells&
select_shells (
const bool force_singleshell,
const bool force_with_bzero,
const bool force_without_bzero);
158 stream <<
"Total of " <<
S.count() <<
" DWI shells:" << std::endl;
159 for (
const auto& it :
S.shells)
160 stream << it << std::endl;
171 using BValueList =
decltype(std::declval<const Eigen::MatrixXd>().col(0));
friend std::ostream & operator<<(std::ostream &stream, const Shell &S)
default_type get_mean() const
Shell(const Eigen::MatrixXd &grad, const vector< size_t > &indices)
default_type get_max() const
default_type get_stdev() const
default_type get_min() const
const vector< size_t > & get_volumes() const
bool operator<(const Shell &rhs) const
bool is_single_shell() const
const Shell & largest() const
vector< size_t > get_counts() const
friend std::ostream & operator<<(std::ostream &stream, const Shells &S)
size_t volumecount() const
Shells & reject_small_shells(const size_t min_volumes=6)
Shells & select_shells(const bool force_singleshell, const bool force_with_bzero, const bool force_without_bzero)
const Shell & smallest() const
Shells(const Eigen::MatrixXd &grad)
const Shell & operator[](const size_t i) const
vector< size_t > get_bvalues() const
static float get_float(const std::string &key, float default_value)
VectorType::Scalar value(const VectorType &coefs, typename VectorType::Scalar cos_elevation, typename VectorType::Scalar cos_azimuth, typename VectorType::Scalar sin_azimuth, int lmax)
FORCE_INLINE default_type bzero_threshold()
const App::OptionGroup ShellsOption
double default_type
the default type used throughout MRtrix
#define DWI_SHELLS_MIN_DIRECTIONS
#define DWI_SHELLS_BZERO_THREHSOLD