Developer documentation
Version 3.0.3-105-gd3941f44
raw.h File Reference
#include <atomic>
#include "mrtrix.h"

Go to the source code of this file.

Namespaces

namespace  MR
 
namespace  MR::ByteOrder
 
namespace  MR::Raw
 

Macros

#define BITMASK   0x01U << 7
 
#define MRTRIX_IS_BIG_ENDIAN   false
 
#define TO_LE(v)   v
 
#define TO_BE(v)   swap(v)
 

Functions

template<typename ValueType >
std::enable_if< std::is_fundamental< ValueType >::value &&sizeof(ValueType)==1, ValueType >::type MR::ByteOrder::swap (ValueType v)
 
template<typename ValueType >
std::enable_if< std::is_fundamental< ValueType >::value &&sizeof(ValueType)==2, ValueType >::type MR::ByteOrder::swap (ValueType v)
 
template<typename ValueType >
std::enable_if< std::is_fundamental< ValueType >::value &&sizeof(ValueType)==4, ValueType >::type MR::ByteOrder::swap (ValueType v)
 
template<typename ValueType >
std::enable_if< std::is_fundamental< ValueType >::value &&sizeof(ValueType)==8, ValueType >::type MR::ByteOrder::swap (ValueType v)
 
template<typename ValueType >
std::enable_if< is_complex< ValueType >::value, ValueType >::type MR::ByteOrder::swap (ValueType v)
 
template<typename ValueType >
ValueType MR::ByteOrder::LE (ValueType v)
 
template<typename ValueType >
ValueType MR::ByteOrder::BE (ValueType v)
 
template<typename ValueType >
ValueType MR::ByteOrder::swap (const ValueType value, bool is_big_endian)
 
template<typename ValueType >
ValueType MR::Raw::fetch_LE (const void *address)
 
template<typename ValueType >
ValueType MR::Raw::fetch_BE (const void *address)
 
template<typename ValueType >
ValueType MR::Raw::fetch_ (const void *address, bool is_big_endian=false)
 
template<typename ValueType >
ValueType MR::Raw::fetch__native (const void *address)
 
template<typename ValueType >
void MR::Raw::store_LE (const ValueType value, void *address)
 
template<typename ValueType >
void MR::Raw::store_BE (const ValueType value, void *address)
 
template<typename ValueType >
void MR::Raw::store (const ValueType value, void *address, bool is_big_endian=false)
 
template<typename ValueType >
void MR::Raw::store_native (const ValueType value, void *address)
 
template<typename ValueType >
ValueType MR::Raw::fetch_LE (const void *data, size_t i)
 fetch value in little-endian format from offset i from data More...
 
template<typename ValueType >
ValueType MR::Raw::fetch_BE (const void *data, size_t i)
 fetch value in big-endian format from offset i from data More...
 
template<typename ValueType >
ValueType MR::Raw::fetch (const void *data, size_t i, bool is_big_endian=false)
 fetch value in format is_big_endian from offset i from data More...
 
template<typename ValueType >
ValueType MR::Raw::fetch_native (const void *data, size_t i)
 fetch value in native format from offset i from data More...
 
template<typename ValueType >
void MR::Raw::store_LE (const ValueType value, void *data, size_t i)
 store value in little-endian format at offset i from data More...
 
template<typename ValueType >
void MR::Raw::store_BE (const ValueType value, void *data, size_t i)
 store value in big-endian format at offset i from data More...
 
template<typename ValueType >
void MR::Raw::store (const ValueType value, void *data, size_t i, bool is_big_endian=false)
 store value in format is_big_endian at offset i from data More...
 
template<typename ValueType >
void MR::Raw::store_native (const ValueType value, void *data, size_t i)
 store value in native format at offset i from data More...
 

Macro Definition Documentation

◆ BITMASK

#define BITMASK   0x01U << 7

Definition at line 27 of file raw.h.

◆ MRTRIX_IS_BIG_ENDIAN

#define MRTRIX_IS_BIG_ENDIAN   false

Definition at line 34 of file raw.h.

◆ TO_BE

#define TO_BE (   v)    swap(v)

Definition at line 36 of file raw.h.

◆ TO_LE

#define TO_LE (   v)    v

Definition at line 35 of file raw.h.