![]() |
JEMRIS 2.9.2
open-source MRI simulations
|
Module super class! ABC for all Objects in the sequence framework. More...
#include <Module.h>
Inheritance diagram for Module:
Collaboration diagram for Module:Public Member Functions | |
| Module () | |
| Constructor. | |
| virtual | ~Module () |
| Destructor. | |
| Module (const Module &) | |
| Copy constructor. | |
| virtual Module * | Clone () const =0 |
| Clone a module. | |
| virtual void | GetValue (double *dAllVal, double const time) |
| Get the value of this element. | |
| virtual bool | Prepare (const PrepareMode mode) |
| Prepare this pulse. | |
| void | Initialize (DOMNode *node) |
| Initialize this module. | |
| Module * | GetParent () |
| Get Parent. | |
| virtual double | GetDuration ()=0 |
| virtual int | GetNumOfTPOIs () |
| Get the Number of TPOIs of this module. | |
| vector< Module * > | GetChildren () const |
| Get Children. | |
| vector< Module * > | GetChildrenDynamic () const |
| Get Children dynamic (old non-cached version for dynamic events such as eddy currents) | |
| Module * | GetChild (unsigned int position) const |
| Get Child. | |
| int | GetNumberOfChildren () const |
| Get number of Children. | |
| bool | InsertChild (const string &name) |
| Insert Child. | |
| virtual Module * | GetPrototypeByAttributeValue (string name, string attrib) |
| Get a Prototype by value of an attribute. | |
| bool | AddDOMattribute (const string attribute, const string value) |
| Add attribute and value to the DOM node of this module. | |
| void | AddAllDOMattributes (bool show_hidden=true) |
| virtual TPOI * | GetTPOIs () |
| get the TPOIs of this module | |
| void | DumpTree (const string &file="", Module *mod=NULL, int ichild=0, int level=0) |
| Dump the sequence tree. | |
| int | GetDepth (int depth=0) |
| Return tree depth from this module (including depth of Containers) | |
| int | GetHardwareMode () |
| Return the hardware mode of this module. | |
| bool | WriteStaticXML (const string &xml_file) |
| Rewrite XML-tree where all expressions are evaluated (for IDEA) | |
| bool | StaticDOM (DOMDocument *doc, DOMNode *node, bool append=true) |
| Create a DOM tree where all expressions are evaluated (for IDEA) | |
| void | SetSeqTree (SequenceTree *pST) |
| SequenceTree * | GetSeqTree () |
Public Member Functions inherited from Prototype | |
| Prototype () | |
| Constructor. | |
| virtual | ~Prototype () |
| Default destructor. | |
| Prototype (const Prototype &) | |
| Default copy constructor. | |
| bool | IsPrepared () |
| Check if the Prototype is prepared. | |
| void | SetName (string name) |
| Set the name of this module. | |
| DOMNode * | GetNode () |
| Get the DOMNode of this module. | |
| void | SetNode (DOMNode *node) |
| Set the DOMNode of this module. | |
| string | GetClassType () |
| Get the class type of this prototype. | |
| Type | GetType () |
| Get the module type of this module. | |
| string | GetDOMattribute (const string attribute) |
| Get attribute value from the DOMNode. | |
| bool | HasDOMattribute (const string attribute) |
| Check, if attribute exists in DOM node of this module. | |
| Attribute * | GetAttribute (string name) |
| Get an Attribute. | |
| void | CopyObservers (Attribute *a1, Attribute *a2) |
| Copy observers from one attribute to another. | |
| bool | HasAttribute (string name) |
| Check if an attribute exist. | |
| void | HideAttribute (string attrib, bool observable=true) |
| Hide an attribute. | |
| string | GetName () |
| Get the name of this module. | |
| bool | Observe (Attribute *attrib, string prot_name, string attrib_name, bool verbose) |
| Set up the list of observations. | |
| 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. | |
| template<typename T > | |
| bool | NewState (const T &val) |
| Check the state of an attribute. | |
| 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. | |
Protected Member Functions | |
| virtual string | GetInfo () |
| Get informations on this module. | |
Protected Attributes | |
| SequenceTree * | m_seq_tree |
| Reference to the sequence tree. | |
| Parameters * | m_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. | |
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. | |
| 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. | |
Module super class! ABC for all Objects in the sequence framework.
| Module::Module | ( | ) |
Constructor.
Default constructor
|
inlinevirtual |
Destructor.
Default destrcutor
| Module::Module | ( | const Module & | ) |
Copy constructor.
Default copy constructor.
| void Module::AddAllDOMattributes | ( | bool | show_hidden = true | ) |
More elaborate desciption here please
Here is the call graph for this function:
Here is the caller graph for this function:| bool Module::AddDOMattribute | ( | const string | attribute, |
| const string | value ) |
Add attribute and value to the DOM node of this module.
| attribute | The new attribute of the DOMNode |
| value | The corresponding value |
Here is the call graph for this function:
Here is the caller graph for this function:
|
pure virtual |
Clone a module.
Create and recieve a Clone of an unprepared module.
Implements Prototype.
Implemented in AnalyticGradPulse, AnalyticRFPulse, AtomicSequence, ConcatSequence, ConstantGradPulse, Container, ContainerSequence, DelayAtomicSequence, EddyPulse, EmptyPulse, ExternalGradPulse, ExternalRFPulse, GaussianRFPulse, HardRFPulse, Parameters, SechRFPulse, SincRFPulse, SpiralGradPulse, TrapGradPulse, and TriangleGradPulse.
Here is the caller graph for this function:| void Module::DumpTree | ( | const string & | file = "", |
| Module * | mod = NULL, | ||
| int | ichild = 0, | ||
| int | level = 0 ) |
Dump the sequence tree.
| file | Optional output file. If, NULL stdout is used. |
| mod | The starting module from which the tree is dumped. |
| ichild | More elaborate description |
| level | More elaborate description |
Here is the call graph for this function:
Here is the caller graph for this function:| Module * Module::GetChild | ( | unsigned int | position | ) | const |
Get Child.
| position | The position in the list of children. |
Here is the call graph for this function:
Here is the caller graph for this function:| vector< Module * > Module::GetChildren | ( | ) | const |
Get Children.
Here is the call graph for this function:
Here is the caller graph for this function:| vector< Module * > Module::GetChildrenDynamic | ( | ) | const |
Get Children dynamic (old non-cached version for dynamic events such as eddy currents)
Here is the call graph for this function:
Here is the caller graph for this function:| int Module::GetDepth | ( | int | depth = 0 | ) |
Return tree depth from this module (including depth of Containers)
| depth | the depth so far |
Here is the call graph for this function:
Here is the caller graph for this function:
|
pure virtual |
Get the duration of this module.
Implemented in AtomicSequence, ConcatSequence, Container, Parameters, and Pulse.
Here is the caller graph for this function:
|
inline |
Return the hardware mode of this module.
The hardware mode defines whether the module is included in simulation and/or hardware instructions. Valid modes are: -1: simulation only 1: hardare only 0: both simulation and hardware
A module will be included in the output files as follows:
| Mode | In seq.h5 | In external.seq |
|---|---|---|
| -1 | Yes | No |
| 0 | Yes | Yes |
| 1 | No | Yes |
Here is the caller graph for this function:
|
inlineprotectedvirtual |
Get informations on this module.
Reimplemented in AnalyticGradPulse, AnalyticRFPulse, AtomicSequence, ConcatSequence, ConstantGradPulse, Container, ContainerSequence, DelayAtomicSequence, EddyPulse, EmptyPulse, ExternalGradPulse, ExternalRFPulse, GradPulse, Pulse, RFPulse, SincRFPulse, SpiralGradPulse, TrapGradPulse, and TriangleGradPulse.
Here is the caller graph for this function:| int Module::GetNumberOfChildren | ( | ) | const |
Get number of Children.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinevirtual |
Get the Number of TPOIs of this module.
Reimplemented in ConcatSequence, and Container.
Here is the call graph for this function:
Here is the caller graph for this function:
|
virtual |
Get Parent.
Reimplemented from Prototype.
Here is the call graph for this function:
Here is the caller graph for this function:
|
virtual |
|
inlinevirtual |
get the TPOIs of this module
Here is the caller graph for this function:
|
inlinevirtual |
Get the value of this element.
Calculate the value of the particular pulse at a given time in a given cycle and put the values put the values in dAllVal. Successors must implements this method.
| dAllVal | is an array of 5 doubles. {amplitude, phase, Gx, Gy, Gz} Gx, Gy, Gz equal to 1.0 for the direction of the Axis. 0.0 else. |
| time | constant double value of the time of invocation. |
Reimplemented in AtomicSequence, ConcatSequence, Container, DelayAtomicSequence, EddyPulse, GradPulse, RFPulse, and Sequence.
|
virtual |
Initialize this module.
The first step after cloning! The method sets the Name of the Module, and pointers to the referring node and the (unique) SequenceTree.
| node | The DOMNode referring to this module. |
Implements Prototype.
Here is the call graph for this function:
Here is the caller graph for this function:| bool Module::InsertChild | ( | const string & | name | ) |
Insert Child.
| name | The name of the module from the ModulePrototypeFactory |
Here is the call graph for this function:
Here is the caller graph for this function:
|
virtual |
Prepare this pulse.
Called twice when root node prepares. First time not verbose. Successors must overload this method.
| mode | Sets the preparation mode, one of enum PrepareMode {PREP_INIT,PREP_VERBOSE,PREP_UPDATE}. |
Implements Prototype.
Reimplemented in AnalyticGradPulse, AtomicSequence, ConcatSequence, ConstantGradPulse, Container, ContainerSequence, DelayAtomicSequence, ExternalGradPulse, ExternalRFPulse, HardRFPulse, Pulse, RFPulse, Sequence, SpiralGradPulse, TriangleGradPulse, Parameters, AnalyticRFPulse, EddyPulse, EmptyPulse, GaussianRFPulse, GradPulse, SechRFPulse, SincRFPulse, and TrapGradPulse.
Here is the call graph for this function:
Here is the caller graph for this function:| bool Module::StaticDOM | ( | DOMDocument * | doc, |
| DOMNode * | node, | ||
| bool | append = true ) |
Create a DOM tree where all expressions are evaluated (for IDEA)
| doc | Document |
| node | Node |
| append | Append to node? |
Here is the caller graph for this function:| bool Module::WriteStaticXML | ( | const string & | xml_file | ) |
Rewrite XML-tree where all expressions are evaluated (for IDEA)
| xml_file | name of XML file |
Here is the call graph for this function:
-- last change 03.01.2025 |
Tony Stoecker |
Imprint |
Data Protection --