SIRF  3.5.0
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
sirf::DataContainer Class Referenceabstract
Inheritance diagram for sirf::DataContainer:
sirf::ImageData sirf::MRAcquisitionData sirf::STIRAcquisitionData sirf::ISMRMRDImageData sirf::NiftiImageData< dataType > sirf::STIRImageData sirf::AcquisitionsVector sirf::STIRAcquisitionDataInFile sirf::STIRAcquisitionDataInMemory sirf::GadgetronImagesVector sirf::NiftiImageData3D< dataType > sirf::NiftiImageData3DTensor< dataType > sirf::CoilImagesVector sirf::CoilSensitivitiesVector sirf::NiftiImageData3DDeformation< dataType > sirf::NiftiImageData3DDisplacement< dataType >

Public Member Functions

virtual ObjectHandle< DataContainer > * new_data_container_handle () const =0
 
virtual unsigned int items () const =0
 
virtual bool is_complex () const =0
 
virtual int bits () const
 returns the size of data elements
 
virtual float norm () const =0
 returns the norm of this container viewed as a vector
 
virtual void dot (const DataContainer &dc, void *ptr) const =0
 calculates the dot product of this container with another one More...
 
virtual void sum (void *ptr) const =0
 calculates the sum of this container elements
 
virtual void max (void *ptr) const =0
 calculates the value of this container's element with the largest real part
 
virtual void multiply (const DataContainer &x, const DataContainer &y)=0
 *this = the elementwise product x*y
 
virtual void multiply (const DataContainer &x, const void *ptr_y)=0
 *this = the product x * y with scalar y
 
virtual void add (const DataContainer &x, const void *ptr_y)=0
 *this = the sum x + y with scalar y
 
virtual void divide (const DataContainer &x, const DataContainer &y)=0
 *this = the elementwise ratio x / y
 
virtual void maximum (const DataContainer &x, const DataContainer &y)=0
 *this = the elementwise max(x, y)
 
virtual void maximum (const DataContainer &x, const void *ptr_y)=0
 
virtual void minimum (const DataContainer &x, const DataContainer &y)=0
 *this = the elementwise min(x, y)
 
virtual void minimum (const DataContainer &x, const void *ptr_y)=0
 
virtual void power (const DataContainer &x, const DataContainer &y)=0
 *this = the elementwise pow(x, y)
 
virtual void power (const DataContainer &x, const void *ptr_y)=0
 
virtual void exp (const DataContainer &x)=0
 *this = the elementwise exp(x)
 
virtual void log (const DataContainer &x)=0
 *this = the elementwise log(x)
 
virtual void sqrt (const DataContainer &x)=0
 *this = the elementwise sqrt(x)
 
virtual void sign (const DataContainer &x)=0
 *this = the elementwise sign(x)
 
virtual void abs (const DataContainer &x)=0
 *this = the elementwise abs(x)
 
virtual void axpby (const void *ptr_a, const DataContainer &x, const void *ptr_b, const DataContainer &y)=0
 *this = the linear combination of x and y
 
virtual void xapyb (const DataContainer &x, const void *ptr_a, const DataContainer &y, const void *ptr_b)=0
 alternative interface to the above
 
virtual void xapyb (const DataContainer &x, const DataContainer &a, const DataContainer &y, const DataContainer &b)=0
 *this = elementwise sum of two elementwise products x*a and y*b
 
virtual void xapyb (const DataContainer &a_x, const void *ptr_a, const DataContainer &a_y, const DataContainer &a_b)=0
 *this = elementwise sum of x*a and elementwise y*b
 
void xapyb (const DataContainer &a_x, const DataContainer &a_a, const DataContainer &a_y, const void *ptr_b)
 *this = elementwise sum of elementwise x*a and y*b
 
virtual void write (const std::string &filename) const =0
 
bool is_empty () const
 
std::unique_ptr< DataContainerclone () const
 
void conjugate ()
 overwrites this container's complex data with complex conjugate values
 
std::unique_ptr< DataContainerconjugate () const
 returns unique pointer to the complex-conjugated copy of this container
 

Static Public Member Functions

template<typename T >
static T product (T x, T y)
 
template<typename T >
static T ratio (T x, T y)
 
template<typename T >
static T inverse_ratio (T x, T y)
 
template<typename T >
static T sum (T x, T y)
 
template<typename T >
static T maximum (T x, T y)
 
template<typename T >
static T maxabs (T x, T y)
 
template<typename T >
static T maxreal (T x, T y)
 
template<typename T >
static T minimum (T x, T y)
 
template<typename T >
static T minabs (T x, T y)
 
template<typename T >
static T minreal (T x, T y)
 
static std::complex< float > power (std::complex< float > x, std::complex< float > y)
 
static std::complex< float > exp (std::complex< float > x)
 
static std::complex< float > log (std::complex< float > x)
 
static std::complex< float > sqrt (std::complex< float > x)
 
template<typename T >
static T sign (T x)
 
template<typename T >
static T abs (T x)
 

Protected Member Functions

virtual DataContainerclone_impl () const =0
 
virtual void conjugate_impl ()
 we assume data to be real, complex data containers must override this
 

Member Function Documentation

◆ dot()

virtual void sirf::DataContainer::dot ( const DataContainer dc,
void *  ptr 
) const
pure virtual

calculates the dot product of this container with another one

below all void* are actually either float* (STIR containers and NiftiImageData) or complex_float_t* (Gadgetron containers)

Implemented in sirf::ISMRMRDImageData, sirf::MRAcquisitionData, sirf::STIRImageData, sirf::STIRAcquisitionDataInMemory, sirf::STIRAcquisitionData, and sirf::NiftiImageData< dataType >.


The documentation for this class was generated from the following file: