Developer documentation
Version 3.0.3-105-gd3941f44
MR Namespace Reference

Namespaces

namespace  Adapter
 
namespace  Algo
 
namespace  App
 
namespace  Axes
 
namespace  ByteOrder
 
namespace  ColourMap
 
namespace  Connectome
 
namespace  DWI
 
namespace  File
 
namespace  Filter
 
namespace  Fixel
 
namespace  Formats
 Classes responsible for handling of specific image formats.
 
namespace  GUI
 
namespace  Helper
 
namespace  ImageIO
 Classes responsible for actual image loading & writing.
 
namespace  Interp
 
namespace  Math
 
namespace  Path
 
namespace  Peaks
 
namespace  PhaseEncoding
 
namespace  Raw
 
namespace  Registration
 
namespace  SignalHandler
 
namespace  Stats
 
namespace  Stride
 Functions to handle the memory layout of images.
 
namespace  Surface
 
namespace  Thread
 

Classes

class  BitSet
 a class for storing bitwise information More...
 
class  CancelException
 
struct  compare_ptr_contents
 
struct  container_cast
 
class  container_value_type
 Get the underlying scalar value type for both std:: containers and Eigen. More...
 
class  container_value_type< Cont, typename std::enable_if< is_eigen_type< Cont >::value, int >::type >
 
class  copy_ptr
 
class  DataType
 
class  deque
 
class  deque< X, 0 >
 
class  Exception
 
class  Header
 
class  Image
 functions and classes related to image data input/output More...
 
class  IntervalTimer
 
class  InvalidFixelDirectoryException
 
class  InvalidImageException
 
struct  is_complex
 check whether type is complex: More...
 
struct  is_complex< std::complex< ValueType > >
 
struct  is_data_type
 check whether type is compatible with MRtrix3's file IO backend: More...
 
class  is_eigen_type
 convenience functions for SFINAE on std:: / Eigen containers More...
 
class  Iterator
 a dummy image to iterate over, useful for multi-threaded looping. More...
 
class  Iterator_loop
 
class  LogLevelLatch
 
struct  LoopAlongAxes
 
struct  LoopAlongAxesProgress
 
struct  LoopAlongAxisRange
 
struct  LoopAlongAxisRangeProgress
 
struct  LoopAlongDynamicAxes
 
struct  LoopAlongDynamicAxesProgress
 
struct  LoopAlongSingleAxis
 
struct  LoopAlongSingleAxisProgress
 
struct  LoopAlongStaticAxes
 
struct  LoopAlongStaticAxesProgress
 
struct  max_digits
 
struct  max_digits< X, typename std::enable_if< std::is_fundamental< typename X::Scalar >::value, int >::type >
 
struct  max_digits< X, typename std::enable_if< std::is_fundamental< typename X::value_type >::value &&!std::is_fundamental< typename X::Scalar >::value, int >::type >
 
struct  max_digits< X, typename std::enable_if< std::is_fundamental< X >::value, int >::type >
 
class  Min_mem_array
 
class  NeighbourhoodIterator
 a dummy image to iterate over a certain neighbourhood, useful for multi-threaded looping. More...
 
class  ProgressBar
 implements a progress meter to provide feedback to the user More...
 
class  Random_loop
 
class  Random_sparse_loop
 
class  Timer
 
class  Transform
 
class  vector
 
class  vector< X, 0 >
 
class  Voxel2Vector
 

Typedefs

using float32 = float
 
using float64 = double
 
using cdouble = std::complex< double >
 
using cfloat = std::complex< float >
 
using default_type = double
 the default type used throughout MRtrix More...
 
using transform_type = Eigen::Transform< default_type, 3, Eigen::AffineCompact >
 the type for the affine transform of an image: More...
 
using KeyValues = std::map< std::string, std::string >
 used in various places for storing key-value pairs More...
 

Functions

template<class InputImageType , class OutputImageType >
void copy (InputImageType &&source, OutputImageType &&destination, size_t from_axis=0, size_t to_axis=std::numeric_limits< size_t >::max())
 
template<class InputImageType , class OutputImageType >
void copy_with_progress (InputImageType &&source, OutputImageType &&destination, size_t from_axis=0, size_t to_axis=std::numeric_limits< size_t >::max())
 
template<class InputImageType , class OutputImageType >
void copy_with_progress_message (const std::string &message, InputImageType &&source, OutputImageType &&destination, size_t from_axis=0, size_t to_axis=std::numeric_limits< size_t >::max())
 
FORCE_INLINE LoopAlongAxes Loop ()
 
FORCE_INLINE LoopAlongAxesProgress Loop (const std::string &progress_message)
 
FORCE_INLINE LoopAlongSingleAxis Loop (size_t axis)
 
FORCE_INLINE LoopAlongSingleAxisProgress Loop (const std::string &progress_message, size_t axis)
 
FORCE_INLINE LoopAlongAxisRange Loop (size_t axis_from, size_t axis_to)
 
FORCE_INLINE LoopAlongAxisRangeProgress Loop (const std::string &progress_message, size_t axis_from, size_t axis_to)
 
FORCE_INLINE LoopAlongStaticAxes Loop (std::initializer_list< size_t > axes)
 
FORCE_INLINE LoopAlongStaticAxesProgress Loop (const std::string &progress_message, std::initializer_list< size_t > axes)
 
FORCE_INLINE LoopAlongDynamicAxes Loop (const vector< size_t > &axes)
 
FORCE_INLINE LoopAlongDynamicAxesProgress Loop (const std::string &progress_message, const vector< size_t > &axes)
 
template<class ImageType >
FORCE_INLINE LoopAlongDynamicAxes Loop (const ImageType &source, size_t axis_from=0, size_t axis_to=std::numeric_limits< size_t >::max(), typename std::enable_if< std::is_class< ImageType >::value &&!std::is_same< ImageType, std::string >::value, int >::type=0)
 
template<class ImageType >
FORCE_INLINE LoopAlongDynamicAxesProgress Loop (const std::string &progress_message, const ImageType &source, size_t axis_from=0, size_t axis_to=std::numeric_limits< size_t >::max(), typename std::enable_if< std::is_class< ImageType >::value &&!std::is_same< ImageType, std::string >::value, int >::type=0)
 
template<class ImageType >
void min_max (ImageType &in, typename ImageType::value_type &min, typename ImageType::value_type &max, size_t from_axis=0, size_t to_axis=std::numeric_limits< size_t >::max())
 
template<class ImageType , class MaskType >
void min_max (ImageType &in, MaskType &mask, typename ImageType::value_type &min, typename ImageType::value_type &max, size_t from_axis=0, size_t to_axis=std::numeric_limits< size_t >::max())
 
template<class HeaderType >
RandomThreadedLoopRunOuter< decltype(Loop(vector< size_t >()))> RandomThreadedLoop (const HeaderType &source, const vector< size_t > &outer_axes, const vector< size_t > &inner_axes)
 
template<class HeaderType >
RandomThreadedLoopRunOuter< decltype(Loop(vector< size_t >()))> RandomThreadedLoop (const HeaderType &source, const vector< size_t > &axes, size_t num_inner_axes=1)
 
template<class HeaderType >
RandomThreadedLoopRunOuter< decltype(Loop(vector< size_t >()))> RandomThreadedLoop (const HeaderType &source, size_t from_axis=0, size_t to_axis=std::numeric_limits< size_t >::max(), size_t num_inner_axes=1)
 
template<class HeaderType >
RandomThreadedLoopRunOuter< decltype(Loop("", vector< size_t >()))> RandomThreadedLoop (const std::string &progress_message, const HeaderType &source, const vector< size_t > &outer_axes, const vector< size_t > &inner_axes)
 
template<class HeaderType >
RandomThreadedLoopRunOuter< decltype(Loop("", vector< size_t >()))> RandomThreadedLoop (const std::string &progress_message, const HeaderType &source, const vector< size_t > &axes, size_t num_inner_axes=1)
 
template<class HeaderType >
RandomThreadedLoopRunOuter< decltype(Loop("", vector< size_t >()))> RandomThreadedLoop (const std::string &progress_message, const HeaderType &source, size_t from_axis=0, size_t to_axis=std::numeric_limits< size_t >::max(), size_t num_inner_axes=1)
 
template<class HeaderType >
StochasticThreadedLoopRunOuter< decltype(Loop(vector< size_t >()))> StochasticThreadedLoop (const HeaderType &source, const vector< size_t > &outer_axes, const vector< size_t > &inner_axes)
 
template<class HeaderType >
StochasticThreadedLoopRunOuter< decltype(Loop(vector< size_t >()))> StochasticThreadedLoop (const HeaderType &source, const vector< size_t > &axes, size_t num_inner_axes=1)
 
template<class HeaderType >
StochasticThreadedLoopRunOuter< decltype(Loop(vector< size_t >()))> StochasticThreadedLoop (const HeaderType &source, size_t from_axis=0, size_t to_axis=std::numeric_limits< size_t >::max(), size_t num_inner_axes=1)
 
template<class HeaderType >
StochasticThreadedLoopRunOuter< decltype(Loop("", vector< size_t >()))> StochasticThreadedLoop (const std::string &progress_message, const HeaderType &source, const vector< size_t > &outer_axes, const vector< size_t > &inner_axes)
 
template<class HeaderType >
StochasticThreadedLoopRunOuter< decltype(Loop("", vector< size_t >()))> StochasticThreadedLoop (const std::string &progress_message, const HeaderType &source, const vector< size_t > &axes, size_t num_inner_axes=1)
 
template<class HeaderType >
StochasticThreadedLoopRunOuter< decltype(Loop("", vector< size_t >()))> StochasticThreadedLoop (const std::string &progress_message, const HeaderType &source, size_t from_axis=0, size_t to_axis=std::numeric_limits< size_t >::max(), size_t num_inner_axes=1)
 
template<class InputImageType , class OutputImageType >
void threaded_copy (InputImageType &source, OutputImageType &destination, const vector< size_t > &axes, size_t num_axes_in_thread=1)
 
template<class InputImageType , class OutputImageType >
void threaded_copy (InputImageType &source, OutputImageType &destination, size_t from_axis=0, size_t to_axis=std::numeric_limits< size_t >::max(), size_t num_axes_in_thread=1)
 
template<class InputImageType , class OutputImageType >
void threaded_copy_with_progress_message (const std::string &message, InputImageType &source, OutputImageType &destination, const vector< size_t > &axes, size_t num_axes_in_thread=1)
 
template<class InputImageType , class OutputImageType >
void threaded_copy_with_progress_message (const std::string &message, InputImageType &source, OutputImageType &destination, size_t from_axis=0, size_t to_axis=std::numeric_limits< size_t >::max(), size_t num_axes_in_thread=1)
 
template<class InputImageType , class OutputImageType >
void threaded_copy_with_progress (InputImageType &source, OutputImageType &destination, const vector< size_t > &axes, size_t num_axes_in_thread=1)
 
template<class InputImageType , class OutputImageType >
void threaded_copy_with_progress (InputImageType &source, OutputImageType &destination, size_t from_axis=0, size_t to_axis=std::numeric_limits< size_t >::max(), size_t num_axes_in_thread=1)
 
template<class HeaderType >
ThreadedLoopRunOuter< decltype(Loop(vector< size_t >()))> ThreadedLoop (const HeaderType &source, const vector< size_t > &outer_axes, const vector< size_t > &inner_axes)
 Multi-threaded loop object. More...
 
template<class HeaderType >
ThreadedLoopRunOuter< decltype(Loop(vector< size_t >()))> ThreadedLoop (const HeaderType &source, const vector< size_t > &axes, size_t num_inner_axes=1)
 Multi-threaded loop object. More...
 
template<class HeaderType >
ThreadedLoopRunOuter< decltype(Loop(vector< size_t >()))> ThreadedLoop (const HeaderType &source, size_t from_axis=0, size_t to_axis=std::numeric_limits< size_t >::max(), size_t num_inner_axes=1)
 Multi-threaded loop object. More...
 
template<class HeaderType >
ThreadedLoopRunOuter< decltype(Loop("", vector< size_t >()))> ThreadedLoop (const std::string &progress_message, const HeaderType &source, const vector< size_t > &outer_axes, const vector< size_t > &inner_axes)
 Multi-threaded loop object. More...
 
template<class HeaderType >
ThreadedLoopRunOuter< decltype(Loop("", vector< size_t >()))> ThreadedLoop (const std::string &progress_message, const HeaderType &source, const vector< size_t > &axes, size_t num_inner_axes=1)
 Multi-threaded loop object. More...
 
template<class HeaderType >
ThreadedLoopRunOuter< decltype(Loop("", vector< size_t >()))> ThreadedLoop (const std::string &progress_message, const HeaderType &source, size_t from_axis=0, size_t to_axis=std::numeric_limits< size_t >::max(), size_t num_inner_axes=1)
 Multi-threaded loop object. More...
 
template<class F , class T >
void apply (F &&f, T &&t)
 invoke f(x) for each entry in t More...
 
template<typename F , typename T >
auto unpack (F &&f, T &&t) -> decltype(Unpack< ::std::tuple_size< typename ::std::decay< T >::type >::value >::unpack(::std::forward< F >(f), ::std::forward< T >(t)))
 if t is a tuple of elements a..., invoke f(a...) More...
 
void display_exception_cmdline (const Exception &E, int log_level)
 
void cmdline_print_func (const std::string &msg)
 
void cmdline_report_to_user_func (const std::string &msg, int type)
 
void check_app_exit_code ()
 
 CHECK_MEM_ALIGN (Header)
 
Header concatenate (const vector< Header > &headers, const size_t axis, const bool permit_datatype_mismatch)
 
template<class ImageType >
std::enable_if< is_adapter_type< typenamestd::remove_reference< ImageType >::type >::value, std::string >::type save (ImageType &&x, const std::string &filename, bool use_multi_threading=true)
 save contents of an existing image to file (for debugging only) More...
 
template<class ImageType >
std::enable_if< is_pure_image< typenamestd::remove_reference< ImageType >::type >::value, std::string >::type save (ImageType &&x, const std::string &filename, bool use_multi_threading=true)
 save contents of an existing image to file (for debugging only) More...
 
template<class ImageType >
enable_if_image_type< ImageType, void >::type display (ImageType &x)
 display the contents of an image in MRView (for debugging only) More...
 
template<class HeaderType1 , class HeaderType2 >
void check_headers (HeaderType1 &in1, HeaderType2 &in2)
 check image headers are the same (dimensions, spacing & transform) More...
 
template<class ImageType1 , class ImageType2 >
void check_images_abs (ImageType1 &in1, ImageType2 &in2, const double tol=0.0)
 check images are the same within a absolute tolerance More...
 
template<class ImageType1 , class ImageType2 >
void check_images_frac (ImageType1 &in1, ImageType2 &in2, const double tol=0.0)
 check images are the same within a fractional tolerance More...
 
template<class ImageType1 , class ImageType2 , class ImageTypeTol >
void check_images_tolimage (ImageType1 &in1, ImageType2 &in2, ImageTypeTol &tol)
 check images are the same within a tolerance defined by a third image More...
 
template<class ImageType1 , class ImageType2 >
void check_images_voxel (ImageType1 &in1, ImageType2 &in2, const double tol=0.0)
 check images are the same within a fractional tolerance relative to the maximum value in the voxel More...
 
template<class HeaderType1 , class HeaderType2 >
void check_keyvals (const HeaderType1 &in1, const HeaderType2 &in2)
 check headers contain the same key-value entries More...
 
template<class HeaderType1 , class HeaderType2 >
bool headers_match (HeaderType1 &in1, HeaderType2 &in2)
 check image headers are the same (dimensions, spacing & transform) More...
 
template<class ImageType1 , class ImageType2 >
bool images_match_abs (ImageType1 &in1, ImageType2 &in2, const double tol=0.0)
 check images are the same within a absolute tolerance More...
 
template<typename ValueType >
std::enable_if<!is_data_type< ValueType >::value, void >::type __set_fetch_store_functions (std::function< ValueType(const void *, size_t, default_type, default_type)> &, std::function< void(ValueType, void *, size_t, default_type, default_type)> &, DataType)
 
template<typename ValueType >
std::enable_if< is_data_type< ValueType >::value, void >::type __set_fetch_store_functions (std::function< ValueType(const void *, size_t, default_type, default_type)> &fetch_func, std::function< void(ValueType, void *, size_t, default_type, default_type)> &store_func, DataType datatype)
 
Eigen::Matrix< default_type, 8, 4 > get_cuboid_corners (const Eigen::Matrix< default_type, 4, 1 > &xzx1)
 
Eigen::Matrix< default_type, 8, 4 > get_bounding_box (const Header &header, const Eigen::Transform< default_type, 3, Eigen::Projective > &voxel2scanner)
 
Header compute_minimum_average_header (const vector< Header > &input_headers, const vector< Eigen::Transform< default_type, 3, Eigen::Projective > > &transform_header_with, int voxel_subsampling=1, Eigen::Matrix< default_type, 4, 1 > padding=Eigen::Matrix< default_type, 4, 1 >(1.0, 1.0, 1.0, 1.0))
 
template<class ImageType1 , class ImageType2 >
Header compute_minimum_average_header (const ImageType1 &im1, const ImageType2 &im2, Eigen::Transform< default_type, 3, Eigen::Projective > transform_1=Eigen::Transform< default_type, 3, Eigen::Projective >::Identity(), Eigen::Transform< default_type, 3, Eigen::Projective > transform_2=Eigen::Transform< default_type, 3, Eigen::Projective >::Identity(), Eigen::Matrix< default_type, 4, 1 > padding=Eigen::Matrix< default_type, 4, 1 >(1.0, 1.0, 1.0, 1.0), int voxel_subsampling=1)
 
template<typename Derived >
bool is_finite (const Eigen::MatrixBase< Derived > &x)
 check if all elements of an Eigen MatrixBase object are finite More...
 
template<typename Derived >
bool is_nan (const Eigen::MatrixBase< Derived > &x)
 check if all elements of an Eigen MatrixBase object are a number More...
 
template<class MatrixType >
void save_matrix (const MatrixType &M, const std::string &filename, const KeyValues &keyvals=KeyValues(), const bool add_to_command_history=true)
 write the matrix M to file More...
 
template<class ValueType = default_type>
vector< vector< ValueType > > load_matrix_2D_vector (const std::string &filename, vector< std::string > *comments=nullptr)
 read matrix data into a 2D vector filename More...
 
template<class ValueType = default_type>
Eigen::Matrix< ValueType, Eigen::Dynamic, Eigen::Dynamic > load_matrix (const std::string &filename)
 read matrix data into an Eigen::Matrix filename More...
 
template<class ValueType = default_type>
Eigen::Matrix< ValueType, Eigen::Dynamic, Eigen::Dynamic > parse_matrix (const std::string &spec)
 read matrix data from a text string spec More...
 
template<class VectorType >
transform_type load_transform (const std::string &filename, VectorType &centre)
 read matrix data from filename into an Eigen::Tranform class More...
 
transform_type load_transform (const std::string &filename)
 
void save_transform (const transform_type &M, const std::string &filename, const KeyValues &keyvals=KeyValues(), const bool add_to_command_history=true)
 write the transform M to file More...
 
template<class Derived >
void save_transform (const transform_type &M, const Eigen::MatrixBase< Derived > &centre, const std::string &filename, const KeyValues &keyvals=KeyValues(), const bool add_to_command_history=true)
 
