You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
@KrisThielemans sorry not sure I understand your last suggestion:
put a class in between RealDataContainer and ComplexDataContainer, which have the intuitive signatures, as well as the generic ones, which do all the ugly casting, such that the derived classes don't need to.
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 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.DataContainer
if possible.The text was updated successfully, but these errors were encountered: