Some DataContainer methods compute a value that is complex for Gadgetron containers and real for other containers, and so, the variable that would store such a value cannot be explicitly declared in this abstract base class. Currently, this issue is quick-fixed by passing a void* to these methods that is cast to float* or complex_float_t* in the respective methods of the derived classes.
Possible longer term fixes:
- use the largest type in the C++ interface (i.e. std::complex) as opposed to
void *. Easy, but probably unexpected.
- use
std::any (and if needed with a virtual function std::any DataContainer::get_zero_data_element() or so). More complicated and not very elegant.
- template
DataContainer if possible.
Some
DataContainermethods compute a value that is complex for Gadgetron containers and real for other containers, and so, the variable that would store such a value cannot be explicitly declared in this abstract base class. Currently, this issue is quick-fixed by passing avoid*to these methods that is cast tofloat*orcomplex_float_t*in the respective methods of the derived classes.Possible longer term fixes:
void *. Easy, but probably unexpected.std::any(and if needed with a virtual functionstd::any DataContainer::get_zero_data_element()or so). More complicated and not very elegant.DataContainerif possible.