ODIN
Public Member Functions | List of all members

MAGSI-based Magnetization Simulator. More...

#include <seqsim.h>

Inheritance diagram for SeqSimMagsi:
Inheritance graph
[legend]

Public Member Functions

 SeqSimMagsi (const STD_string &label="unnamedSeqSimMagsi")
 
 SeqSimMagsi (const SeqSimMagsi &ssm)
 
 ~SeqSimMagsi ()
 
SeqSimMagsi & operator= (const SeqSimMagsi &ssm)
 
unsigned int get_total_size () const
 
SeqSimMagsi & reset_magnetization ()
 
SeqSimMagsi & set_initial_vector (float Mx, float My, float Mz)
 
const farray & get_Mx () const
 
const farray & get_My () const
 
const farray & get_Mz () const
 
const farray & get_Mamp () const
 
const farray & get_Mpha () const
 
SeqSimMagsi & update ()
 
SeqSimMagsi & set_online_simulation (bool onlineflag)
 
SeqSimMagsi & set_intravoxel_simulation (bool ivflag)
 
SeqSimMagsi & set_numof_threads (unsigned int n)
 
SeqSimMagsi & set_spat_rotmatrix (const RotMatrix &rotmatrix)
 
bool do_simulation ()
 
void prepare_simulation (const Sample &sample, CoilSensitivity *transmit_coil=0, CoilSensitivity *receive_coil=0, ProgressMeter *progmeter=0)
 
cvector simulate (const SeqSimInterval &simvals, double gamma)
 
void finalize_simulation ()
 
bool kernel (const SeqSimInterval &simvals, cvector &signal, int &, unsigned int begin, unsigned int end)
 
- Public Member Functions inherited from LDRblock
 LDRblock (const STD_string &title="Parameter List")
 
 LDRblock (const LDRblock &block)
 
 ~LDRblock ()
 
LDRblock & operator= (const LDRblock &block)
 
LDRblock & merge (LDRblock &block, bool onlyUserPars=true)
 
LDRblock & unmerge (LDRblock &block)
 
STD_string printval (const STD_string &parameterName, bool append_unit=false) const
 
bool parseval (const STD_string &parameterName, const STD_string &value)
 
int parseblock (const STD_string &source, const LDRserBase &serializer=LDRserJDX())
 
unsigned int numof_pars () const
 
LDRbase * get_parameter (const STD_string &ldrlabel)
 
bool parameter_exists (const STD_string &ldrlabel) const
 
LDRblock & set_prefix (const STD_string &prefix)
 
LDRblock & set_embedded (bool embedded)
 
bool is_embedded () const
 
LDRbase & operator[] (unsigned int i)
 
const LDRbase & operator[] (unsigned int i) const
 
LDRbase & get_parameter_by_id (int id)
 
LDRblock & create_copy (const LDRblock &src)
 
LDRblock & append_copy (const LDRbase &src)
 
LDRblock & copy_ldr_vals (const LDRblock &src)
 
bool operator== (const LDRblock &rhs) const
 
bool operator< (const LDRblock &rhs) const
 
bool compare (const LDRblock &rhs, const STD_list< STD_string > *exclude=0, double accuracy=0.0) const
 
STD_string print (const LDRserBase &serializer=LDRserJDX()) const
 
LDRbase & set_parmode (parameterMode parameter_mode)
 
LDRbase & set_filemode (fileMode file_mode)
 
STD_string get_parx_code (parxCodeType type) const
 
STD_ostream & print2stream (STD_ostream &os, const LDRserBase &serializer) const
 
bool parsevalstring (const STD_string &, const LDRserBase *ser=0)
 
bool parse (STD_string &parstring, const LDRserBase &serializer)
 
STD_string printvalstring (const LDRserBase *ser=0) const
 
LDRbase * create_copy () const
 
STD_string get_typeInfo (bool parx_equivtype=false) const
 
