ODIN
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
SeqMethod Class Referenceabstract

Base class for methods (sequences) More...

#include <seqmeth.h>

Inheritance diagram for SeqMethod:
Inheritance graph
[legend]

Public Member Functions

 SeqMethod (const STD_string &method_label)
 
virtual ~SeqMethod ()
 
bool clear ()
 
bool init ()
 
bool build ()
 
bool prepare ()
 
bool update_timings ()
 
bool prep_acquisition () const
 
const char * get_description () const
 
int process (int argc, char *argv[])
 
int load_protocol (const STD_string &filename)
 
int write_protocol (const STD_string &filename) const
 
LDRblockget_methodPars ()
 
int load_sequencePars (const STD_string &filename)
 
int write_sequencePars (const STD_string &filename) const
 
bool set_sequenceParameter (const STD_string &parameter_label, const STD_string &value)
 
SeqMethodset_commonPars (const SeqPars &pars)
 
SeqParsget_commonPars ()
 
SeqMethodset_geometry (const Geometry &geo)
 
Geometryget_geometry ()
 
int load_geometry (const STD_string &filename)
 
int write_geometry (const STD_string &filename) const
 
Studyget_studyInfo ()
 
int write_systemInfo (const STD_string &filename) const
 
int load_systemInfo (const STD_string &filename)
 
SeqMethodinit_systemInfo (double basicfreq, double maxgrad, double slewrate)
 
int write_recoInfo (const STD_string &filename) const
 
int write_meas_contex (const STD_string &prefix) const
 
double get_totalDuration () const
 
STD_string get_main_nucleus () const
 
unsigned int get_numof_acquisitions () const
 
STD_list< const SeqPulsar * > get_active_pulsar_pulses () const
 
unsigned int event (eventContext &context) const
 
- Public Member Functions inherited from SeqObjList
 SeqObjList (const STD_string &object_label="unnamedSeqObjList")
 
 SeqObjList (const SeqObjList &so)
 
SeqObjListoperator= (const SeqObjList &so)
 
SeqObjListoperator= (const SeqObjLoop &sl)
 
SeqObjListoperator= (const SeqDecoupling &sd)
 
SeqObjListoperator= (const SeqObjBase &soa)
 
SeqObjListoperator= (SeqGradObjInterface &sgoa)
 
SeqObjListoperator= (SeqGradChan &sgc)
 
SeqObjListoperator= (SeqGradChanList &sgcl)
 
SeqObjListoperator+= (const SeqObjBase &soa)
 
SeqObjListoperator+= (SeqGradObjInterface &sgoa)
 
SeqObjListoperator+= (SeqGradChan &sgc)
 
SeqObjListoperator+= (SeqGradChanList &sgcl)
 
SeqObjListset_gradrotmatrixvector (const SeqRotMatrixVector &matrixVec)
 
STD_string get_program (programContext &context) const
 
double get_duration () const
 
STD_string get_properties () const
 
void query (queryContext &context) const
 
RecoValList get_recovallist (unsigned int reptimes, LDRkSpaceCoords &coords) const
 
SeqValList get_freqvallist (freqlistAction action) const
 
SeqValList get_delayvallist () const
 
double get_rf_energy () const
 
- Public Member Functions inherited from SeqTreeObj
bool contains (const SeqTreeObj *sto) const
 
void tree (SeqTreeCallbackAbstract *display) const
 
- Public Member Functions inherited from SeqClass
SeqClassset_temporary ()
 
- Public Member Functions inherited from Labeled
 Labeled (const STD_string &label="unnamed")
 
Labeledset_label (const STD_string &label)
 
const STD_string & get_label () const
 
Labeledoperator= (const Labeled &l)
 
- Public Member Functions inherited from List< SeqObjBase, const SeqObjBase *, const SeqObjBase & >
 List ()
 
 ~List ()
 
Listoperator= (const List &l)
 
Listclear ()
 
Listappend (const SeqObjBase & item)
 
Listremove (const SeqObjBase & item)
 
