00001 00007 #ifndef FIBER_H_ 00008 #define FIBER_H_ 00009 00010 #include <vector> 00011 #include <cassert> 00012 #include "unscented_kalman_filter.h" 00013 #include "linalg.h" 00014 00015 #include <vnl/vnl_matrix.h> 00016 00025 struct Fiber { 00026 00028 std::vector<vec_t> position ; 00030 std::vector<double> fa ; 00032 std::vector<double> fa2 ; 00034 std::vector<double> norm ; 00036 std::vector<State> state ; 00038 std::vector<vnl_matrix<double> > covariance ; 00040 std::vector<double> free_water ; 00042 std::vector<double> normMSE ; 00044 std::vector<double> trace ; 00046 std::vector<double> trace2 ; 00047 } ; 00048 00055 struct BranchingSeedAffiliation { 00056 size_t fiber_index_ ; 00057 int position_on_fiber_ ; 00058 } ; 00059 00066 void PostProcessFibers( const std::vector<Fiber>& raw_primary, 00067 const std::vector<Fiber>& raw_branch, 00068 const std::vector<BranchingSeedAffiliation>& branching_seed_affiliation, 00069 const bool branches_only, 00070 std::vector<Fiber>& fibers) ; 00071 00073 const int MINIMUM_NUM_POINTS_ON_FIBER = 10 ; 00074 00076 const int FIBER_TAIL_THRESHOLD = 5 ; 00077 00078 #endif