Developer documentation
Version 3.0.3-105-gd3941f44
MR::PhaseEncoding Namespace Reference

Functions

template<class MatrixType >
void check (const MatrixType &PE)
 check that a phase-encoding table is valid More...
 
template<class MatrixType , class HeaderType >
void check (const MatrixType &PE, const HeaderType &header)
 check that the PE scheme matches the DWI data in header More...
 
template<class MatrixType >
void set_scheme (Header &header, const MatrixType &PE)
 store the phase encoding matrix in a header More...
 
void clear_scheme (Header &header)
 clear the phase encoding matrix from a header More...
 
Eigen::MatrixXd parse_scheme (const Header &)
 parse the phase encoding matrix from a header More...
 
Eigen::MatrixXd get_scheme (const Header &)
 get a phase encoding matrix More...
 
template<class MatrixType >
void scheme2eddy (const MatrixType &PE, Eigen::MatrixXd &config, Eigen::Array< int, Eigen::Dynamic, 1 > &indices)
 Convert a phase-encoding scheme into the EDDY config / indices format. More...
 
Eigen::MatrixXd eddy2scheme (const Eigen::MatrixXd &, const Eigen::Array< int, Eigen::Dynamic, 1 > &)
 Convert phase-encoding infor from the EDDY config / indices format into a standard scheme. More...
 
template<class MatrixType , class HeaderType >
Eigen::MatrixXd transform_for_image_load (const MatrixType &pe_scheme, const HeaderType &H)
 Modifies a phase encoding scheme if being imported alongside a non-RAS image. More...
 
template<class MatrixType , class HeaderType >
Eigen::MatrixXd transform_for_nifti_write (const MatrixType &pe_scheme, const HeaderType &H)
 Modifies a phase encoding scheme if being exported alongside a NIfTI image. More...
 
template<class MatrixType , class HeaderType >
void save (const MatrixType &PE, const HeaderType &header, const std::string &path)
 Save a phase-encoding scheme to file. More...
 
template<class MatrixType , class HeaderType >
void save_eddy (const MatrixType &PE, const HeaderType &header, const std::string &config_path, const std::string &index_path)
 Save a phase-encoding scheme to EDDY format config / index files. More...
 
void export_commandline (const Header &)
 Save the phase-encoding scheme from a header to file depending on command-line options. More...
 
template<class HeaderType >
Eigen::MatrixXd load (const std::string &path, const HeaderType &header)
 Load a phase-encoding scheme from a matrix text file. More...
 
template<class HeaderType >
Eigen::MatrixXd load_eddy (const std::string &config_path, const std::string &index_path, const HeaderType &header)
 Load a phase-encoding scheme from an EDDY-format config / indices file pair. More...
 

Variables

const App::OptionGroup ImportOptions
 
const App::OptionGroup SelectOptions
 
const App::OptionGroup ExportOptions
 

Function Documentation

◆ check() [1/2]

template<class MatrixType >
void MR::PhaseEncoding::check ( const MatrixType &  PE)

check that a phase-encoding table is valid

Definition at line 46 of file phase_encoding.h.

◆ check() [2/2]

template<class MatrixType , class HeaderType >
void MR::PhaseEncoding::check ( const MatrixType &  PE,
const HeaderType &  header 
)

check that the PE scheme matches the DWI data in header

Definition at line 66 of file phase_encoding.h.

◆ clear_scheme()

void MR::PhaseEncoding::clear_scheme ( Header header)

clear the phase encoding matrix from a header

this will delete any trace of phase encoding information from the Header::keyval() structure of header.

◆ eddy2scheme()

Eigen::MatrixXd MR::PhaseEncoding::eddy2scheme ( const Eigen::MatrixXd &  ,
const Eigen::Array< int, Eigen::Dynamic, 1 > &   
)

Convert phase-encoding infor from the EDDY config / indices format into a standard scheme.

◆ export_commandline()

void MR::PhaseEncoding::export_commandline ( const Header )

