SEElectroCardioGramWaveformInterpolator Class Reference

#include <SEElectroCardioGramWaveformInterpolator.h>

Inherits Loggable.

Public Member Functions

 SEElectroCardioGramWaveformInterpolator (Logger *logger)
 
virtual ~SEElectroCardioGramWaveformInterpolator ()
 
virtual void Clear ()
 
virtual void Copy (const SEElectroCardioGramWaveformInterpolator &src)
 
bool SerializeToString (std::string &output, SerializationFormat m) const
 
bool SerializeToFile (const std::string &filename, SerializationFormat m) const
 
bool SerializeFromString (const std::string &src, SerializationFormat m, const SEScalarTime *timeStep=nullptr)
 
bool SerializeFromFile (const std::string &filename, SerializationFormat m, const SEScalarTime *timeStep=nullptr)
 
virtual void Interpolate (const SEScalarTime &timeStep)
 
virtual bool StartNewCycle (eHeartRhythm rhythm)
 
virtual void CalculateWaveformsElectricPotential ()
 Prepares the ECG output data. More...
 
virtual bool CanInterpolateLeadPotential (eElectroCardioGram_WaveformLead lead, eHeartRhythm rhythm) const
 
virtual void SetLeadElectricPotential (eElectroCardioGram_WaveformLead lead, SEScalarElectricPotential &ep)
 
virtual bool HasWaveform (eElectroCardioGram_WaveformLead lead, eHeartRhythm rhythm) const
 
virtual SEElectroCardioGramWaveformGetWaveform (eElectroCardioGram_WaveformLead lead, eHeartRhythm rhythm)
 
virtual const SEElectroCardioGramWaveformGetWaveform (eElectroCardioGram_WaveformLead lead, eHeartRhythm rhythm) const
 
virtual void RemoveWaveform (eElectroCardioGram_WaveformLead lead, eHeartRhythm rhythm)
 
- Public Member Functions inherited from Loggable
 Loggable ()
 
 Loggable (Logger *log)
 
virtual ~Loggable ()
 
virtual LoggerGetLogger () const
 
virtual void Debug (std::string const &msg, std::string const &origin=empty) const
 
virtual void Debug (std::stringstream &msg, std::string const &origin=empty) const
 
virtual void Debug (std::ostream &msg, std::string const &origin=empty) const
 
virtual void Info (std::string const &msg, std::string const &origin=empty) const
 
virtual void Info (std::stringstream &msg, std::string const &origin=empty) const
 
virtual void Info (const std::stringstream &msg, std::string const &origin=empty) const
 
virtual void Info (std::ostream &msg, std::string const &origin=empty) const
 
virtual void Warning (std::string const &msg, std::string const &origin=empty) const
 
virtual void Warning (std::stringstream &msg, std::string const &origin=empty) const
 
virtual void Warning (std::ostream &msg, std::string const &origin=empty) const
 
virtual void Error (std::string const &msg, std::string const &origin=empty) const
 
virtual void Error (std::stringstream &msg, std::string const &origin=empty) const
 
virtual void Error (std::ostream &msg, std::string const &origin=empty) const
 
virtual void Fatal (std::string const &msg, std::string const &origin=empty) const
 
virtual void Fatal (std::stringstream &msg, std::string const &origin=empty) const
 
virtual void Fatal (std::ostream &msg, std::string const &origin=empty) const
 

Protected Member Functions

virtual void Interpolate (SEElectroCardioGramWaveform &waveform, const SEScalarTime &timeStep)
 
virtual bool InterpolateToTime (SEFunctionElectricPotentialVsTime &waveform, std::vector< double > &newTime, const TimeUnit &unit)
 Interpolates the original data to match the provided time series. More...
 

Protected Attributes

std::map< eElectroCardioGram_WaveformLead, SEScalarElectricPotential * > m_Leads
 
std::map< eElectroCardioGram_WaveformLead, std::map< eHeartRhythm, SEElectroCardioGramWaveform * > > m_Waveforms
 
- Protected Attributes inherited from Loggable
Loggerm_Logger
 

Friends

class PBElectroCardioGram
 

Additional Inherited Members

- Static Public Attributes inherited from Loggable
static const std::string empty
 

Constructor & Destructor Documentation

◆ SEElectroCardioGramWaveformInterpolator()

SEElectroCardioGramWaveformInterpolator::SEElectroCardioGramWaveformInterpolator ( Logger logger)

◆ ~SEElectroCardioGramWaveformInterpolator()

SEElectroCardioGramWaveformInterpolator::~SEElectroCardioGramWaveformInterpolator ( )
virtual