template<class VectorType >
void save_vector (const VectorType &V, const std::string &filename, const KeyValues &keyvals=KeyValues(), const bool add_to_command_history=true)
 write the vector V to file More...
 
template<class ValueType = default_type>
Eigen::Matrix< ValueType, Eigen::Dynamic, 1 > load_vector (const std::string &filename)
 read the vector data from filename More...
 
std::istream & getline (std::istream &stream, std::string &string)
 read a line from the stream More...
 
std::string & add_line (std::string &original, const std::string &new_line)
 add a line to a string, taking care of inserting a newline if needed More...
 
std::string shorten (const std::string &text, size_t longest=40, size_t prefix=10)
 convert a long string to 'beginningofstring...endofstring' for display More...
 
std::string lowercase (const std::string &string)
 return lowercase version of string More...
 
std::string uppercase (const std::string &string)
 return uppercase version of string More...
 
std::string printf (const char *format,...)
 
std::string strip (const std::string &string, const std::string &ws={" \0\t\r\n", 5}, bool left=true, bool right=true)
 
std::string unquote (const std::string &string)
 Remove quotation marks only if surrounding entire string. More...
 
void replace (std::string &string, char orig, char final)
 
void replace (std::string &str, const std::string &from, const std::string &to)
 
vector< std::string > split (const std::string &string, const char *delimiters=" \t\n", bool ignore_empty_fields=false, size_t num=std::numeric_limits< size_t >::max())
 
vector< std::string > split_lines (const std::string &string, bool ignore_empty_fields=true, size_t num=std::numeric_limits< size_t >::max())
 
bool match (const std::string &pattern, const std::string &text, bool ignore_case=false)
 
size_t char_is_dash (const char *arg)
 match a dash or any Unicode character that looks like one More...
 
size_t is_dash (const std::string &arg)
 match whole string to a dash or any Unicode character that looks like one More...
 
bool consume_dash (const char *&arg)
 match current character to a dash or any Unicode character that looks like one More...
 
template<class T >
std::string str (const T &value, int precision=0)
 
template<class T >
to (const std::string &string)
 
template<>
bool to< bool > (const std::string &string)
 
template<>
std::string str< cfloat > (const cfloat &value, int precision)
 
template<>
cfloat to< cfloat > (const std::string &string)
 
template<>
std::string str< cdouble > (const cdouble &value, int precision)
 
template<>
cdouble to< cdouble > (const std::string &string)
 
vector< default_typeparse_floats (const std::string &spec)
 
template<typename IntType >
vector< IntType > parse_ints (const std::string &spec, const IntType last=std::numeric_limits< IntType >::max())
 
std::string join (const vector< std::string > &V, const std::string &delimiter)
 
template<typename T >
std::string join (const vector< T > &V, const std::string &delimiter)
 
std::string join (const char *const *null_terminated_array, const std::string &delimiter)
 
template<typename X , typename... Args>
std::shared_ptr< X > make_shared (Args &&... args)
 
template<typename X , typename... Args>
std::unique_ptr< X > make_unique (Args &&... args)
 
template<typename X >
constexpr std::enable_if< std::is_arithmetic< X >::value &&std::is_unsigned< X >::value, X >::type abs (X x)
 
template<typename X >
constexpr std::enable_if< std::is_arithmetic< X >::value &&!std::is_unsigned< X >::value, X >::type abs (X x)
 

Variables

void(* print )(const std::string &msg)
 print primary output to stdout as-is. More...
 
void(* report_to_user_func )(const std::string &msg, int type)
 display error, warning, debug, etc. message to user More...
 
constexpr int SpatiallyContiguous = -1
 
constexpr size_t malloc_align = alignof (::max_align_t)
 
constexpr default_type NaN = std::numeric_limits<default_type>::quiet_NaN()
 
constexpr default_type Inf = std::numeric_limits<default_type>::infinity()
 

Typedef Documentation

◆ cdouble

using MR::cdouble = typedef std::complex<double>

Definition at line 217 of file types.h.

◆ cfloat

using MR::cfloat = typedef std::complex<float>

Definition at line 218 of file types.h.

◆ default_type

using MR::default_type = typedef double

the default type used throughout MRtrix

Definition at line 228 of file types.h.

◆ float32

using MR::float32 = typedef float

Definition at line 215 of file types.h.

◆ float64

using MR::float64 = typedef double

Definition at line 216 of file types.h.

◆ KeyValues

using MR::KeyValues = typedef std::map<std::string, std::string>

used in various places for storing key-value pairs

Definition at line 238 of file types.h.

◆ transform_type

using MR::transform_type = typedef Eigen::Transform<default_type, 3, Eigen::AffineCompact>

the type for the affine transform of an image:

Definition at line 234 of file types.h.

Function Documentation

◆ __set_fetch_store_functions() [1/2]

template<typename ValueType >
std::enable_if<!is_data_type< ValueType >::value, void >::type MR::__set_fetch_store_functions ( std::function< ValueType(const void *, size_t, default_type, default_type)> &  fetch_func,
std::function< void(ValueType, void *, size_t, default_type, default_type)> &  store_func,
DataType  datatype 
)

Definition at line 28 of file fetch_store.h.

◆ __set_fetch_store_functions() [2/2]

template<typename ValueType >
std::enable_if< is_data_type< ValueType >::value, void >::type MR::__set_fetch_store_functions ( std::function< ValueType(const void *, size_t, default_type, default_type)> &  fetch_func,
std::function< void(ValueType, void *, size_t, default_type, default_type)> &  store_func,
DataType  datatype 
)

Definition at line 28 of file fetch_store.h.

◆ abs() [1/2]

template<typename X >
constexpr std::enable_if< std::is_arithmetic< X >::value &&std::is_unsigned< X >::value, X >::type MR::abs ( x)
inlineconstexpr

Definition at line 297 of file types.h.

◆ abs() [2/2]

template<typename X >
constexpr std::enable_if< std::is_arithmetic< X >::value &&!std::is_unsigned< X >::value, X >::type MR::abs ( x)
inlineconstexpr

Definition at line 299 of file types.h.

◆ add_line()

std::string & MR::add_line ( std::string &  original,
const std::string &  new_line 
)
inline

add a line to a string, taking care of inserting a newline if needed

Definition at line 81 of file mrtrix.h.

◆ apply()

template<class F , class T >
void MR::apply ( F &&  f,
T &&  t 
)
inline

invoke f(x) for each entry in t

Definition at line 82 of file apply.h.

◆ char_is_dash()

size_t MR::char_is_dash ( const char *  arg)
inline

match a dash or any Unicode character that looks like one

Note
This returns the number of bytes taken up by the matched UTF8 character, zero if no match.