Save the phase-encoding scheme from a header to file depending on command-line options.

◆ get_scheme()

Eigen::MatrixXd MR::PhaseEncoding::get_scheme ( const Header )

get a phase encoding matrix

get a valid phase-encoding matrix, either from files specified at the command-line, or from the contents of the image header.

◆ load()

template<class HeaderType >
Eigen::MatrixXd MR::PhaseEncoding::load ( const std::string &  path,
const HeaderType &  header 
)

Load a phase-encoding scheme from a matrix text file.

Definition at line 308 of file phase_encoding.h.

◆ load_eddy()

template<class HeaderType >
Eigen::MatrixXd MR::PhaseEncoding::load_eddy ( const std::string &  config_path,
const std::string &  index_path,
const HeaderType &  header 
)

Load a phase-encoding scheme from an EDDY-format config / indices file pair.

Definition at line 321 of file phase_encoding.h.

◆ parse_scheme()

Eigen::MatrixXd MR::PhaseEncoding::parse_scheme ( const Header )

parse the phase encoding matrix from a header

extract the phase encoding matrix stored in the header if one is present. This is expected to be stored in the Header::keyval() structure, under the key 'pe_scheme'. Alternatively, if the phase encoding direction and bandwidth is fixed for all volumes in the series, this information may be stored using the keys 'PhaseEncodingDirection' and 'TotalReadoutTime'.

◆ save()

template<class MatrixType , class HeaderType >
void MR::PhaseEncoding::save ( const MatrixType &  PE,
const HeaderType &  header,
const std::string &  path 
)

Save a phase-encoding scheme to file.

Definition at line 273 of file phase_encoding.h.

◆ save_eddy()

template<class MatrixType , class HeaderType >
void MR::PhaseEncoding::save_eddy ( const MatrixType &  PE,
const HeaderType &  header,
const std::string &  config_path,
const std::string &  index_path 
)

Save a phase-encoding scheme to EDDY format config / index files.

Definition at line 290 of file phase_encoding.h.

◆ scheme2eddy()

template<class MatrixType >
void MR::PhaseEncoding::scheme2eddy ( const MatrixType &  PE,
Eigen::MatrixXd &  config,
Eigen::Array< int, Eigen::Dynamic, 1 > &  indices 
)

Convert a phase-encoding scheme into the EDDY config / indices format.

Definition at line 160 of file phase_encoding.h.

◆ set_scheme()

template<class MatrixType >
void MR::PhaseEncoding::set_scheme ( Header header,
const MatrixType &  PE 
)

store the phase encoding matrix in a header

this will store the phase encoding matrix into the Header::keyval() structure of header.

  • If the phase encoding direction and/or total readout time varies between volumes, then the information will be stored in field "pe_scheme"; if not, it will instead be stored in fields "PhaseEncodingDirection" and "TotalReadoutTime"

Definition at line 90 of file phase_encoding.h.

◆ transform_for_image_load()

template<class MatrixType , class HeaderType >
Eigen::MatrixXd MR::PhaseEncoding::transform_for_image_load ( const MatrixType &  pe_scheme,
const HeaderType &  H 
)

Modifies a phase encoding scheme if being imported alongside a non-RAS image.

Definition at line 199 of file phase_encoding.h.

◆ transform_for_nifti_write()

template<class MatrixType , class HeaderType >
Eigen::MatrixXd MR::PhaseEncoding::transform_for_nifti_write ( const MatrixType &  pe_scheme,
const HeaderType &  H 
)

Modifies a phase encoding scheme if being exported alongside a NIfTI image.

Definition at line 227 of file phase_encoding.h.

Variable Documentation

◆ ExportOptions

const App::OptionGroup MR::PhaseEncoding::ExportOptions
extern

◆ ImportOptions

const App::OptionGroup MR::PhaseEncoding::ImportOptions
extern

◆ SelectOptions

const App::OptionGroup MR::PhaseEncoding::SelectOptions
extern