JEMRIS  2.8.1
open-source MRI simulations
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes
Coil Class Referenceabstract

Base class of coil objects. More...

#include <Coil.h>

+ Inheritance diagram for Coil:
+ Collaboration diagram for Coil:

Public Member Functions

virtual ~Coil ()
 Destructor.
 
double GetSensitivity (const double time=0)
 Get the B1+ magnitude at point (x,y,z) of the current spin. More...
 
double GetPhase (const double time=0)
 Get the B1+ phase at point (x,y,z) of the current spin. More...
 
double InterpolateSensitivity (const double *position, bool magnitude=true)
 Interpolate the sensitivity at point (x,y,z) More...
 
virtual double GetSensitivity (const double *position)=0
 Get the B1+ magnitude at point (x,y,z) More...
 
virtual double GetPhase (const double *position)
 Get the B1+ phase at point (x,y,z) More...
 
void InitSignal (long lADCs)
 Initialize my signal repository. More...
 
void Receive (long lADC)
 Receive signal from World. More...
 
void Transmit ()
 Transmit signal.
 
SignalGetSignal ()
 Get the received signal of this coil. More...
 
CoilClone () const =0
 
void GridMap ()
 Dump sensitivity map on the XML defined grid.
 
double * MagnitudeMap ()
 Map magnitudes. More...
 
double * PhaseMap ()
 Map phases. More...
 
virtual bool Prepare (const PrepareMode mode)
 Prepare coil with given attributes. More...
 
void Initialize (DOMNode *node)
 Initialize this prototype. More...
 
int GetPoints ()
 
unsigned GetNDim ()
 
double GetNorm ()
 
- Public Member Functions inherited from Prototype
 Prototype ()
 Constructor. More...
 
virtual ~Prototype ()
 Default destructor. More...
 
 Prototype (const Prototype &)
 Default copy constructor. More...
 
virtual PrototypeGetParent ()
 Get Parent. 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...
 
virtual PrototypeGetPrototypeByAttributeValue (string name, string attrib)
 Get a Prototype by value of 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

 Coil ()
 
double Unwrap (double diff, bool magnitude)
 

Protected Attributes

double m_position [3]
 
Signalm_signal
 
unsigned m_mode
 
double m_azimuth
 
double m_polar
 
double m_scale
 
double m_norm
 
double m_phase
 
bool m_interpolate
 
bool m_complex
 
bool m_conjugate
 
unsigned m_dim
 
double m_extent
 
int m_points
 
NDData< double > m_sensmag
 
NDData< double > m_senspha
 
- 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. 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

Base class of coil objects.

Constructor & Destructor Documentation

Coil::Coil ( )
inlineprotected

Constructor

Member Function Documentation

Coil* Coil::Clone ( ) const
pure virtual

See Prototype::Clone

Implements Prototype.

Implemented in AnalyticCoil, BiotSavartLoop, IdealCoil, and ExternalCoil.

+ Here is the caller graph for this function:

double Coil::GetPhase ( const double  time = 0)

Get the B1+ phase at point (x,y,z) of the current spin.

Returns
Phase with respect to spin in World

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

virtual double Coil::GetPhase ( const double *  position)
inlinevirtual

Get the B1+ phase at point (x,y,z)

This method may be implemented by every derived coil. Otherwise phase is zero.

Important: the phase of Coils needs to be implemented with unit radians! (In contrast to the phase of RF pulses which has units degrees.)

Parameters
positionAt position.
Returns
B1+ phase with respect to spin in World.

Reimplemented in ExternalCoil, AnalyticCoil, and BiotSavartLoop.

+ Here is the call graph for this function:

double Coil::GetSensitivity ( const double  time = 0)

Get the B1+ magnitude at point (x,y,z) of the current spin.

Returns
Sensitivity with respect to spin in World

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

virtual double Coil::GetSensitivity ( const double *  position)
pure virtual

Get the B1+ magnitude at point (x,y,z)

This method must be implemented by every derived coil.

Parameters
positionAt position.
Returns
Sensitivity with respect to spin in World.

Implemented in AnalyticCoil, ExternalCoil, IdealCoil, and BiotSavartLoop.

Signal* Coil::GetSignal ( )
inline

Get the received signal of this coil.

Returns
The received signal

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Coil::Initialize ( DOMNode *  node)
virtual

Initialize this prototype.

The first step after cloning! The method sets the Name of the Prototype, and pointers to the referring node and the (unique) SequenceTree.

Parameters
nodeThe DOMNode referring to this prototype.

Implements Prototype.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Coil::InitSignal ( long  lADCs)

Initialize my signal repository.

Parameters
lADCsNumber of ADCs

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double Coil::InterpolateSensitivity ( const double *  position,
bool  magnitude = true 
)

Interpolate the sensitivity at point (x,y,z)

Returns
Interpolated Sensitivity

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double * Coil::MagnitudeMap ( )

Map magnitudes.

Returns
Magnitudes

+ Here is the caller graph for this function:

double * Coil::PhaseMap ( )

Map phases.

Returns
phases

+ Here is the caller graph for this function:

bool Coil::Prepare ( const PrepareMode  mode)
virtual

Prepare coil with given attributes.

Parameters
modeSets the preparation mode, one of enum PrepareMode {PREP_INIT,PREP_VERBOSE,PREP_UPDATE}.

Implements Prototype.

Reimplemented in AnalyticCoil, ExternalCoil, and BiotSavartLoop.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Coil::Receive ( long  lADC)

Receive signal from World.

Parameters
lADCReceive the signal for this particular ADC

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double Coil::Unwrap ( double  diff,
bool  magnitude 
)
protected

helper function to check for phase wraps in interpolation of phase maps.

+ Here is the caller graph for this function:

Member Data Documentation

double Coil::m_azimuth
protected

Change of coordinate system: azimuth angle

bool Coil::m_complex
protected

True, if sensitivity map is complex (non-zero phase entries).

bool Coil::m_conjugate
protected

Complex conjugate the sensitivites, if true.

unsigned Coil::m_dim
protected

Dimensions (2D or 3D) of the array

double Coil::m_extent
protected

Array extend of support region [mm]

bool Coil::m_interpolate
protected

Whether to precompute sensitivities in an array

unsigned Coil::m_mode
protected

My mode (RX/TX)

double Coil::m_norm
protected

Normalization factor for sensitivities

double Coil::m_phase
protected

Constant phase shift

int Coil::m_points
protected

Sampling points of the array

double Coil::m_polar
protected

Change of coordinate system: polar angle

double Coil::m_position[3]
protected

Center location

double Coil::m_scale
protected

Scaling factor for sensitivities

Signal* Coil::m_signal
protected

Signal repository


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

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