Member Function Documentation

◆ CalculateWaveformsElectricPotential()

void SEElectroCardioGramWaveformInterpolator::CalculateWaveformsElectricPotential ( )
virtual

Prepares the ECG output data.

CalculateWaveform takes data from all active iterators and sums them together. It also assigns the unit of millivolts to the output. If there are no active iterators, the output defaults to 0.

◆ CanInterpolateLeadPotential()

bool SEElectroCardioGramWaveformInterpolator::CanInterpolateLeadPotential ( eElectroCardioGram_WaveformLead  lead,
eHeartRhythm  rhythm 
) const
virtual

◆ Clear()

void SEElectroCardioGramWaveformInterpolator::Clear ( )
virtual

◆ Copy()

void SEElectroCardioGramWaveformInterpolator::Copy ( const SEElectroCardioGramWaveformInterpolator src)
virtual

◆ GetWaveform() [1/2]

SEElectroCardioGramWaveform & SEElectroCardioGramWaveformInterpolator::GetWaveform ( eElectroCardioGram_WaveformLead  lead,
eHeartRhythm  rhythm 
)
virtual

◆ GetWaveform() [2/2]

const SEElectroCardioGramWaveform * SEElectroCardioGramWaveformInterpolator::GetWaveform ( eElectroCardioGram_WaveformLead  lead,
eHeartRhythm  rhythm 
) const
virtual

◆ HasWaveform()

bool SEElectroCardioGramWaveformInterpolator::HasWaveform ( eElectroCardioGram_WaveformLead  lead,
eHeartRhythm  rhythm 
) const
virtual

◆ Interpolate() [1/2]

void SEElectroCardioGramWaveformInterpolator::Interpolate ( const SEScalarTime timeStep)
virtual

◆ Interpolate() [2/2]

void SEElectroCardioGramWaveformInterpolator::Interpolate ( SEElectroCardioGramWaveform waveform,
const SEScalarTime timeStep 
)
protectedvirtual

◆ InterpolateToTime()

bool SEElectroCardioGramWaveformInterpolator::InterpolateToTime ( SEFunctionElectricPotentialVsTime waveform,
std::vector< double > &  newTime,
const TimeUnit unit 
)
protectedvirtual

Interpolates the original data to match the provided time series.

Parameters
newTimevector of the new time values
unitthe unit to use when creating the output
Returns
the new waveform data

This function creates the new waveform data for the ECG output by interpolating the data from the original file. It inherits m_Independent and m_Dependent from the original data and calls GeneralMath::LinearInterpolator to create the new vector of voltage points that correspond to the time points in newTime. It is then assigned the unit of the original data and output as the new waveform.

◆ RemoveWaveform()

void SEElectroCardioGramWaveformInterpolator::RemoveWaveform ( eElectroCardioGram_WaveformLead  lead,
eHeartRhythm  rhythm 
)
virtual

◆ SerializeFromFile()

bool SEElectroCardioGramWaveformInterpolator::SerializeFromFile ( const std::string &  filename,
SerializationFormat  m,
const SEScalarTime timeStep = nullptr 
)

◆ SerializeFromString()

bool SEElectroCardioGramWaveformInterpolator::SerializeFromString ( const std::string &  src,
SerializationFormat  m,
const SEScalarTime timeStep = nullptr 
)

◆ SerializeToFile()

bool SEElectroCardioGramWaveformInterpolator::SerializeToFile ( const std::string &  filename,
SerializationFormat  m 
) const

◆ SerializeToString()

bool SEElectroCardioGramWaveformInterpolator::SerializeToString ( std::string &  output,
SerializationFormat  m 
) const

◆ SetLeadElectricPotential()

void SEElectroCardioGramWaveformInterpolator::SetLeadElectricPotential ( eElectroCardioGram_WaveformLead  lead,
SEScalarElectricPotential ep 
)
virtual

◆ StartNewCycle()

bool SEElectroCardioGramWaveformInterpolator::StartNewCycle ( eHeartRhythm  rhythm)
virtual

Friends And Related Function Documentation

◆ PBElectroCardioGram

friend class PBElectroCardioGram
friend

Member Data Documentation

◆ m_Leads

std::map<eElectroCardioGram_WaveformLead, SEScalarElectricPotential*> SEElectroCardioGramWaveformInterpolator::m_Leads
protected

◆ m_Waveforms

std::map<eElectroCardioGram_WaveformLead, std::map<eHeartRhythm, SEElectroCardioGramWaveform*> > SEElectroCardioGramWaveformInterpolator::m_Waveforms
protected