Definition at line 205 of file mrtrix.h.

◆ check_app_exit_code()

void MR::check_app_exit_code ( )

◆ check_headers()

template<class HeaderType1 , class HeaderType2 >
void MR::check_headers ( HeaderType1 &  in1,
HeaderType2 &  in2 
)
inline

check image headers are the same (dimensions, spacing & transform)

Definition at line 30 of file image_diff.h.

◆ check_images_abs()

template<class ImageType1 , class ImageType2 >
void MR::check_images_abs ( ImageType1 &  in1,
ImageType2 &  in2,
const double  tol = 0.0 
)
inline

check images are the same within a absolute tolerance

Definition at line 51 of file image_diff.h.

◆ check_images_frac()

template<class ImageType1 , class ImageType2 >
void MR::check_images_frac ( ImageType1 &  in1,
ImageType2 &  in2,
const double  tol = 0.0 
)
inline

check images are the same within a fractional tolerance

Definition at line 65 of file image_diff.h.

◆ check_images_tolimage()

template<class ImageType1 , class ImageType2 , class ImageTypeTol >
void MR::check_images_tolimage ( ImageType1 &  in1,
ImageType2 &  in2,
ImageTypeTol &  tol 
)
inline

check images are the same within a tolerance defined by a third image

Definition at line 78 of file image_diff.h.

◆ check_images_voxel()

template<class ImageType1 , class ImageType2 >
void MR::check_images_voxel ( ImageType1 &  in1,
ImageType2 &  in2,
const double  tol = 0.0 
)
inline

check images are the same within a fractional tolerance relative to the maximum value in the voxel

Definition at line 92 of file image_diff.h.

◆ check_keyvals()

template<class HeaderType1 , class HeaderType2 >
void MR::check_keyvals ( const HeaderType1 &  in1,
const HeaderType2 &  in2 
)
inline

check headers contain the same key-value entries

Definition at line 113 of file image_diff.h.

◆ CHECK_MEM_ALIGN()

MR::CHECK_MEM_ALIGN ( Header  )

◆ cmdline_print_func()

void MR::cmdline_print_func ( const std::string &  msg)

◆ cmdline_report_to_user_func()

void MR::cmdline_report_to_user_func ( const std::string &  msg,
int  type 
)

◆ compute_minimum_average_header() [1/2]

template<class ImageType1 , class ImageType2 >
Header MR::compute_minimum_average_header ( const ImageType1 &  im1,
const ImageType2 &  im2,
Eigen::Transform< default_type, 3, Eigen::Projective >  transform_1 = Eigen::Transform<default_type, 3, Eigen::Projective>::Identity(),
Eigen::Transform< default_type, 3, Eigen::Projective >  transform_2 = Eigen::Transform<default_type, 3, Eigen::Projective>::Identity(),
Eigen::Matrix< default_type, 4, 1 >  padding = Eigen::Matrix<default_type, 4, 1>(1.0, 1.0, 1.0, 1.0),
int  voxel_subsampling = 1 
)

Definition at line 46 of file average_space.h.

◆ compute_minimum_average_header() [2/2]

Header MR::compute_minimum_average_header ( const vector< Header > &  input_headers,
const vector< Eigen::Transform< default_type, 3, Eigen::Projective > > &  transform_header_with,
int  voxel_subsampling = 1,
Eigen::Matrix< default_type, 4, 1 >  padding = Eigen::Matrixdefault_type, 4, 1 >(1.0, 1.0, 1.0, 1.0) 
)

◆ concatenate()

Header MR::concatenate ( const vector< Header > &  headers,
const size_t  axis,
const bool  permit_datatype_mismatch 
)

◆ consume_dash()

bool MR::consume_dash ( const char *&  arg)
inline

match current character to a dash or any Unicode character that looks like one

Note
If a match is found, this also advances the arg pointer to the next character in the string, which could be one or several bytes along depending on the width of the UTF8 character identified.

Definition at line 236 of file mrtrix.h.

◆ copy()

template<class InputImageType , class OutputImageType >
void MR::copy ( InputImageType &&  source,
OutputImageType &&  destination,
size_t  from_axis = 0,
size_t  to_axis = std::numeric_limits<size_t>::max() 
)

Definition at line 27 of file copy.h.

◆ copy_with_progress()

template<class InputImageType , class OutputImageType >
void MR::copy_with_progress ( InputImageType &&  source,
OutputImageType &&  destination,
size_t  from_axis = 0,
size_t  to_axis = std::numeric_limits<size_t>::max() 
)

Definition at line 36 of file copy.h.

◆ copy_with_progress_message()

template<class InputImageType , class OutputImageType >
void MR::copy_with_progress_message ( const std::string &  message,
InputImageType &&  source,
OutputImageType &&  destination,
size_t  from_axis = 0,
size_t  to_axis = std::numeric_limits<size_t>::max() 
)

Definition at line 44 of file copy.h.

◆ display()

template<class ImageType >
enable_if_image_type< ImageType, void >::type MR::display ( ImageType &  x)

display the contents of an image in MRView (for debugging only)

Definition at line 541 of file image.h.

◆ display_exception_cmdline()

void MR::display_exception_cmdline ( const Exception E,
int  log_level 
)

◆ get_bounding_box()

Eigen::Matrix< default_type, 8, 4 > MR::get_bounding_box ( const Header header,
const Eigen::Transform< default_type, 3, Eigen::Projective > &  voxel2scanner 
)

◆ get_cuboid_corners()

Eigen::Matrix< default_type, 8, 4 > MR::get_cuboid_corners ( const Eigen::Matrix< default_type, 4, 1 > &  xzx1)

◆ getline()

std::istream & MR::getline ( std::istream &  stream,
std::string &  string 
)
inline

read a line from the stream

a replacement for the standard getline() function that also discards carriage returns if found at the end of the line.

Definition at line 47 of file mrtrix.h.

◆ headers_match()

template<class HeaderType1 , class HeaderType2 >
bool MR::headers_match ( HeaderType1 &  in1,
HeaderType2 &  in2 
)
inline

check image headers are the same (dimensions, spacing & transform)

Definition at line 158 of file image_diff.h.

◆ images_match_abs()

template<class ImageType1 , class ImageType2 >
bool MR::images_match_abs ( ImageType1 &  in1,
ImageType2 &  in2,
const double  tol = 0.0 
)
inline

check images are the same within a absolute tolerance

Definition at line 172 of file image_diff.h.

◆ is_dash()

size_t MR::is_dash ( const std::string &  arg)
inline

match whole string to a dash or any Unicode character that looks like one

Definition at line 225 of file mrtrix.h.

◆ join() [1/3]

std::string MR::join ( const char *const *  null_terminated_array,
const std::string &  delimiter 
)
inline

Definition at line 521 of file mrtrix.h.

◆ join() [2/3]

std::string MR::join ( const vector< std::string > &  V,
const std::string &  delimiter 
)
inline

Definition at line 498 of file mrtrix.h.

◆ join() [3/3]

template<typename T >
std::string MR::join ( const vector< T > &  V,
const std::string &  delimiter 
)
inline

Definition at line 510 of file mrtrix.h.

◆ load_matrix()

template<class ValueType = default_type>
Eigen::Matrix< ValueType, Eigen::Dynamic, Eigen::Dynamic > MR::load_matrix ( const std::string &  filename)

read matrix data into an Eigen::Matrix filename

Definition at line 196 of file math.h.

◆ load_matrix_2D_vector()

template<class ValueType = default_type>
vector< vector< ValueType > > MR::load_matrix_2D_vector ( const std::string &  filename,
vector< std::string > *  comments = nullptr 
)

read matrix data into a 2D vector filename

Definition at line 148 of file math.h.

◆ load_transform() [1/2]

transform_type MR::load_transform ( const std::string &  filename)
inline

Definition at line 281 of file math.h.

◆ load_transform() [2/2]

template<class VectorType >
transform_type MR::load_transform ( const std::string &  filename,
VectorType &  centre 
)
inline

read matrix data from filename into an Eigen::Tranform class

Definition at line 230 of file math.h.

◆ load_vector()

template<class ValueType = default_type>
Eigen::Matrix< ValueType, Eigen::Dynamic, 1 > MR::load_vector ( const std::string &  filename)

read the vector data from filename

Definition at line 327 of file math.h.

◆ lowercase()

std::string MR::lowercase ( const std::string &  string)
inline

return lowercase version of string

Definition at line 98 of file mrtrix.h.

◆ make_shared()

template<typename X , typename... Args>
std::shared_ptr< X > MR::make_shared ( Args &&...  args)
inline

Definition at line 283 of file types.h.

◆ make_unique()

template<typename X , typename... Args>
std::unique_ptr< X > MR::make_unique ( Args &&...  args)
inline

Definition at line 288 of file types.h.

◆ match()

bool MR::match ( const std::string &  pattern,
const std::string &  text,
bool  ignore_case = false 
)

◆ min_max() [1/2]

template<class ImageType , class MaskType >
void MR::min_max ( ImageType &  in,
MaskType &  mask,
typename ImageType::value_type &  min,
typename ImageType::value_type &  max,
size_t  from_axis = 0,
size_t  to_axis = std::numeric_limits<size_t>::max() 
)
inline

Definition at line 87 of file min_max.h.

◆ min_max() [2/2]

template<class ImageType >
void MR::min_max ( ImageType &  in,
typename ImageType::value_type &  min,
typename ImageType::value_type &  max,
size_t  from_axis = 0,
size_t  to_axis = std::numeric_limits<size_t>::max() 
)
inline

Definition at line 75 of file min_max.h.

◆ parse_floats()

vector< default_type > MR::parse_floats ( const std::string &  spec)

◆ parse_ints()

template<typename IntType >
vector< IntType > MR::parse_ints ( const std::string &  spec,
const IntType  last = std::numeric_limits<IntType>::max() 
)

Definition at line 422 of file mrtrix.h.

◆ parse_matrix()

template<class ValueType = default_type>
Eigen::Matrix< ValueType, Eigen::Dynamic, Eigen::Dynamic > MR::parse_matrix ( const std::string &  spec)

read matrix data from a text string spec

Definition at line 212 of file math.h.

◆ printf()

std::string MR::printf ( const char *  format,
  ... 
)
inline

Definition at line 116 of file mrtrix.h.

◆ RandomThreadedLoop() [1/6]

template<class HeaderType >
RandomThreadedLoopRunOuter< decltype(Loop(vector< size_t >()))> MR::RandomThreadedLoop ( const HeaderType &  source,
const vector< size_t > &  axes,
size_t  num_inner_axes = 1 
)
inline

Definition at line 220 of file random_threaded_loop.h.

◆ RandomThreadedLoop() [2/6]

template<class HeaderType >
RandomThreadedLoopRunOuter< decltype(Loop(vector< size_t >()))> MR::RandomThreadedLoop ( const HeaderType &  source,
const vector< size_t > &  outer_axes,
const vector< size_t > &  inner_axes 
)
inline

Definition at line 211 of file random_threaded_loop.h.

◆ RandomThreadedLoop() [3/6]

template<class HeaderType >
RandomThreadedLoopRunOuter< decltype(Loop(vector< size_t >()))> MR::RandomThreadedLoop ( const HeaderType &  source,
size_t  from_axis = 0,
size_t  to_axis = std::numeric_limits<size_t>::max(),
size_t  num_inner_axes = 1 
)
inline

Definition at line 228 of file random_threaded_loop.h.

◆ RandomThreadedLoop() [4/6]

template<class HeaderType >
RandomThreadedLoopRunOuter< decltype(Loop("", vector< size_t >()))> MR::RandomThreadedLoop ( const std::string &  progress_message,
const HeaderType &  source,
const vector< size_t > &  axes,
size_t  num_inner_axes = 1 
)
inline

Definition at line 248 of file random_threaded_loop.h.

◆ RandomThreadedLoop() [5/6]

template<class HeaderType >
RandomThreadedLoopRunOuter< decltype(Loop("", vector< size_t >()))> MR::RandomThreadedLoop ( const std::string &  progress_message,
const HeaderType &  source,
const vector< size_t > &  outer_axes,
const vector< size_t > &  inner_axes 
)
inline

Definition at line 239 of file random_threaded_loop.h.

◆ RandomThreadedLoop() [6/6]

template<class HeaderType >
RandomThreadedLoopRunOuter< decltype(Loop("", vector< size_t >()))> MR::RandomThreadedLoop ( const std::string &  progress_message,
const HeaderType &  source,
size_t  from_axis = 0,
size_t  to_axis = std::numeric_limits<size_t>::max(),
size_t  num_inner_axes = 1 
)
inline

Definition at line 259 of file random_threaded_loop.h.

◆ replace() [1/2]

void MR::replace ( std::string &  str,
const std::string &  from,
const std::string &  to 
)
inline

Definition at line 162 of file mrtrix.h.

◆ replace() [2/2]

void MR::replace ( std::string &  string,
char  orig,
char  final 
)
inline

Definition at line 156 of file mrtrix.h.

◆ save() [1/2]