int load (const STD_string &filename, const LDRserBase &serializer=LDRserJDX())
 
int write (const STD_string &filename, const LDRserBase &serializer=LDRserJDX()) const
 
- Public Member Functions inherited from LDRbase
virtual double get_minval () const
 
virtual double get_maxval () const
 
bool has_minmax () const
 
const STD_string & get_description () const
 
LDRbase & set_description (const STD_string &descr)
 
virtual svector get_alternatives () const
 
const STD_string & get_unit () const
 
LDRbase & set_unit (const STD_string &un)
 
virtual parameterMode get_parmode () const
 
virtual fileMode get_filemode () const
 
virtual GuiProps get_gui_props () const
 
virtual LDRbase & set_gui_props (const GuiProps &)
 
JcampDxProps get_jdx_props () const
 
LDRbase & set_jdx_props (const JcampDxProps &jp)
 
- Public Member Functions inherited from Labeled
 Labeled (const STD_string &label="unnamed")
 
Labeled & set_label (const STD_string &label)
 
const STD_string & get_label () const
 
Labeled & operator= (const Labeled &l)
 
- Public Member Functions inherited from List< I, P, R >
 List ()
 
 ~List ()
 
List & operator= (const List &l)
 
List & clear ()
 
List & append (R item)
 
List & remove (R item)
 
unsigned int size () const
 
iter get_begin ()
 
iter get_end ()
 
constiter get_const_begin () const
 
constiter get_const_end () const
 
- Public Member Functions inherited from ThreadedLoop< SeqSimInterval, cvector, int >
 ThreadedLoop ()
 
bool init (unsigned int numof_threads, unsigned int loopsize)
 
void destroy ()
 
bool execute (const SeqSimInterval &in, STD_vector< cvector > &outvec)
 
- Public Member Functions inherited from SeqClass
SeqClass & set_temporary ()
 

Additional Inherited Members

- Public Types inherited from List< I, P, R >
typedef STD_list< P >::iterator iter
 
typedef STD_list< P >::const_iterator constiter
 
- Protected Member Functions inherited from LDRblock
LDRblock & append_member (LDRbase &ldr, const STD_string ldrlabel="")
 
- Protected Member Functions inherited from SeqClass
void marshall_error () const
 
virtual void clear_container ()
 
virtual bool prep ()
 
- Static Protected Member Functions inherited from SeqClass
static void clear_temporary ()
 
static void clear_containers ()
 

Detailed Description

MAGSI-based Magnetization Simulator.

This is a simulator to calculate the time evolution of a magnetization grid in 4 dimension (frequency and three spatial dimensions). This simulation of the Bloch-Torrey equations is performed by means of the MAGSI algorith (c.f. Journal of Magnetic Resonance 180:29-38, 2006). Simulation usually involves the following steps:

Definition at line 113 of file seqsim.h.

Constructor & Destructor Documentation

◆ SeqSimMagsi() [1/2]

SeqSimMagsi::SeqSimMagsi ( const STD_string &  label = "unnamedSeqSimMagsi")

Constructs a simulator labeled 'object_label'.

◆ SeqSimMagsi() [2/2]

SeqSimMagsi::SeqSimMagsi ( const SeqSimMagsi &  ssm)

Copy constructor

◆ ~SeqSimMagsi()

SeqSimMagsi::~SeqSimMagsi ( )

Destructor

Member Function Documentation

◆ do_simulation()

bool SeqSimMagsi::do_simulation ( )

Returns whether simulation should be performed, i.e. whether the 'online' flag is true or 'update' was activated.

◆ finalize_simulation()

void SeqSimMagsi::finalize_simulation ( )
virtual

Call this function after a simulation (i.e. after successive calls to simulate() )

Implements SeqSimAbstract.

◆ get_Mamp()

const farray& SeqSimMagsi::get_Mamp ( ) const
inline

Returns the amplitude of the transverse magnetisation

