SeqMethod Class Reference
[Classes for sequence design (odinseq library)]

Base class for methods (sequences). More...

#include <seqmeth.h>

Inheritance diagram for SeqMethod:

Inheritance graph
[legend]
Collaboration diagram for SeqMethod:

Collaboration graph
[legend]
List of all members.

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[])
const Protocolget_protocol () const
int load_protocol (const STD_string &filename)
int write_protocol (const STD_string &filename) const
JcampDxBlockget_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 prep_numof_acquisitions () const
STD_list< const SeqPulsar * > get_active_pulsar_pulses () const
unsigned int event (eventContext &context) const
void set_current_testcase (unsigned int index)

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 (JcampDxClass &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 Attributes

SeqParscommonPars

Friends

class SeqMethodProxy
class SeqCmdLine

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 ( const STD_string &  method_label  ) 

Constructs a method with the given label.

virtual SeqMethod::~SeqMethod (  )  [virtual]

Destructor


Member Function Documentation

bool SeqMethod::clear (  )  [inline]

Performs state transition to 'empty'

Reimplemented from List< I, P, R >.

Definition at line 175 of file seqmeth.h.

bool SeqMethod::init (  )  [inline]

Performs state transition to 'initialised'

Definition at line 180 of file seqmeth.h.

bool SeqMethod::build (  )  [inline]

Performs state transition to 'built'

Definition at line 185 of file seqmeth.h.

bool SeqMethod::prepare (  )  [inline]

Performs state transition to 'prepared'

Definition at line 190 of file seqmeth.h.

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.

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.

const char* SeqMethod::get_description (  )  const [inline]

Returns the description of the method

Definition at line 211 of file seqmeth.h.

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

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

const Protocol& SeqMethod::get_protocol (  )  const

Returns a snapshot of the current sequence protocol (systemInfo, geometryInfo, sequencePars)

int SeqMethod::load_protocol ( const STD_string &  filename  ) 

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

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

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

Definition at line 232 of file seqmeth.h.

JcampDxBlock& SeqMethod::get_methodPars (  )  [inline]

Returns the method-specific parameters

Definition at line 238 of file seqmeth.h.

int SeqMethod::load_sequencePars ( const STD_string &  filename  ) 

Loads the sequence parameters (commonPars & methodPars) from file

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

Writes the sequence parameters (commonPars & methodPars) to file

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.

SeqMethod& SeqMethod::set_commonPars ( const SeqPars pars  ) 

Sets the current set of common sequence parameters

SeqPars& SeqMethod::get_commonPars (  )  [inline]

Returns the current set of common sequence parameters

Definition at line 264 of file seqmeth.h.

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

Sets the current geometry to 'geo'

Definition at line 269 of file seqmeth.h.

Geometry& SeqMethod::get_geometry (  )  [inline]

Returns the current geometry

Definition at line 274 of file seqmeth.h.

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

Loads the current geometry from disk

Definition at line 279 of file seqmeth.h.

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

Writes the current geometry to disk

Definition at line 284 of file seqmeth.h.

Study& SeqMethod::get_studyInfo (  )  [inline]

Returns reference to the current study info

Definition at line 290 of file seqmeth.h.

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

Writes the systemInfo to disk

Definition at line 296 of file seqmeth.h.

int SeqMethod::load_systemInfo ( const STD_string &  filename  ) 

Loads the systemInfo from disk

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

Initialises the method with the given system-specific stuff

int SeqMethod::write_recoInfo ( const STD_string &  filename  )  const [inline]

Writes the recoInfo to disk

Definition at line 311 of file seqmeth.h.

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

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

double SeqMethod::get_totalDuration (  )  const

Returns the scan duration for this method

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 327 of file seqmeth.h.

unsigned int SeqMethod::prep_numof_acquisitions (  )  const

Returns the total number of acquisition windows in the sequence. It also passes this values to SeqAcq and resets the acquisition counter.

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

Returns a list of Pulsar pulses which are currently active.

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

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

Reimplemented from SeqObjList.

virtual void SeqMethod::method_pars_init (  )  [protected, pure virtual]

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

virtual void SeqMethod::method_seq_init (  )  [protected, pure virtual]

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

virtual void SeqMethod::method_rels (  )  [protected, pure 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.

virtual void SeqMethod::method_pars_set (  )  [protected, pure 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.

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

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

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

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

SeqMethod& SeqMethod::set_description ( const char *  descr  )  [inline, protected]

Specifies the description of the method

Definition at line 391 of file seqmeth.h.

virtual unsigned int SeqMethod::numof_testcases (  )  const [inline, protected, virtual]

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 398 of file seqmeth.h.

unsigned int SeqMethod::get_current_testcase (  )  const [inline, protected]

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 404 of file seqmeth.h.


Member Data Documentation

SeqPars* SeqMethod::commonPars [protected]

Pointer to the current set of common sequence parameters

Definition at line 410 of file seqmeth.h.


The documentation for this class was generated from the following file:
Generated on Sat Jun 14 12:32:32 2008 by  doxygen 1.5.1