template<class ImageType >
std::enable_if< is_adapter_type< typenamestd::remove_reference< ImageType >::type >::value, std::string >::type MR::save ( ImageType &&  x,
const std::string &  filename,
bool  use_multi_threading = true 
)

save contents of an existing image to file (for debugging only)

Definition at line 523 of file image.h.

◆ save() [2/2]

template<class ImageType >
std::enable_if< is_pure_image< typenamestd::remove_reference< ImageType >::type >::value, std::string >::type MR::save ( ImageType &&  x,
const std::string &  filename,
bool  use_multi_threading = true 
)

save contents of an existing image to file (for debugging only)

Definition at line 531 of file image.h.

◆ save_matrix()

template<class MatrixType >
void MR::save_matrix ( const MatrixType &  M,
const std::string &  filename,
const KeyValues keyvals = KeyValues(),
const bool  add_to_command_history = true 
)

write the matrix M to file

Definition at line 136 of file math.h.

◆ save_transform() [1/2]

template<class Derived >
void MR::save_transform ( const transform_type M,
const Eigen::MatrixBase< Derived > &  centre,
const std::string &  filename,
const KeyValues keyvals = KeyValues(),
const bool  add_to_command_history = true 
)
inline

Definition at line 300 of file math.h.

◆ save_transform() [2/2]

void MR::save_transform ( const transform_type M,
const std::string &  filename,
const KeyValues keyvals = KeyValues(),
const bool  add_to_command_history = true 
)
inline

write the transform M to file

Definition at line 288 of file math.h.

◆ save_vector()

template<class VectorType >
void MR::save_vector ( const VectorType &  V,
const std::string &  filename,
const KeyValues keyvals = KeyValues(),
const bool  add_to_command_history = true 
)

write the vector V to file

Definition at line 314 of file math.h.

◆ shorten()

std::string MR::shorten ( const std::string &  text,
size_t  longest = 40,
size_t  prefix = 10 
)
inline

convert a long string to 'beginningofstring...endofstring' for display

Definition at line 88 of file mrtrix.h.

◆ split()

vector< std::string > MR::split ( const std::string &  string,
const char *  delimiters = " \t\n",
bool  ignore_empty_fields = false,
size_t  num = std::numeric_limits< size_t >::max() 
)

◆ split_lines()

vector< std::string > MR::split_lines ( const std::string &  string,
bool  ignore_empty_fields = true,
size_t  num = std::numeric_limits<size_t>::max() 
)
inline

Definition at line 179 of file mrtrix.h.

◆ StochasticThreadedLoop() [1/6]

template<class HeaderType >
StochasticThreadedLoopRunOuter< decltype(Loop(vector< size_t >()))> MR::StochasticThreadedLoop ( const HeaderType &  source,
const vector< size_t > &  axes,
size_t  num_inner_axes = 1 
)
inline

Definition at line 180 of file stochastic_threaded_loop.h.

◆ StochasticThreadedLoop() [2/6]

template<class HeaderType >
StochasticThreadedLoopRunOuter< decltype(Loop(vector< size_t >()))> MR::StochasticThreadedLoop ( const HeaderType &  source,
const vector< size_t > &  outer_axes,
const vector< size_t > &  inner_axes 
)
inline

Definition at line 171 of file stochastic_threaded_loop.h.

◆ StochasticThreadedLoop() [3/6]

template<class HeaderType >
StochasticThreadedLoopRunOuter< decltype(Loop(vector< size_t >()))> MR::StochasticThreadedLoop ( const HeaderType &  source,
size_t  from_axis = 0,
size_t  to_axis = std::numeric_limits<size_t>::max(),
size_t  num_inner_axes = 1 
)
inline

Definition at line 188 of file stochastic_threaded_loop.h.

◆ StochasticThreadedLoop() [4/6]

template<class HeaderType >
StochasticThreadedLoopRunOuter< decltype(Loop("", vector< size_t >()))> MR::StochasticThreadedLoop ( const std::string &  progress_message,
const HeaderType &  source,
const vector< size_t > &  axes,
size_t  num_inner_axes = 1 
)
inline

Definition at line 208 of file stochastic_threaded_loop.h.

◆ StochasticThreadedLoop() [5/6]

template<class HeaderType >
StochasticThreadedLoopRunOuter< decltype(Loop("", vector< size_t >()))> MR::StochasticThreadedLoop ( const std::string &  progress_message,
const HeaderType &  source,
const vector< size_t > &  outer_axes,
const vector< size_t > &  inner_axes 
)
inline

Definition at line 199 of file stochastic_threaded_loop.h.

◆ StochasticThreadedLoop() [6/6]

template<class HeaderType >
StochasticThreadedLoopRunOuter< decltype(Loop("", vector< size_t >()))> MR::StochasticThreadedLoop ( const std::string &  progress_message,
const HeaderType &  source,
size_t  from_axis = 0,
size_t  to_axis = std::numeric_limits<size_t>::max(),
size_t  num_inner_axes = 1 
)
inline

Definition at line 219 of file stochastic_threaded_loop.h.

◆ str()

template<class T >
std::string MR::str ( const T &  value,
int  precision = 0 
)
inline

Definition at line 247 of file mrtrix.h.

◆ str< cdouble >()

template<>
std::string MR::str< cdouble > ( const cdouble value,
int  precision 
)
inline

Definition at line 353 of file mrtrix.h.

◆ str< cfloat >()

template<>
std::string MR::str< cfloat > ( const cfloat value,
int  precision 
)
inline

Definition at line 295 of file mrtrix.h.

◆ strip()

std::string MR::strip ( const std::string &  string,
const std::string &  ws = {" \0\t\r\n", 5},
bool  left = true,
bool  right = true 
)
inline

Definition at line 131 of file mrtrix.h.

◆ threaded_copy() [1/2]

template<class InputImageType , class OutputImageType >
void MR::threaded_copy ( InputImageType &  source,
OutputImageType &  destination,
const vector< size_t > &  axes,
size_t  num_axes_in_thread = 1 
)
inline

Definition at line 43 of file threaded_copy.h.

◆ threaded_copy() [2/2]

template<class InputImageType , class OutputImageType >
void MR::threaded_copy ( InputImageType &  source,
OutputImageType &  destination,
size_t  from_axis = 0,
size_t  to_axis = std::numeric_limits<size_t>::max(),
size_t  num_axes_in_thread = 1 
)
inline

Definition at line 54 of file threaded_copy.h.

◆ threaded_copy_with_progress() [1/2]

