JEMRIS  2.8.1
open-source MRI simulations
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes | Friends
Pulse Class Reference

Pulse Super Class. ABC for all RF and gradient pulses. More...

#include <Pulse.h>

+ Inheritance diagram for Pulse:
+ Collaboration diagram for Pulse:

Public Member Functions

 Pulse ()
 Construct and initialise some values.
 
virtual ~Pulse ()
 Default destructor.
 
 Pulse (const Pulse &)
 Copy constructor.
 
virtual void GetValue (double *dAllVal, double const time) const
 
virtual bool Prepare (const PrepareMode mode)
 see Module::Prepare()
 
void SetDuration (double val)
 Set the duration of this pulse. More...
 
double GetDuration ()
 
void SetAxis (const PulseAxis eAxis)
 Set the Axis of propagation of this pulse. More...
 
PulseAxis GetAxis () const
 Get the Axis of propagation of this pulse. More...
 
virtual void SetTPOIs ()
 Set time points of interest. More...
 
virtual void GenerateEvents (std::vector< Event * > &events)
 Generate an event to run on scanner hardware. More...
 
int GetNADC ()
 
void SetNADC (unsigned int nadc)
 Set number of ADCs. More...
 
double GetInitialDelay ()
 Get delay in respect of the AtomicSequence holding this pulse. More...
 
void SetPhaseLock (bool val)
 Set phase lock. More...
 
bool GetPhaseLock ()
 Get phase lock. More...
 
- Public Member Functions inherited from Module
 Module ()
 Constructor. More...
 
virtual ~Module ()
 Destructor. More...
 
 Module (const Module &)
 Copy constructor. More...
 
virtual ModuleClone () const =0
 Clone a module. More...
 
virtual void GetValue (double *dAllVal, double const time)
 Get the value of this element. More...
 
void Initialize (DOMNode *node)
 Initialize this module. More...
 
ModuleGetParent ()
 Get Parent. More...
 
virtual int GetNumOfTPOIs ()
 Get the Number of TPOIs of this module. More...
 
vector< Module * > GetChildren () const
 Get Children. More...
 
ModuleGetChild (unsigned int position) const
 Get Child. More...
 
int GetNumberOfChildren () const
 Get number of Children. More...
 
bool InsertChild (const string &name)
 Insert Child. More...
 
virtual ModuleGetPrototypeByAttributeValue (string name, string attrib)
 Get a Prototype by value of an attribute. More...
 
bool AddDOMattribute (const string attribute, const string value)
 Add attribute and value to the DOM node of this module. More...
 
void AddAllDOMattributes (bool show_hidden=true)
 
virtual TPOIGetTPOIs ()
 get the TPOIs of this module More...
 
void DumpTree (const string &file="", Module *mod=NULL, int ichild=0, int level=0)
 Dump the sequence tree. More...
 
int GetDepth (int depth=0)
 Return tree depth from this module (including depth of Containers) More...
 
int GetHardwareMode ()
 Return the hardware mode of this module. More...
 
bool WriteStaticXML (const string &xml_file)
 Rewrite XML-tree where all expressions are evaluated (for IDEA) More...
 
bool StaticDOM (DOMDocument *doc, DOMNode *node, bool append=true)
 Create a DOM tree where all expressions are evaluated (for IDEA) More...
 
void SetSeqTree (SequenceTree *pST)
 
SequenceTreeGetSeqTree ()
 
- Public Member Functions inherited from Prototype
 Prototype ()
 Constructor. More...
 
virtual ~Prototype ()
 Default destructor. More...
 
 Prototype (const Prototype &)
 Default copy constructor. More...
 
bool IsPrepared ()
 Check if the Prototype is prepared. More...
 
void SetName (string name)
 Set the name of this module. More...
 
DOMNode * GetNode ()
 Get the DOMNode of this module. More...
 
void SetNode (DOMNode *node)
 Set the DOMNode of this module. More...
 
string GetClassType ()
 Get the class type of this prototype. More...
 
Type GetType ()
 Get the module type of this module. More...
 
string GetDOMattribute (const string attribute)
 Get attribute value from the DOMNode. More...
 
bool HasDOMattribute (const string attribute)
 Check, if attribute exists in DOM node of this module. More...
 
AttributeGetAttribute (string name)
 Get an Attribute. More...
 
void CopyObservers (Attribute *a1, Attribute *a2)
 Copy observers from one attribute to another. More...
 
bool HasAttribute (string name)
 Check if an attribute exist. More...
 
void HideAttribute (string attrib, bool observable=true)
 Hide an attribute. More...
 
string GetName ()
 Get the name of this module. More...
 
bool Observe (Attribute *attrib, string prot_name, string attrib_name, bool verbose)
 Set up the list of observations. More...
 
bool Observe (Attribute *attrib, string prot_name, string attrib_name, string attrib_keyword, bool verbose)
 
template<typename T >
bool Notify (const T &val)
 Notify all observers of an attribute. More...
 
template<typename T >
bool NewState (const T &val)
 Check the state of an attribute. More...
 
vector< double > * GetVector ()
 Each Prototype has a double vector as a private member, which values can be filled through XML and accessed from attributes within the same Prototype. More...
 

Protected Member Functions

virtual string GetInfo ()
 

Protected Attributes

PulseAxis m_axis
 
unsigned int m_adc
 
double m_initial_delay
 
bool m_phase_lock
 
- Protected Attributes inherited from Module
SequenceTreem_seq_tree
 Reference to the sequence tree.
 
Parametersm_parameters
 Pointer to the sole instance of the Parameters.
 
TPOI m_tpoi
 Time points of interest are stored the referred repository.
 
string m_info
 Information string for this module.
 
double m_duration
 The duration of this module.
 
int m_calls
 Number of calls of this module.
 
int m_hardware_mode
 Hardware mode (-1: simulation only; 0: both; 1: hardware only)
 
- Protected Attributes inherited from Prototype
bool m_aux
 auxiliary helper variable for debugging purposes
 
bool m_prepared
 True, after the first call to Prepare.
 
string m_name
 Name of this Prototype.
 
DOMNode * m_node
 The node configuring this Module.
 
Type m_type
 The type of the module: one of MOD_PULSE, MOD_ATOM, MOD_CONCAT.
 
vector< double > m_vector
 A vector which elements are accessible through loop counters.
 
map< string, Attribute * > m_attributes
 Map to connect a keyword with an Attribute.
 
vector< Attribute * > m_obs_attribs
 Vector of observed Attributes.
 
vector< string > m_obs_attrib_keyword
 Vector of user-defined Attribute names.
 

Friends

class AnalyticPulseShape
 
class ExternalPulseData
 

Additional Inherited Members

- Static Public Member Functions inherited from Prototype
static bool ReplaceString (string &str, const string &s1, const string &s2)
 A global sub-string replacer. More...
 
static bool ReplaceSymbolString (string &str, const string &s1, const string &s2)
 A global sub-string replacer which replaces only complete symbol strings.
 
static vector< string > Tokenize (const string &str, const string &delimiters=",")
 A global string tokenizer. More...
 

Detailed Description

Pulse Super Class. ABC for all RF and gradient pulses.

Member Function Documentation

virtual void Pulse::GenerateEvents ( std::vector< Event * > &  events)
inlinevirtual

Generate an event to run on scanner hardware.

Must be overloaded by pulse shapes. New events are allocated on the heap and pointers are stored in the events vector.

Parameters
eventsvector to store new events

Reimplemented in RFPulse, GradPulse, TrapGradPulse, and EmptyPulse.

+ Here is the caller graph for this function:

PulseAxis Pulse::GetAxis ( ) const
inline

Get the Axis of propagation of this pulse.

Get the Axis of propagation of this pulse to the given PulseAxis.

Returns
Axis of propagation.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double Pulse::GetDuration ( )
inlinevirtual

See Module::GetDuration

Implements Module.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

string Pulse::GetInfo ( )
protectedvirtual

Get informations on this Pulse

Returns
Infos

Reimplemented from Module.

Reimplemented in RFPulse, EddyPulse, GradPulse, TrapGradPulse, AnalyticRFPulse, ExternalRFPulse, SincRFPulse, ExternalGradPulse, EmptyPulse, AnalyticGradPulse, TriangleGradPulse, SpiralGradPulse, and ConstantGradPulse.

+ Here is the caller graph for this function:

double Pulse::GetInitialDelay ( )
inline

Get delay in respect of the AtomicSequence holding this pulse.

Returns
Delay in respect to start of the AtomicSequence.

+ Here is the caller graph for this function:

int Pulse::GetNADC ( )
inline
Returns
Get number of ADCs
Number of ADCs

+ Here is the caller graph for this function:

bool Pulse::GetPhaseLock ( )
inline

Get phase lock.

Returns
Phase lock.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

virtual void Pulse::GetValue ( double *  dAllVal,
double const  time 
) const
inlinevirtual

See Module::GetValue

+ Here is the call graph for this function:

void Pulse::SetAxis ( const PulseAxis  eAxis)
inline

Set the Axis of propagation of this pulse.

Set the Axis of propagation of this pulse to the given PulseAxis.

Parameters
eAxisthe axis as stated above.

+ Here is the caller graph for this function:

void Pulse::SetDuration ( double  val)

Set the duration of this pulse.

Set the duration of this pulse to the given double value.

Parameters
valdouble as stated above.

+ Here is the caller graph for this function:

void Pulse::SetNADC ( unsigned int  nadc)
inline

Set number of ADCs.

Parameters
nadc
Returns
The private member m_ADCs.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Pulse::SetPhaseLock ( bool  val)
inline

Set phase lock.

Parameters
valPhase lock.

+ Here is the caller graph for this function:

void Pulse::SetTPOIs ( )
inlinevirtual

Set time points of interest.

Must be overloaded by non-constant pulse shapes! Further, the function needs to be called every time the PulseShape changes its timing!!!

Reimplemented in RFPulse, EddyPulse, TrapGradPulse, SincRFPulse, ExternalGradPulse, GaussianRFPulse, SechRFPulse, EmptyPulse, and ExternalRFPulse.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

unsigned int Pulse::m_adc
protected

Number of ADCs

PulseAxis Pulse::m_axis
protected

The axis of this pulse

double Pulse::m_initial_delay
protected

Time shift at the beginning inside the atom

bool Pulse::m_phase_lock
protected

Lock phase of ADCs to the phase of the last RF pulse event


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

-- last change 17.06.2016 | Tony Stoecker | Imprint --