Skip to content

Longer term solutions to DataContainer data type issue needed. #1193

@evgueni-ovtchinnikov

Description

@evgueni-ovtchinnikov

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.

Metadata

Metadata

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions