![]() |
JEMRIS 2.9.2
open-source MRI simulations
|
Prototype super class. More...
#include <Prototype.h>
Inheritance diagram for Prototype:
Collaboration diagram for Prototype:Public Member Functions | |
| Prototype () | |
| Constructor. | |
| virtual | ~Prototype () |
| Default destructor. | |
| Prototype (const Prototype &) | |
| Default copy constructor. | |
| virtual Prototype * | GetParent () |
| Get Parent. | |
| virtual Prototype * | Clone () const =0 |
| Clone a prototype. | |
| virtual bool | Prepare (PrepareMode mode)=0 |
| Prepare this pulse. | |
| bool | IsPrepared () |
| Check if the Prototype is prepared. | |
| virtual void | Initialize (DOMNode *conf)=0 |
| Initialise this prototype. | |
| 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. | |
| virtual Prototype * | GetPrototypeByAttributeValue (string name, string attrib) |
| Get a Prototype by value of 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. | |
Static Public Member Functions | |
| 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. | |
Protected Attributes | |
| 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. | |
Prototype super class.
|
inline |
Constructor.
Default constructor
|
inlinevirtual |
Default destructor.
Delete my attributes
|
inline |
Default copy constructor.
Default copy constructor.
|
pure virtual |
Clone a prototype.
Create and recieve a Clone of an unprepared prototype.
Implemented in AnalyticCoil, AnalyticGradPulse, AnalyticRFPulse, AtomicSequence, BiotSavartLoop, ConcatSequence, ConstantGradPulse, Container, ContainerSequence, DelayAtomicSequence, EddyPulse, EmptyPulse, ExternalCoil, ExternalGradPulse, ExternalRFPulse, GaussianRFPulse, HardRFPulse, IdealCoil, Parameters, SechRFPulse, SincRFPulse, SpiralGradPulse, TrapGradPulse, TriangleGradPulse, Coil, and Module.
Here is the caller graph for this function:Copy observers from one attribute to another.
| a1 | source attribute (copy from here) |
| a1 | target attribute (copy to here) |
Here is the call graph for this function:
Here is the caller graph for this function:| Attribute * Prototype::GetAttribute | ( | string | name | ) |
|
inline |
Get the class type of this prototype.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Get attribute value from the DOMNode.
| attribute | The attribute of the DOMNode corresponding to this Module. |
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Get the name of this module.
Here is the caller graph for this function:
|
inline |
Get the DOMNode of this module.
Here is the caller graph for this function:
|
inlinevirtual |
Get Parent.
Reimplemented in Module.
Here is the caller graph for this function:
|
inlinevirtual |
|
inline |
Get the module type of this module.
Here is the caller graph for this function:
|
inline |
|
inline |
Check if an attribute exist.
| name | The name of the attribute |
Here is the call graph for this function:
|
inline |
Check, if attribute exists in DOM node of this module.
| attribute | The attribute of the DOMNode corresponding to this Module. |
Here is the call graph for this function:
Here is the caller graph for this function:| void Prototype::HideAttribute | ( | string | attrib, |
| bool | observable = true ) |
Hide an attribute.
Attributes, which were declared with the ATTRIBUTE command in a base class will be declared as invisible, i.e. they can not be set through XML. This method has to called in the particular Prepare function of a method, however, after the base class Prepare call.
| attrib | Name of the attribute to hide |
| observable | Keep this attribute still observable? (default: true) |
Here is the call graph for this function:
Here is the caller graph for this function:
|
pure virtual |
|
inline |
Check if the Prototype is prepared.
Here is the caller graph for this function:
|
inline |
Check the state of an attribute.
| private | member variable. |
Here is the caller graph for this function:
|
inline |
Notify all observers of an attribute.
| val | member variable. |
Here is the caller graph for this function:| bool Prototype::Observe | ( | Attribute * | attrib, |
| string | prot_name, | ||
| string | attrib_name, | ||
| bool | verbose ) |
Set up the list of observations.
This function creates an Attribute list for all observations from this Prototype. It further attaches the current attribute to the observer list of the observed attributes.
| attrib | The observer (An Attribute of this Prototype) |
| prot_name | Name of the Prototype which holds the Attribute to observe |
| attrib_name | Name of the Attribute to observe |
| verbose | If true, dump possible warnings to stdout |
Here is the call graph for this function:
Here is the caller graph for this function:
|
pure virtual |
Prepare this pulse.
Called many times 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}. |
Implemented in AnalyticCoil, AnalyticGradPulse, AtomicSequence, BiotSavartLoop, Coil, ConcatSequence, ConstantGradPulse, Container, ContainerSequence, DelayAtomicSequence, ExternalCoil, ExternalGradPulse, ExternalRFPulse, HardRFPulse, Module, 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:
|
static |
A global sub-string replacer.
| str | The string to change. |
| s1 | The sub-string to be replaced. |
| s2 | The sub-string to be inserted instead. |
Here is the caller graph for this function:| void Prototype::SetName | ( | string | name | ) |
Set the name of this module.
| name | New name of this module |
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Set the DOMNode of this module.
| node | The new DOMNode |
Here is the caller graph for this function:
|
static |
A global string tokenizer.
| str | The string to tokenize. |
| delimiters | The delimiters to split the string. |
Here is the caller graph for this function:
-- last change 03.01.2025 |
Tony Stoecker |
Imprint |
Data Protection --