unsigned int size () const
 
iter get_begin ()
 
iter get_end ()
 
constiter get_const_begin () const
 
constiter get_const_end () const
 

Protected Member Functions

virtual void method_pars_init ()=0
 
virtual void method_seq_init ()=0
 
virtual void method_rels ()=0
 
virtual void method_pars_set ()=0
 
SeqMethodappend_parameter (LDRbase &ldr, const STD_string &label, parameterMode parmode=edit)
 
SeqMethodset_sequence (const SeqObjBase &s)
 
SeqMethodset_description (const char *descr)
 
virtual unsigned int numof_testcases () const
 
unsigned int get_current_testcase () const
 
- Protected Member Functions inherited from SeqObjList
void clear_container ()
 
bool prep ()
 
 SeqObjList (const STD_string &object_label="unnamedSeqObjList")
 
 SeqObjList (const SeqObjList &so)
 
SeqObjListoperator= (const SeqObjList &so)
 
SeqObjListoperator= (const SeqObjLoop &sl)
 
SeqObjListoperator= (const SeqDecoupling &sd)
 
SeqObjListoperator= (const SeqObjBase &soa)
 
SeqObjListoperator= (SeqGradObjInterface &sgoa)
 
SeqObjListoperator= (SeqGradChan &sgc)
 
SeqObjListoperator= (SeqGradChanList &sgcl)
 
SeqObjListoperator+= (const SeqObjBase &soa)
 
SeqObjListoperator+= (SeqGradObjInterface &sgoa)
 
SeqObjListoperator+= (SeqGradChan &sgc)
 
SeqObjListoperator+= (SeqGradChanList &sgcl)
 
SeqObjListset_gradrotmatrixvector (const SeqRotMatrixVector &matrixVec)
 
STD_string get_program (programContext &context) const
 
double get_duration () const
 
STD_string get_properties () const
 
void query (queryContext &context) const
 
RecoValList get_recovallist (unsigned int reptimes, LDRkSpaceCoords &coords) const
 
SeqValList get_freqvallist (freqlistAction action) const
 
SeqValList get_delayvallist () const
 
double get_rf_energy () const
 
bool contains (const SeqTreeObj *sto) const
 
void tree (SeqTreeCallbackAbstract *display) const
 
- Protected Member Functions inherited from SeqClass
void marshall_error () const
 
SeqClassset_temporary ()
 
- Protected Member Functions inherited from Labeled
 Labeled (const STD_string &label="unnamed")
 
Labeledset_label (const STD_string &label)
 
const STD_string & get_label () const
 
Labeledoperator= (const Labeled &l)
 
- Protected Member Functions inherited from List< SeqObjBase, const SeqObjBase *, const SeqObjBase & >
 List ()
 
 ~List ()
 
Listoperator= (const List &l)
 
Listclear ()
 
Listappend (const SeqObjBase & item)
 
Listremove (const SeqObjBase & item)
 
unsigned int size () const
 
iter get_begin ()
 
iter get_end ()
 
constiter get_const_begin () const
 
constiter get_const_end () const
 

Protected Attributes

SeqParscommonPars
 

Friends

class SeqMethodProxy
 
class SeqCmdLine
 

Additional Inherited Members

- Public Types inherited from List< SeqObjBase, const SeqObjBase *, const SeqObjBase & >
typedef STD_list< const SeqObjBase * >::iterator iter
 
typedef STD_list< const SeqObjBase * >::const_iterator constiter
 
- Protected Types inherited from List< SeqObjBase, const SeqObjBase *, const SeqObjBase & >
typedef STD_list< const SeqObjBase * >::iterator iter
 
typedef STD_list< const SeqObjBase * >::const_iterator constiter
 
- Static Protected Member Functions inherited from SeqClass
static void clear_temporary ()
 
static void clear_containers ()
 

Detailed Description

Base class for methods (sequences)

The base class for all NMR sequences. To create a new sequence, write a new class which is derived from SeqMethod and overload the following virtual functions with the specified functionality:

To get an idea what has to be done in each function, please take a look at the example sequences.

Definition at line 155 of file seqmeth.h.

Constructor & Destructor Documentation

◆ SeqMethod()

SeqMethod::SeqMethod ( const STD_string &  method_label)

Constructs a method with the given label.

◆ ~SeqMethod()

virtual SeqMethod::~SeqMethod ( )
virtual

Destructor

Member Function Documentation

◆ append_parameter()

SeqMethod& SeqMethod::append_parameter ( LDRbase ldr,
const STD_string &  label,
parameterMode  parmode = edit 
)
protected

Append a user defined parameter to the list of parameters that describe the method

◆ build()

bool SeqMethod::build ( )
inline

Performs state transition to 'built'

Definition at line 185 of file seqmeth.h.

◆ clear()

bool SeqMethod::clear ( )
inline

Performs state transition to 'empty'

Definition at line 175 of file seqmeth.h.

◆ event()

unsigned int SeqMethod::event ( eventContext context) const
virtual

Queries the sequence tree for events, returns the number of events executed

Reimplemented from SeqObjList.

◆ get_active_pulsar_pulses()

STD_list<const SeqPulsar*> SeqMethod::get_active_pulsar_pulses ( ) const

Returns a list of Pulsar pulses which are currently active.

◆ get_commonPars()

SeqPars& SeqMethod::get_commonPars ( )
inline

Returns the current set of common sequence parameters

Definition at line 259 of file seqmeth.h.

◆ get_current_testcase()

unsigned int SeqMethod::get_current_testcase ( ) const
inlineprotected

Returns the index of the current test case, used in method_pars_init to assign different parameter settings for each test case.

Definition at line 394 of file seqmeth.h.

◆ get_description()

const char* SeqMethod::get_description ( ) const
inline

Returns the description of the method

Definition at line 211 of file seqmeth.h.

◆ get_geometry()

Geometry& SeqMethod::get_geometry ( )
inline

Returns the current geometry

Definition at line 269 of file seqmeth.h.

◆ get_main_nucleus()

STD_string SeqMethod::get_main_nucleus ( ) const
inline

Returns the current main nucleus of the sequence, i.e. the nucleus for which both, excitation and acquisition, will be performed

Definition at line 319 of file seqmeth.h.

◆ get_methodPars()

LDRblock& SeqMethod::get_methodPars ( )
inline

Returns the method-specific parameters

Definition at line 233 of file seqmeth.h.

◆ get_numof_acquisitions()

unsigned int SeqMethod::get_numof_acquisitions ( ) const

Returns the total number of acquisition windows in the sequence.

◆ get_studyInfo()

Study& SeqMethod::get_studyInfo ( )
inline

Returns reference to the current study info

Definition at line 284 of file seqmeth.h.

◆ get_totalDuration()

double SeqMethod::get_totalDuration ( ) const

Returns the scan duration for this method

◆ init()

bool SeqMethod::init ( )
inline

Performs state transition to 'initialised'

Definition at line 180 of file seqmeth.h.

◆ init_systemInfo()

SeqMethod& SeqMethod::init_systemInfo ( double  basicfreq,
double  maxgrad,
double  slewrate 
)

Initialises the method with the given system-specific stuff

◆ load_geometry()

int SeqMethod::load_geometry ( const STD_string &  filename)
inline

Loads the current geometry from disk

Definition at line 274 of file seqmeth.h.

◆ load_protocol()

int SeqMethod::load_protocol ( const STD_string &  filename)

Loads the sequence protocol (systemInfo, geometryInfo, sequencePars) from file 'filename'

◆ load_sequencePars()

int SeqMethod::load_sequencePars ( const STD_string &  filename)

Loads the sequence parameters (commonPars & methodPars) from file

◆ load_systemInfo()

int SeqMethod::load_systemInfo ( const STD_string &  filename)

Loads the systemInfo from disk

◆ method_pars_init()

virtual void SeqMethod::method_pars_init ( )
protectedpure virtual

This function must be implemented by the method programmer. It should contain all code that initialies parameters of the method.

◆ method_pars_set()

virtual void SeqMethod::method_pars_set ( )
protectedpure virtual

This function must be implemented by the method programmer. It should contain all code that is called only once before the sequence is started, e.g. the setup of the reconsruction.

◆ method_rels()

virtual void SeqMethod::method_rels ( )
protectedpure virtual

This function must be implemented by the method programmer. It should contain all code that changes the aspects of the sequence objects without changing their serialisation, .e.g. timing calculations should be coded in this function.

◆ method_seq_init()

virtual void SeqMethod::method_seq_init ( )
protectedpure virtual

This function must be implemented by the method programmer. It should contain all code that initialises the sequence objects and their arrangement.

◆ numof_testcases()

virtual unsigned int SeqMethod::numof_testcases ( ) const
inlineprotectedvirtual

This function can be implemented by the method programmer to indicate how many different use cases are there to be tested during sequence test.

Definition at line 388 of file seqmeth.h.

◆ prep_acquisition()

bool SeqMethod::prep_acquisition ( ) const

Prepares the acquisition parameters, i.e. recoInfo structure and performs platform specific preparation (generating pulse program, etc.). This function will be called by the current frontend (ODIN GUI, odin2idea, ...) prior to the measurement.

◆ prepare()

bool SeqMethod::prepare ( )
inline

Performs state transition to 'prepared'

Definition at line 190 of file seqmeth.h.

◆ process()

int SeqMethod::process ( int  argc,
char *  argv[] 
)

This function is used in the ODINMAIN function to hand over control to the SeqMethod object.

◆ set_commonPars()

SeqMethod& SeqMethod::set_commonPars ( const SeqPars pars)

Sets the current set of common sequence parameters

◆ set_description()

SeqMethod& SeqMethod::set_description ( const char *  descr)
inlineprotected

Specifies the description of the method

Definition at line 381 of file seqmeth.h.

◆ set_geometry()

SeqMethod& SeqMethod::set_geometry ( const Geometry geo)
inline

Sets the current geometry to 'geo'

Definition at line 264 of file seqmeth.h.

◆ set_sequence()

SeqMethod& SeqMethod::set_sequence ( const SeqObjBase s)
protected

This function is used to specify the sequence of this method that will be played out

◆ set_sequenceParameter()

bool SeqMethod::set_sequenceParameter ( const STD_string &  parameter_label,
const STD_string &  value 
)

Sets the value of the sequence parameter 'parameter_label' to 'value'. Returns true if successful.

◆ update_timings()

bool SeqMethod::update_timings ( )

Updates the timing of the sequence (TR, TE) without changing its structure. If the sequence is not yet in the 'built' state, this state will be obtained first.

◆ write_geometry()

int SeqMethod::write_geometry ( const STD_string &  filename) const
inline

Writes the current geometry to disk

Definition at line 279 of file seqmeth.h.

◆ write_meas_contex()

int SeqMethod::write_meas_contex ( const STD_string &  prefix) const

Writes all files which describe the measurement, uses the given filename-prefix

◆ write_protocol()

int SeqMethod::write_protocol ( const STD_string &  filename) const
inline

Writes the sequence protocol (systemInfo, geometryInfo, sequencePars) to file 'filename'

Definition at line 227 of file seqmeth.h.

◆ write_recoInfo()

int SeqMethod::write_recoInfo ( const STD_string &  filename) const

Writes the recoInfo to disk

◆ write_sequencePars()

int SeqMethod::write_sequencePars ( const STD_string &  filename) const

Writes the sequence parameters (commonPars & methodPars) to file

◆ write_systemInfo()

int SeqMethod::write_systemInfo ( const STD_string &  filename) const
inline

Writes the systemInfo to disk

Definition at line 289 of file seqmeth.h.

Member Data Documentation

◆ commonPars

SeqPars* SeqMethod::commonPars
protected

Pointer to the current set of common sequence parameters

Definition at line 400 of file seqmeth.h.


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