Definition at line 170 of file seqsim.h.

◆ get_Mpha()

const farray& SeqSimMagsi::get_Mpha ( ) const
inline

Returns the phase of the transverse magnetisation

Definition at line 175 of file seqsim.h.

◆ get_Mx()

const farray& SeqSimMagsi::get_Mx ( ) const
inline

Returns the real part of the transverse magnetisation

Definition at line 155 of file seqsim.h.

◆ get_My()

const farray& SeqSimMagsi::get_My ( ) const
inline

Returns the imaginary part of the transverse magnetisation

Definition at line 160 of file seqsim.h.

◆ get_Mz()

const farray& SeqSimMagsi::get_Mz ( ) const
inline

Returns the longitudinal magnetisation

Definition at line 165 of file seqsim.h.

◆ get_total_size()

unsigned int SeqSimMagsi::get_total_size ( ) const
inline

Returns the overall size of the array

Definition at line 140 of file seqsim.h.

◆ kernel()

bool SeqSimMagsi::kernel ( const SeqSimInterval &  in,
cvector &  out,
int &  local,
unsigned int  begin,
unsigned int  end 
)
virtual

Overload this function to do the work of one thread using input 'in', generating output 'out' with thread-local storage 'local' for the the loop inidices (begin <= i < end).

Implements ThreadedLoop< SeqSimInterval, cvector, int >.

◆ operator=()

SeqSimMagsi& SeqSimMagsi::operator= ( const SeqSimMagsi &  ssm)

Assignment operator

◆ prepare_simulation()

void SeqSimMagsi::prepare_simulation ( const Sample &  sample,
CoilSensitivity *  transmit_coil = 0,
CoilSensitivity *  receive_coil = 0,
ProgressMeter *  progmeter = 0 
)
virtual

Prepare a simulation (i.e. before successive calls to simulate() ) with the parameters:

  • sample: The virtual sample
  • transmit_coil: Transmitter coil, 0 for none
  • receive_coil: Receiver coil, 0 for none
  • progmeter: Status indicator to trace progress, 0 for none

Implements SeqSimAbstract.

◆ reset_magnetization()

SeqSimMagsi& SeqSimMagsi::reset_magnetization ( )

Set each magnetization to initial state 'initial_vector', which is (0,0,1) by default

◆ set_initial_vector()

SeqSimMagsi& SeqSimMagsi::set_initial_vector ( float  Mx,
float  My,
float  Mz 
)

Set the vector for the initial magnetization

◆ set_intravoxel_simulation()

SeqSimMagsi& SeqSimMagsi::set_intravoxel_simulation ( bool  ivflag)
inline

Specifies whether intra-voxel magnetzation gradients are considered during simulation

Definition at line 192 of file seqsim.h.

◆ set_numof_threads()

SeqSimMagsi& SeqSimMagsi::set_numof_threads ( unsigned int  n)
inline

Specifies the number of threads used during simulation

Definition at line 197 of file seqsim.h.

◆ set_online_simulation()

SeqSimMagsi& SeqSimMagsi::set_online_simulation ( bool  onlineflag)
inline

Specifies whether simulation should be performed everytime update() is called

Definition at line 186 of file seqsim.h.

◆ set_spat_rotmatrix()

SeqSimMagsi& SeqSimMagsi::set_spat_rotmatrix ( const RotMatrix &  rotmatrix)

Specifies a rotation matrix for the spatial domain, i.e. the magnetization array will be rotated in space using the specified rotation matrix.

◆ simulate()

cvector SeqSimMagsi::simulate ( const SeqSimInterval &  simvals,
double  gamma 
)
virtual

Simulation with

  • simvals: The magnetic fields during a time interval
  • gamma: Gyromagnetic ration of the nucleus observed Return value: Signal in each receiver channel

Implements SeqSimAbstract.

◆ update()

SeqSimMagsi& SeqSimMagsi::update ( )

Updates all parameter relations


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