template<class InputImageType , class OutputImageType >
void MR::threaded_copy_with_progress ( InputImageType &  source,
OutputImageType &  destination,
const vector< size_t > &  axes,
size_t  num_axes_in_thread = 1 
)
inline

Definition at line 95 of file threaded_copy.h.

◆ threaded_copy_with_progress() [2/2]

template<class InputImageType , class OutputImageType >
void MR::threaded_copy_with_progress ( InputImageType &  source,
OutputImageType &  destination,
size_t  from_axis = 0,
size_t  to_axis = std::numeric_limits<size_t>::max(),
size_t  num_axes_in_thread = 1 
)
inline

Definition at line 106 of file threaded_copy.h.

◆ threaded_copy_with_progress_message() [1/2]

template<class InputImageType , class OutputImageType >
void MR::threaded_copy_with_progress_message ( const std::string &  message,
InputImageType &  source,
OutputImageType &  destination,
const vector< size_t > &  axes,
size_t  num_axes_in_thread = 1 
)
inline

Definition at line 69 of file threaded_copy.h.

◆ threaded_copy_with_progress_message() [2/2]

template<class InputImageType , class OutputImageType >
void MR::threaded_copy_with_progress_message ( const std::string &  message,
InputImageType &  source,
OutputImageType &  destination,
size_t  from_axis = 0,
size_t  to_axis = std::numeric_limits<size_t>::max(),
size_t  num_axes_in_thread = 1 
)
inline

Definition at line 81 of file threaded_copy.h.

◆ ThreadedLoop() [1/6]

template<class HeaderType >
ThreadedLoopRunOuter< decltype(Loop(vector< size_t >()))> MR::ThreadedLoop ( const HeaderType &  source,
const vector< size_t > &  axes,
size_t  num_inner_axes = 1 
)
inline

Multi-threaded loop object.

Definition at line 405 of file threaded_loop.h.

◆ ThreadedLoop() [2/6]

template<class HeaderType >
ThreadedLoopRunOuter< decltype(Loop(vector< size_t >()))> MR::ThreadedLoop ( const HeaderType &  source,
const vector< size_t > &  outer_axes,
const vector< size_t > &  inner_axes 
)
inline

Multi-threaded loop object.

Definition at line 394 of file threaded_loop.h.

◆ ThreadedLoop() [3/6]

template<class HeaderType >
ThreadedLoopRunOuter< decltype(Loop(vector< size_t >()))> MR::ThreadedLoop ( const HeaderType &  source,
size_t  from_axis = 0,
size_t  to_axis = std::numeric_limits<size_t>::max(),
size_t  num_inner_axes = 1 
)
inline

Multi-threaded loop object.

Definition at line 415 of file threaded_loop.h.

◆ ThreadedLoop() [4/6]

template<class HeaderType >
ThreadedLoopRunOuter< decltype(Loop("", vector< size_t >()))> MR::ThreadedLoop ( const std::string &  progress_message,
const HeaderType &  source,
const vector< size_t > &  axes,
size_t  num_inner_axes = 1 
)
inline

Multi-threaded loop object.

Definition at line 441 of file threaded_loop.h.

◆ ThreadedLoop() [5/6]

template<class HeaderType >
ThreadedLoopRunOuter< decltype(Loop("", vector< size_t >()))> MR::ThreadedLoop ( const std::string &  progress_message,
const HeaderType &  source,
const vector< size_t > &  outer_axes,
const vector< size_t > &  inner_axes 
)
inline

Multi-threaded loop object.

Definition at line 430 of file threaded_loop.h.

◆ ThreadedLoop() [6/6]

template<class HeaderType >
ThreadedLoopRunOuter< decltype(Loop("", vector< size_t >()))> MR::ThreadedLoop ( const std::string &  progress_message,
const HeaderType &  source,
size_t  from_axis = 0,
size_t  to_axis = std::numeric_limits<size_t>::max(),
size_t  num_inner_axes = 1 
)
inline

Multi-threaded loop object.

Definition at line 456 of file threaded_loop.h.

◆ to()

template<class T >
T MR::to ( const std::string &  string)
inline

Definition at line 260 of file mrtrix.h.

◆ to< bool >()

template<>
bool MR::to< bool > ( const std::string &  string)
inline

Definition at line 285 of file mrtrix.h.

◆ to< cdouble >()

template<>
cdouble MR::to< cdouble > ( const std::string &  string)
inline

Definition at line 366 of file mrtrix.h.

◆ to< cfloat >()

template<>
cfloat MR::to< cfloat > ( const std::string &  string)
inline

Definition at line 308 of file mrtrix.h.

◆ unpack()

template<typename F , typename T >
auto MR::unpack ( F &&  f,
T &&  t 
) -> decltype(Unpack< ::std::tuple_size< typename ::std::decay<T>::type >::value>::unpack (::std::forward<F>(f), ::std::forward<T>(t)))
inline

if t is a tuple of elements a..., invoke f(a...)

Definition at line 91 of file apply.h.

◆ unquote()

std::string MR::unquote ( const std::string &  string)
inline

Remove quotation marks only if surrounding entire string.

Definition at line 142 of file mrtrix.h.

◆ uppercase()

std::string MR::uppercase ( const std::string &  string)
inline

return uppercase version of string

Definition at line 107 of file mrtrix.h.

Variable Documentation

◆ Inf

constexpr default_type MR::Inf = std::numeric_limits<default_type>::infinity()
constexpr

Definition at line 231 of file types.h.

◆ malloc_align

constexpr size_t MR::malloc_align = alignof (::max_align_t)
constexpr

Definition at line 59 of file types.h.

◆ NaN

constexpr default_type MR::NaN = std::numeric_limits<default_type>::quiet_NaN()
constexpr

Definition at line 230 of file types.h.

◆ print

void(* MR::print) (const std::string &msg) ( const std::string &  msg)
extern

print primary output to stdout as-is.

This function is intended for cases where the command's primary output is text, not image data, etc. It is not designed for error or status reports: it prints to stdout, whereas all reporting functions print to stderr. This is to allow the output of the command to be used directly in text processing pipeline or redirected to file.

Note
the use of stdout is normally reserved for piping data files (or at least their filenames) between MRtrix commands. This function should therefore never be used in commands that produce output images, as the two different types of output may then interfere and cause unexpected issues.

◆ report_to_user_func

void(* MR::report_to_user_func) (const std::string &msg, int type) ( const std::string &  msg,
int  type 
)
extern

display error, warning, debug, etc. message to user

types are: 0: error; 1: warning; 2: additional information; 3: debugging information; anything else: none.

◆ SpatiallyContiguous

constexpr int MR::SpatiallyContiguous = -1
constexpr

Definition at line 35 of file image.h.