JEMRIS  2.8.1
open-source MRI simulations
List of all members | Public Member Functions | Private Member Functions | Private Attributes
Simulator Class Reference

The simulator. More...

#include <Simulator.h>

+ Collaboration diagram for Simulator:

Public Member Functions

 Simulator (const std::string &fname, const std::string &fsample="", const std::string &frxarray="", const std::string &ftxarray="", const std::string &fsequence="", const std::string &fmodel="")
 Construct a new simulator with given XML descriptor. More...
 
virtual ~Simulator ()
 Default destructor.
 
bool GetStatus () const
 Get my status.
 
int GetEvolution () const
 Get my evolution counter.
 
string GetAttr (DOMElement *element, const string &key)
 Get a particular attribute value by a given key string. More...
 
string GetAtts (DOMElement *element, string *keys)
 Get a array of attributes given by the array of key strings. More...
 
DOMElement * GetElem (string name)
 Get a particular element from my DOM document. More...
 
void Simulate (bool bDumpSignal=true)
 Start the simulation after every necessary credentials have been set.
 
void SetSample (std::string fsample)
 Set my sample from XML.
 
void SetSample (Sample *sample)
 Set my sample to a new sample.
 
SampleGetSample ()
 Get the sample. More...
 
ModelGetModel ()
 Get the model. More...
 
ConcatSequenceGetSequence ()
 Get the sequence. More...
 
CoilArrayGetTxCoilArray ()
 Get the recieving coil array. More...
 
CoilArrayGetRxCoilArray ()
 Get the transmitting coil array. More...
 
void SetSequence (string seq="")
 Set my sequence according to XML configuration.
 
void CheckRestart ()
 Checks if restart files present; sets jemris state.
 
void DeleteTmpFiles ()
 
 Simulator ()
 Default constructor.
 
void SetWorld ()
 Initialize my world singleton.
 
void SetRxCoilArray (string frxarray="")
 Set up my recieve coils according to XML configuration.
 
void SetTxCoilArray (string ftxarray="")
 Set up my Transmit coils according to XML configuration.
 
void SetModel (string fmodel="")
 Set my solver model according to XML configuration.
 
void SetParameter ()
 Set miscellaneous parameters according to XML configuration.
 
void SetOutputDir (string output_dir)
 Set output directory.
 
void SetSignalPrefix (string prefix)
 Set signal prefix.
 

Private Member Functions

void MoveTmpFiles ()
 

Private Attributes

bool m_state
 My status.
 
int m_evol
 Evolution steps.
 
DOMDocument * m_dom_doc
 Simulation file.
 
Samplem_sample
 Sample.
 
Worldm_world
 World to be simulated.
 
Modelm_model
 Model to be simulated.
 
ConcatSequencem_sequence
 Sequence to be simulated.
 
SequenceTreem_seqtree
 SequenceTree to be simulated.
 
XMLIOm_xio
 XML file handler.
 
CoilArraym_tx_coil_array
 Transmit coil array.
 
CoilArraym_rx_coil_array
 Receive coil array.
 
DOMTreeErrorReporter * m_domtree_error_rep
 DOM tree error reporter.
 
KSpace< double, 4 > * m_kspace
 K-Space.
 
string m_output_dir
 Output directory.
 
string m_signal_prefix
 Signal prefix.
 

Detailed Description

The simulator.

Constructor & Destructor Documentation

Simulator::Simulator ( const std::string &  fname,
const std::string &  fsample = "",
const std::string &  frxarray = "",
const std::string &  ftxarray = "",
const std::string &  fsequence = "",
const std::string &  fmodel = "" 
)

Construct a new simulator with given XML descriptor.

Parameters
fnameFile name of XML configuration
fsampleFile name of sample
ftxarrayFile name of RX array
frxarrayFile name of TX array
fsequenceFile name of sequence
fmodelModel name

Member Function Documentation

void Simulator::DeleteTmpFiles ( )

delete restart files (after successful simulation)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

string Simulator::GetAttr ( DOMElement *  element,
const string &  key 
)

Get a particular attribute value by a given key string.

Parameters
elementThe element for which the attribute is requested
keyThe key of the attribute
Returns
The requested attribute string

+ Here is the caller graph for this function:

string Simulator::GetAtts ( DOMElement *  element,
string *  keys 
)

Get a array of attributes given by the array of key strings.

Parameters
elementThe element for which the attribute is requested
keysThe array of key strings of the attributes
Returns
The requested array of attribute strings

+ Here is the caller graph for this function:

DOMElement * Simulator::GetElem ( string  name)

Get a particular element from my DOM document.

Parameters
nameThe name of the element

+ Here is the caller graph for this function:

Model* Simulator::GetModel ( )
inline

Get the model.

Returns
The model.
CoilArray* Simulator::GetRxCoilArray ( )
inline

Get the transmitting coil array.

Returns

+ Here is the call graph for this function:

Sample* Simulator::GetSample ( )
inline

Get the sample.

Returns
The sample
ConcatSequence* Simulator::GetSequence ( )
inline

Get the sequence.

Returns
The sequence
CoilArray* Simulator::GetTxCoilArray ( )
inline

Get the recieving coil array.

Returns
The recieving coil array
void Simulator::MoveTmpFiles ( )
private

moves restart files to *.bak if the do not fit to current simulation

+ Here is the call graph for this function:

+ Here is the caller graph for this function:


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

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