17#ifndef __dwi_tractography_tracking_generated_track_h__
18#define __dwi_tractography_tracking_generated_track_h__
30 namespace Tractography
45 enum class status_t { INVALID, SEED_REJECTED, TRACK_REJECTED, ACCEPTED };
48 void clear() { BaseType::clear(); seed_index = 0; status = status_t::INVALID; }
49 size_t get_seed_index()
const {
return seed_index; }
50 status_t get_status()
const {
return status; }
51 void reverse() { std::reverse (begin(), end()); seed_index = (size()-1) - seed_index; }
52 void set_seed_index (
const size_t i) { seed_index = i; }
53 void set_status (
const status_t i) { status = i; }
55 float length (
const float step_size)
const
66 case 1:
return ((*
this)[1] - (*
this)[0]).norm();
68 return ((step_size * (size() - 2)) +
69 ((*
this)[1]-(*
this)[0]).norm() +
70 ((*
this)[size()-1] - (*
this)[size()-2]).norm());
76 stream <<
str(tck.size()) <<
" vertices, seed index " <<
str(tck.seed_index) <<
", status ";
78 case status_t::INVALID: stream <<
"INVALID";
break;
79 case status_t::SEED_REJECTED: stream <<
"SEED_REJECTED";
break;
80 case status_t::TRACK_REJECTED: stream <<
"TRACK_REJECTED";
break;
81 case status_t::ACCEPTED: stream <<
"ACCEPTED";
break;
friend std::ostream & operator<<(std::ostream &stream, GeneratedTrack &tck)
std::string str(const T &value, int precision=0)
constexpr default_type NaN