17#ifndef __algo_adapter_base_h__
18#define __algo_adapter_base_h__
30 template <
template <
class ImageType>
class AdapterType,
class ImageType,
typename... Args>
31 inline AdapterType<ImageType>
make (
const ImageType& parent, Args&&... args) {
32 return AdapterType<ImageType> (parent, std::forward<Args> (args)...);
35 template <
class AdapterType,
class ImageType>
37 public ImageBase<AdapterType, typename ImageType::value_type>
43 Base (
const ImageType& parent) :
parent_ (parent) { }
47 const Base& operator= (
const U& V) {
return parent_ = V; }
51 FORCE_INLINE bool operator! ()
const {
return !valid(); }
70 stream <<
"image adapter \"" << V.name() <<
"\", datatype " << MR::DataType::from<value_type>().specifier() <<
", position [ ";
71 for (
size_t n = 0; n < V.ndim(); ++n)
72 stream << V[n] <<
" ";
73 stream <<
"], value = " << V.value();
friend std::ostream & operator<<(std::ostream &stream, const Base &V)
AdapterType< ImageType > make(const ImageType &parent, Args &&... args)
MR::default_type value_type
std::map< std::string, std::string > KeyValues
used in various places for storing key-value pairs
double default_type
the default type used throughout MRtrix
Eigen::Transform< default_type, 3, Eigen::AffineCompact > transform_type
the type for the affine transform of an image: