SIRF
3.5.0
|
Abstract MR acquisition data container class. More...
#include "gadgetron_data_containers.h"
Public Member Functions | |
void | set_encoding_limits (const std::string &name, const std::tuple< unsigned short, unsigned short, unsigned short > min_max_ctr) |
Setter for the encoding limits in the header of the acquisition. inputs: name, name of k-space dimension to modify min_max_ctr = minimium, maximum and center value of sampled region. | |
std::tuple< unsigned short, unsigned short, unsigned short > | get_encoding_limits (const std::string &name) const |
virtual void | empty ()=0 |
virtual void | take_over (MRAcquisitionData &)=0 |
virtual unsigned int | number () const =0 |
virtual gadgetron::shared_ptr< ISMRMRD::Acquisition > | get_acquisition_sptr (unsigned int num)=0 |
virtual int | get_acquisition (unsigned int num, ISMRMRD::Acquisition &acq) const =0 |
virtual void | set_acquisition (unsigned int num, ISMRMRD::Acquisition &acq)=0 |
virtual void | append_acquisition (ISMRMRD::Acquisition &acq)=0 |
virtual void | copy_acquisitions_info (const MRAcquisitionData &ac)=0 |
virtual void | copy_acquisitions_data (const MRAcquisitionData &ac)=0 |
virtual gadgetron::unique_ptr< MRAcquisitionData > | new_acquisitions_container ()=0 |
virtual MRAcquisitionData * | same_acquisitions_container (const AcquisitionsInfo &info) const =0 |
virtual void | set_data (const complex_float_t *z, int all=1)=0 |
virtual void | get_data (complex_float_t *z, int all=1) |
virtual void | set_user_floats (float const *const z, int const idx) |
virtual bool | is_complex () const |
virtual void | sum (void *ptr) const |
below all void* are actually complex_float_t* | |
virtual void | max (void *ptr) const |
calculates the value of this container's element with the largest real part | |
virtual void | dot (const DataContainer &dc, void *ptr) const |
calculates the dot product of this container with another one More... | |
complex_float_t | dot (const DataContainer &a_x) |
virtual void | axpby (const void *ptr_a, const DataContainer &a_x, const void *ptr_b, const DataContainer &a_y) |
*this = the linear combination of x and y | |
virtual void | xapyb (const DataContainer &a_x, const DataContainer &a_a, const DataContainer &a_y, const DataContainer &a_b) |
*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 void *ptr_b) |
alternative interface to the above | |
virtual void | xapyb (const DataContainer &a_x, const void *ptr_a, const DataContainer &a_y, const DataContainer &a_b) |
*this = elementwise sum of x*a and elementwise y*b | |
virtual void | multiply (const DataContainer &x, const DataContainer &y) |
*this = the elementwise product x*y | |
virtual void | divide (const DataContainer &x, const DataContainer &y) |
*this = the elementwise ratio x / y | |
virtual void | maximum (const DataContainer &x, const DataContainer &y) |
*this = the elementwise max(x, y) | |
virtual void | minimum (const DataContainer &x, const DataContainer &y) |
*this = the elementwise min(x, y) | |
virtual void | power (const DataContainer &x, const DataContainer &y) |
*this = the elementwise pow(x, y) | |
virtual void | multiply (const DataContainer &x, const void *y) |
*this = the product x * y with scalar y | |
virtual void | add (const DataContainer &x, const void *ptr_y) |
*this = the sum x + y with scalar y | |
virtual void | maximum (const DataContainer &x, const void *y) |
virtual void | minimum (const DataContainer &x, const void *y) |
virtual void | power (const DataContainer &x, const void *y) |
virtual void | exp (const DataContainer &x) |
*this = the elementwise exp(x) | |
virtual void | log (const DataContainer &x) |
*this = the elementwise log(x) | |
virtual void | sqrt (const DataContainer &x) |
*this = the elementwise sqrt(x) | |
virtual void | sign (const DataContainer &x) |
*this = the elementwise sign(x) | |
virtual void | abs (const DataContainer &x) |
*this = the elementwise abs(x) | |
virtual float | norm () const |
returns the norm of this container viewed as a vector | |
virtual void | write (const std::string &filename) const |
void | binary_op (const DataContainer &a_x, const DataContainer &a_y, void(*f)(const ISMRMRD::Acquisition &, ISMRMRD::Acquisition &)) |
void | semibinary_op (const DataContainer &a_x, complex_float_t y, void(*f)(const ISMRMRD::Acquisition &, ISMRMRD::Acquisition &, complex_float_t)) |
void | unary_op (const DataContainer &a_x, void(*f)(const ISMRMRD::Acquisition &, ISMRMRD::Acquisition &)) |
AcquisitionsInfo | acquisitions_info () const |
void | set_acquisitions_info (std::string info) |
void | set_acquisitions_info (const AcquisitionsInfo info) |
ISMRMRD::TrajectoryType | get_trajectory_type () const |
void | set_trajectory_type (const ISMRMRD::TrajectoryType type) |
void | set_trajectory (const uint16_t traj_dim, float *traj) |
gadgetron::unique_ptr< MRAcquisitionData > | clone () const |
bool | undersampled () const |
int | get_acquisitions_dimensions (size_t ptr_dim) const |
void | get_kspace_dimensions (std::vector< size_t > &dims) const |
uint16_t | get_trajectory_dimensions (void) const |
void | sort () |
void | sort_by_time () |
bool | sorted () const |
void | set_sorted (bool sorted) |
std::vector< KSpaceSubset::SetType > | get_kspace_order () const |
Function to get the indices of the acquisitions belonging to different dimensions of k-space. More... | |
std::vector< KSpaceSubset > | get_kspace_sorting () const |
Function to get the all KSpaceSubset's of the MRAcquisitionData. | |
void | organise_kspace () |
Function to go through Acquisitions and assign them to their k-space dimension. More... | |
virtual std::vector< int > | get_flagged_acquisitions_index (const std::vector< ISMRMRD::ISMRMRD_AcquisitionFlags > flags) const |
virtual std::vector< int > | get_slice_encoding_index (const unsigned kspace_encode_step_2) const |
virtual void | get_subset (MRAcquisitionData &subset, const std::vector< int > subset_idx) const |
virtual void | set_subset (const MRAcquisitionData &subset, const std::vector< int > subset_idx) |
std::vector< int > | index () |
const std::vector< int > & | index () const |
int | index (int i) const |
void | read (const std::string &filename_ismrmrd_with_ext, int all=0) |
Reader for ISMRMRD::Acquisition from ISMRMRD file. filename_ismrmrd_with_ext: filename of ISMRMRD rawdata file with .h5 extension. More... | |
Public Member Functions inherited from sirf::DataContainer | |
virtual ObjectHandle< DataContainer > * | new_data_container_handle () const =0 |
virtual unsigned int | items () const =0 |
virtual int | bits () const |
returns the size of data elements | |
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 | |
bool | is_empty () const |
std::unique_ptr< DataContainer > | clone () const |
void | conjugate () |
overwrites this container's complex data with complex conjugate values | |
std::unique_ptr< DataContainer > | conjugate () const |
returns unique pointer to the complex-conjugated copy of this container | |
Static Public Member Functions | |
static void | binary_op (const ISMRMRD::Acquisition &acq_x, ISMRMRD::Acquisition &acq_y, complex_float_t(*f)(complex_float_t, complex_float_t)) |
static void | semibinary_op (const ISMRMRD::Acquisition &acq_x, ISMRMRD::Acquisition &acq_y, complex_float_t y, complex_float_t(*f)(complex_float_t, complex_float_t)) |
static void | unary_op (const ISMRMRD::Acquisition &acq_x, ISMRMRD::Acquisition &acq_y, complex_float_t(*f)(complex_float_t)) |
static void | axpby (complex_float_t a, const ISMRMRD::Acquisition &acq_x, complex_float_t b, ISMRMRD::Acquisition &acq_y) |
static void | xapyb (const ISMRMRD::Acquisition &acq_x, complex_float_t a, ISMRMRD::Acquisition &acq_y, complex_float_t b) |
static void | xapyb (const ISMRMRD::Acquisition &acq_x, complex_float_t a, ISMRMRD::Acquisition &acq_y, const ISMRMRD::Acquisition &acq_b) |
static void | xapyb (const ISMRMRD::Acquisition &acq_x, const ISMRMRD::Acquisition &acq_a, ISMRMRD::Acquisition &acq_y, const ISMRMRD::Acquisition &acq_b) |
static complex_float_t | dot (const ISMRMRD::Acquisition &acq_x, const ISMRMRD::Acquisition &acq_y) |
static complex_float_t | sum (const ISMRMRD::Acquisition &acq_x) |
static complex_float_t | max (const ISMRMRD::Acquisition &acq_x) |
static void | multiply (const ISMRMRD::Acquisition &acq_x, ISMRMRD::Acquisition &acq_y) |
static void | multiply (const ISMRMRD::Acquisition &acq_x, ISMRMRD::Acquisition &acq_y, complex_float_t y) |
static void | add (const ISMRMRD::Acquisition &acq_x, ISMRMRD::Acquisition &acq_y, complex_float_t y) |
static void | divide (const ISMRMRD::Acquisition &acq_x, ISMRMRD::Acquisition &acq_y) |
static void | maximum (const ISMRMRD::Acquisition &acq_x, ISMRMRD::Acquisition &acq_y) |
static void | maximum (const ISMRMRD::Acquisition &acq_x, ISMRMRD::Acquisition &acq_y, complex_float_t y) |
static void | minimum (const ISMRMRD::Acquisition &acq_x, ISMRMRD::Acquisition &acq_y) |
static void | minimum (const ISMRMRD::Acquisition &acq_x, ISMRMRD::Acquisition &acq_y, complex_float_t y) |
static void | power (const ISMRMRD::Acquisition &acq_x, ISMRMRD::Acquisition &acq_y) |
static void | power (const ISMRMRD::Acquisition &acq_x, ISMRMRD::Acquisition &acq_y, complex_float_t y) |
static void | exp (const ISMRMRD::Acquisition &acq_x, ISMRMRD::Acquisition &acq_y) |
static void | log (const ISMRMRD::Acquisition &acq_x, ISMRMRD::Acquisition &acq_y) |
static void | sqrt (const ISMRMRD::Acquisition &acq_x, ISMRMRD::Acquisition &acq_y) |
static void | sign (const ISMRMRD::Acquisition &acq_x, ISMRMRD::Acquisition &acq_y) |
static void | abs (const ISMRMRD::Acquisition &acq_x, ISMRMRD::Acquisition &acq_y) |
static float | norm (const ISMRMRD::Acquisition &acq_x) |
static void | ismrmrd_par_info (const char *par, int *output) |
static void | ismrmrd_par_value (ISMRMRD::Acquisition &acq, const char *name, unsigned long long int *v) |
static void | ismrmrd_par_value (ISMRMRD::Acquisition &acq, const char *name, float *v) |
Static Public Member Functions inherited from sirf::DataContainer | |
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 MRAcquisitionData * | clone_impl () const =0 |
Protected Member Functions inherited from sirf::DataContainer | |
virtual void | conjugate_impl () |
we assume data to be real, complex data containers must override this | |
Protected Attributes | |
bool | sorted_ = false |
std::vector< int > | index_ |
std::vector< KSpaceSubset > | sorting_ |
AcquisitionsInfo | acqs_info_ |
Static Protected Attributes | |
static gadgetron::shared_ptr< MRAcquisitionData > | acqs_templ_ |
Abstract MR acquisition data container class.
|
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)
Implements sirf::DataContainer.
std::vector< KSpaceSubset::SetType > MRAcquisitionData::get_kspace_order | ( | ) | const |
Function to get the indices of the acquisitions belonging to different dimensions of k-space.
All acquisitions belong to only one subset in a multi-dimensional k-space. This function returns a vector of sets of indices belonging to the acquisitions of the individual subsets.
void MRAcquisitionData::organise_kspace | ( | ) |
Function to go through Acquisitions and assign them to their k-space dimension.
All acquisitions belong to only one subset in a multi-dimensional k-space. This function goes through all acquisitions in the container, extracts their subset (i.e. which slice contrast etc.) and stores this information s.t. consisten subsets (i.e. all acquisitions belonging to the same slice) can be extracted.
void MRAcquisitionData::read | ( | const std::string & | filename_ismrmrd_with_ext, |
int | all = 0 |
||
) |
Reader for ISMRMRD::Acquisition from ISMRMRD file. filename_ismrmrd_with_ext: filename of ISMRMRD rawdata file with .h5 extension.
In case the ISMRMRD::Dataset constructor throws an std::runtime_error the reader catches it, displays the message and throws it again. To avoid reading noise samples and other calibration data, the TO_BE_IGNORED macro is employed to exclude potentially incompatible input.