SIRF
3.4.0
|
Abstract MR acquisition data container class. More...
#include "gadgetron_data_containers.h"
Public Member Functions | |
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 void | 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 | dot (const DataContainer &dc, void *ptr) const |
calculates the dot product of this container with another one | |
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 | 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 float | norm () const |
returns the norm of this container viewed as a vector | |
virtual void | write (const std::string &filename) const |
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) |
Reader for ISMRMRD::Acquisition from ISMRMRD file. filename_ismrmrd_with_ext: filename of ISMRMRD rawdata file with .h5 extension. More... | |
![]() | |
virtual ObjectHandle< DataContainer > * | new_data_container_handle () const =0 |
virtual unsigned int | items () const =0 |
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 | |
Protected Member Functions | |
virtual MRAcquisitionData * | clone_impl () const =0 |
![]() | |
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.
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 | ) |
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.