This class performs the tractography and saves each step. More...
#include <tractography.h>
Public Types | |
enum | model_type { _1T, _1T_FW, _1T_FULL, _1T_FW_FULL, _2T, _2T_FW, _2T_FULL, _2T_FW_FULL, _3T, _3T_FULL } |
Public Member Functions | |
Tractography (FilterModel *model, model_type filter_model_type, const std::string &output_file, const std::string &output_file_with_second_tensor, const bool record_fa, const bool record_nmse, const bool record_trace, const bool record_state, const bool record_cov, const bool record_free_water, const bool record_tensors, const bool transform_position, const bool store_glyphs, const bool branchesOnly, const double fa_min, const double ga_min, const double seedFALimit, const int num_tensors, const int seeds_per_voxel, const double minBranchingAngle, const double maxBranchingAngle, const bool is_full_model, const bool free_water, const double stepLength, const double maxHalfFiberLength, const std::vector< int > &labels, double p0, double sigma_signal, double sigma_mask, double min_radius, double full_brain_ga_min, const int num_threads) | |
~Tractography () | |
bool | LoadFiles (const std::string &data_file, const std::string &seed_file, const std::string &mask_file, const bool normalized_DWI_data, const bool output_normalized_DWI_data) |
void | Init (std::vector< SeedPointInfo > &seed_infos) |
void | Run () |
void | Follow3T (const int thread_id, const size_t seed_index, const SeedPointInfo &seed, Fiber &fiber, bool is_branching, std::vector< SeedPointInfo > &branching_seeds, std::vector< BranchingSeedAffiliation > &branching_seed_affiliation) |
void | Follow2T (const int thread_id, const size_t seed_index, const SeedPointInfo &seed, Fiber &fiber, bool is_branching, std::vector< SeedPointInfo > &branching_seeds, std::vector< BranchingSeedAffiliation > &branching_seed_affiliation) |
void | Follow1T (const int thread_id, const SeedPointInfo &seed, Fiber &fiber) |
This class performs the tractography and saves each step.
Defines a type to specify the model
Tractography::Tractography | ( | FilterModel * | model, | |
model_type | filter_model_type, | |||
const std::string & | output_file, | |||
const std::string & | output_file_with_second_tensor, | |||
const bool | record_fa, | |||
const bool | record_nmse, | |||
const bool | record_trace, | |||
const bool | record_state, | |||
const bool | record_cov, | |||
const bool | record_free_water, | |||
const bool | record_tensors, | |||
const bool | transform_position, | |||
const bool | store_glyphs, | |||
const bool | branchesOnly, | |||
const double | fa_min, | |||
const double | ga_min, | |||
const double | seedFALimit, | |||
const int | num_tensors, | |||
const int | seeds_per_voxel, | |||
const double | minBranchingAngle, | |||
const double | maxBranchingAngle, | |||
const bool | is_full_model, | |||
const bool | free_water, | |||
const double | stepLength, | |||
const double | maxHalfFiberLength, | |||
const std::vector< int > & | labels, | |||
double | p0, | |||
double | sigma_signal, | |||
double | sigma_mask, | |||
double | min_radius, | |||
double | full_brain_ga_min, | |||
const int | num_threads | |||
) |
Constructor, is called from main.cc where all parameters are defined.
Tractography::~Tractography | ( | ) |
Destructor
void Tractography::Follow1T | ( | const int | thread_id, | |
const SeedPointInfo & | seed, | |||
Fiber & | fiber | |||
) |
Follows one seed point for the 1 Tensor case
void Tractography::Follow2T | ( | const int | thread_id, | |
const size_t | seed_index, | |||
const SeedPointInfo & | seed, | |||
Fiber & | fiber, | |||
bool | is_branching, | |||
std::vector< SeedPointInfo > & | branching_seeds, | |||
std::vector< BranchingSeedAffiliation > & | branching_seed_affiliation | |||
) |
Follows one seed point for the 2 Tensor case
void Tractography::Follow3T | ( | const int | thread_id, | |
const size_t | seed_index, | |||
const SeedPointInfo & | seed, | |||
Fiber & | fiber, | |||
bool | is_branching, | |||
std::vector< SeedPointInfo > & | branching_seeds, | |||
std::vector< BranchingSeedAffiliation > & | branching_seed_affiliation | |||
) |
Follows one seed point for the 3 Tensor case
void Tractography::Init | ( | std::vector< SeedPointInfo > & | seed_infos | ) |
Creates the seeds and initilizes them by finding the tensor directions, eigenvalues and Euler Angles. This also sets the initial state and covariance.
bool Tractography::LoadFiles | ( | const std::string & | data_file, | |
const std::string & | seed_file, | |||
const std::string & | mask_file, | |||
const bool | normalized_DWI_data, | |||
const bool | output_normalized_DWI_data | |||
) |
Load the files that contain the DWI signal, the seeds and a mask defining the volume of the brain.
void Tractography::Run | ( | ) |
Performs the tractography