Namespaces | |
namespace | Directions |
namespace | FMLS |
namespace | SDeconv |
namespace | Tractography |
Classes | |
class | Bootstrap |
class | Fixel_map |
class | Shell |
class | Shells |
Enumerations | |
enum class | BValueScalingBehaviour { Auto , UserOn , UserOff } |
Functions | |
App::OptionGroup | GradImportOptions () |
App::OptionGroup | GradExportOptions () |
template<class MatrixType > | |
void | check_DW_scheme (const Header &header, const MatrixType &grad) |
check that the DW scheme matches the DWI data in header More... | |
template<class MatrixType , class IndexVectorType > | |
Eigen::MatrixXd | gen_direction_matrix (const MatrixType &grad, const IndexVectorType &dwi) |
convert the DW encoding matrix in grad into a azimuth/elevation direction set, using only the DWI volumes as per dwi More... | |
template<class MatrixType > | |
default_type | condition_number_for_lmax (const MatrixType &dirs, int lmax) |
Eigen::MatrixXd | load_bvecs_bvals (const Header &header, const std::string &bvecs_path, const std::string &bvals_path) |
load and rectify FSL-style bvecs/bvals DW encoding files More... | |
void | save_bvecs_bvals (const Header &, const std::string &, const std::string &) |
export gradient table in FSL format (bvecs/bvals) More... | |
template<class MatrixType > | |
void | set_DW_scheme (Header &header, const MatrixType &G) |
store the DW gradient encoding matrix in a header More... | |
Eigen::MatrixXd | parse_DW_scheme (const Header &header) |
parse the DW gradient encoding matrix from a header More... | |
Eigen::MatrixXd | get_raw_DW_scheme (const Header &header) |
get the DW scheme as found in the headers or supplied at the command-line More... | |
void | clear_DW_scheme (Header &) |
clear any DW gradient encoding scheme from the header More... | |
template<class MatrixType > | |
void | stash_DW_scheme (Header &header, const MatrixType &grad) |
'stash' the DW gradient table More... | |
BValueScalingBehaviour | get_cmdline_bvalue_scaling_behaviour () |
Eigen::MatrixXd | get_DW_scheme (const Header &header, BValueScalingBehaviour bvalue_scaling=BValueScalingBehaviour::Auto) |
get the fully-interpreted DW gradient encoding matrix More... | |
void | export_grad_commandline (const Header &header) |
process GradExportOptions command-line options More... | |
template<class MatrixType > | |
Eigen::MatrixXd | compute_SH2amp_mapping (const MatrixType &directions, bool lmax_from_command_line=true, int default_lmax=8) |
get the matrix mapping SH coefficients to amplitudes More... | |
size_t | lmax_for_directions (const Eigen::MatrixXd &directions, const bool lmax_from_command_line=true, const int default_lmax=8) |
get the maximum spherical harmonic order given a set of directions More... | |
FORCE_INLINE default_type | bzero_threshold () |
template<class InputImageType , class OutputImageType , class MatrixType > | |
void | estimate_noise (InputImageType &dwi, OutputImageType &noise, const MatrixType &SH2amp_mapping) |
template<typename T , class MatrixType > | |
Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > | grad2bmatrix (const MatrixType &grad, bool dki=false) |
template<class MatrixType , class VectorTypeOut , class VectorTypeIn > | |
void | dwi2tensor (VectorTypeOut &dt, const MatrixType &binv, VectorTypeIn &dwi) |
template<class VectorType > | |
VectorType::Scalar | tensor2ADC (const VectorType &dt) |
template<class VectorType > | |
VectorType::Scalar | tensor2FA (const VectorType &dt) |
template<class VectorType > | |
VectorType::Scalar | tensor2RA (const VectorType &dt) |
Variables | |
App::Option | bvalue_scaling_option |
const char *const | bvalue_scaling_description |
const App::OptionGroup | ShellsOption |
|
strong |
Enumerator | |
---|---|
Auto | |
UserOn | |
UserOff |
Definition at line 223 of file gradient.h.
FORCE_INLINE default_type MR::DWI::bzero_threshold | ( | ) |
|
inline |
check that the DW scheme matches the DWI data in header
Definition at line 50 of file gradient.h.
void MR::DWI::clear_DW_scheme | ( | Header & | ) |
clear any DW gradient encoding scheme from the header
Eigen::MatrixXd MR::DWI::compute_SH2amp_mapping | ( | const MatrixType & | directions, |
bool | lmax_from_command_line = true , |
||
int | default_lmax = 8 |
||
) |
get the matrix mapping SH coefficients to amplitudes
Computes the matrix mapping SH coefficients to the directions specified in directions (in spherical coordinates), up to a given lmax. By default, this is computed from the number of DW directions, up to a maximum value of default_lmax (defaults to 8), or the value specified using c -lmax command-line option (if lmax_from_command_line is true). If the resulting DW scheme is ill-posed (condition number less than 10), lmax will be reduced until it becomes sufficiently well conditioned (unless overridden on the command-line).
Note that this uses get_valid_DW_scheme() to get the DW_scheme, so will check for the -grad option as required.
Definition at line 264 of file gradient.h.
default_type MR::DWI::condition_number_for_lmax | ( | const MatrixType & | dirs, |
int | lmax | ||
) |
Definition at line 98 of file gradient.h.
|
inline |
|
inline |
Definition at line 76 of file noise_estimator.h.
void MR::DWI::export_grad_commandline | ( | const Header & | header | ) |
process GradExportOptions command-line options
this checks for the -export_grad_mrtrix
& -export_grad_fsl
options, and exports the DW schemes if and as requested.
|
inline |
convert the DW encoding matrix in grad into a azimuth/elevation direction set, using only the DWI volumes as per dwi
Definition at line 75 of file gradient.h.
BValueScalingBehaviour MR::DWI::get_cmdline_bvalue_scaling_behaviour | ( | ) |
Eigen::MatrixXd MR::DWI::get_DW_scheme | ( | const Header & | header, |
BValueScalingBehaviour | bvalue_scaling = BValueScalingBehaviour::Auto |
||
) |
get the fully-interpreted DW gradient encoding matrix
find and validate the DW gradient encoding matrix, using the following procedure:
-grad
option has been supplied, then load the matrix assuming it is in MRtrix format, and return it;-fslgrad
option has been supplied, then load and rectify the bvecs/bvals pair using load_bvecs_bvals() and return it;true
(the default), scale the b-values accordingly, but only if non-unit vectors are detected;Eigen::MatrixXd MR::DWI::get_raw_DW_scheme | ( | const Header & | header | ) |
get the DW scheme as found in the headers or supplied at the command-line
return the DW gradient encoding matrix found from the command-line arguments, or if not provided that way, as stored in the header. This return the scheme prior to any modification or validation.
|
inline |
App::OptionGroup MR::DWI::GradExportOptions | ( | ) |
App::OptionGroup MR::DWI::GradImportOptions | ( | ) |
|
inline |
get the maximum spherical harmonic order given a set of directions
Computes the maximum spherical harmonic order lmax given a set of directions on the sphere. This may be less than the value requested at the command-line, or that calculated from the number of directions, if the resulting transform matrix is ill-posed.
Definition at line 324 of file gradient.h.
Eigen::MatrixXd MR::DWI::load_bvecs_bvals | ( | const Header & | header, |
const std::string & | bvecs_path, | ||
const std::string & | bvals_path | ||
) |
load and rectify FSL-style bvecs/bvals DW encoding files
This will load the bvecs/bvals files at the path specified, and convert them to the format expected by MRtrix. This involves rotating the vectors into the scanner frame of reference, and may also involve re-ordering and/or inverting of the vector elements to match the re-ordering performed by MRtrix for non-axial scans.
Eigen::MatrixXd MR::DWI::parse_DW_scheme | ( | const Header & | header | ) |
parse the DW gradient encoding matrix from a header
extract the DW gradient encoding matrix stored in the header if one is present. This is expected to be stored in the Header::keyval() structure, under the key 'dw_scheme'.
void MR::DWI::save_bvecs_bvals | ( | const Header & | , |
const std::string & | , | ||
const std::string & | |||
) |
export gradient table in FSL format (bvecs/bvals)
This will take the gradient table information from a header and export it to a bvecs/bvals file pair. In addition to splitting the information over two files, the vectors must be reoriented; firstly to change from scanner space to image space, and then to compensate for the fact that FSL defines its vectors with regards to the data strides in the image file.
void MR::DWI::set_DW_scheme | ( | Header & | header, |
const MatrixType & | G | ||
) |
store the DW gradient encoding matrix in a header
this will store the DW gradient encoding matrix into the Header::keyval() structure of header, under the key 'dw_scheme'.
Definition at line 155 of file gradient.h.
void MR::DWI::stash_DW_scheme | ( | Header & | header, |
const MatrixType & | grad | ||
) |
'stash' the DW gradient table
Store the used DW gradient table to Header::keyval() key 'prior_dw_scheme', and delete the key 'dw_scheme' if it exists. This means that the scheme will no longer be identified by function parse_DW_scheme(), but still resides within the header data and can be extracted manually. This should be used when diffusion-weighted images are used to generate something that is not diffusion_weighted volumes.
Definition at line 212 of file gradient.h.
|
inline |
|
inline |
|
inline |
|
extern |
|
extern |
|
extern |