FREE::StatisticEntry Class Reference
[Statistics]

Class containing statistic values or further statistic entries. More...

#include <freStatisticEntry.h>

Inheritance diagram for FREE::StatisticEntry:

Inheritance graph
FREE::TimeStampedObjectFREE::XMLStreamObject
[legend]
Collaboration diagram for FREE::StatisticEntry:

Collaboration graph
FREE::TimeStampedObjectFREE::XMLStreamObjectFREE::StatisticData
[legend]

List of all members.

Public Types

typedef StatisticEntry Self
typedef itk::LightObject Superclass
typedef
itk::SmartPointer
< Self
Pointer
typedef
itk::SmartPointer
< const Self
ConstPointer
typedef unsigned long IDType
typedef
StatisticEntryDefinition::IDType 
ReferenceIDType
typedef std::vector
< StatisticValue
ValuesType
typedef std::vector
< Pointer
EntriesType

Public Member Functions

virtual const char * GetNameOfClass () const
StatisticEntryoperator= (const StatisticEntry &entry)
StatisticEntry::Pointer CreateChildEntry ()
StatisticEntry::Pointer PostCreateChildEntry ()
void CloseEntry ()
virtual ~StatisticEntry ()
virtual void Reset ()
void SetID (const IDType &id)
IDType GetID () const
void SetRefID (const ReferenceIDType &id)
ReferenceIDType GetRefID () const
const ValuesTypeGetValues () const
ValuesTypeGetValues ()
const EntriesTypeGetEntries () const
EntriesTypeGetEntries ()
StatisticValueAddValue (const std::string &sValue, const StatisticValue::ReferenceIDType &refID)

Static Public Member Functions

static Pointer New (const IDType &id, clock_t &stampOffset, StatisticData *pData)

Static Public Attributes

static const IDType cUndefinedID
static const
ReferenceIDType 
cUndefinedRef = 0

Protected Member Functions

 StatisticEntry (const IDType &id, clock_t &stampOffset, StatisticData *pData)
virtual void SubElementLoadProcessing (const std::string &rsXMLSubTag, const std::string &rsXMLSubElement, const std::string &rsXMLSubData)
virtual std::string SaveData (const unsigned int &iDepth, bool &bHasSubElements) const
virtual void AttributesLoadProcessing (const AttributesType &rAttributes)
virtual void SaveAttributes (AttributesSaveListType &rAttributes) const

Protected Attributes

IDType m_ID
ReferenceIDType m_RefID
StatisticDatam_pData
ValuesType m_Values
EntriesType m_Entries


Detailed Description

Class containing statistic values or further statistic entries.

StatisticEntries are used to structure the statistic log of an processing. Every child enty is within the time frame of an ancestor entry and is therefore a more detailed view at the ongoing process. Every entry has an unique ID and a reference ID for the dictonary.

Definition at line 48 of file freStatisticEntry.h.


Member Typedef Documentation

typedef StatisticEntry FREE::StatisticEntry::Self

Definition at line 51 of file freStatisticEntry.h.

typedef itk::LightObject FREE::StatisticEntry::Superclass

Definition at line 52 of file freStatisticEntry.h.

typedef itk::SmartPointer<Self> FREE::StatisticEntry::Pointer

Definition at line 53 of file freStatisticEntry.h.

typedef itk::SmartPointer<const Self> FREE::StatisticEntry::ConstPointer

Definition at line 54 of file freStatisticEntry.h.

typedef unsigned long FREE::StatisticEntry::IDType

Definition at line 56 of file freStatisticEntry.h.

typedef StatisticEntryDefinition::IDType FREE::StatisticEntry::ReferenceIDType

Definition at line 69 of file freStatisticEntry.h.

typedef std::vector<StatisticValue> FREE::StatisticEntry::ValuesType

Definition at line 72 of file freStatisticEntry.h.

typedef std::vector<Pointer> FREE::StatisticEntry::EntriesType

Definition at line 73 of file freStatisticEntry.h.


Constructor & Destructor Documentation

FREE::StatisticEntry::~StatisticEntry (  )  [virtual]

Definition at line 147 of file freStatisticEntry.cxx.

References Reset().

Here is the call graph for this function:

FREE::StatisticEntry::ResetFREE::TimeStampedObject::ResetFREE::XMLStreamObject::Reset

FREE::StatisticEntry::StatisticEntry ( const IDType id,
clock_t &  stampOffset,
StatisticData pData 
) [protected]

Constructor.

Definition at line 139 of file freStatisticEntry.cxx.

References m_ID, m_pData, and throwExceptionMacro.

Referenced by New().


Member Function Documentation

virtual const char* FREE::StatisticEntry::GetNameOfClass (  )  const [inline, virtual]

Reimplemented from FREE::XMLStreamObject.

Definition at line 59 of file freStatisticEntry.h.

static Pointer FREE::StatisticEntry::New ( const IDType id,
clock_t &  stampOffset,
StatisticData pData 
) [inline, static]

Definition at line 61 of file freStatisticEntry.h.

References StatisticEntry().

Referenced by FREE::StatisticData::CreateEntry(), and FREE::StatisticData::Reset().

Here is the call graph for this function:

FREE::StatisticEntry::StatisticEntry

StatisticEntry & FREE::StatisticEntry::operator= ( const StatisticEntry entry  ) 

Assignment operator.

Definition at line 37 of file freStatisticEntry.cxx.

References FREE::StatisticData::CreateEntry(), m_Entries, m_pData, m_Values, and FREE::TimeStampedObject::operator=().

Here is the call graph for this function:

FREE::StatisticData::CreateEntryFREE::TimeStampedObject::operator=FREE::StatisticEntry::NewFREE::StatisticEntry::StatisticEntry

StatisticEntry::Pointer FREE::StatisticEntry::CreateChildEntry (  ) 

Creates a child entry, sets it creation time to now and returns it.

Remarks:
if the current entry is already closed, this function will behave like PostCreateChildEntry()

Definition at line 63 of file freStatisticEntry.cxx.

References FREE::StatisticData::CreateEntry(), FREE::TimeStampedObject::IsClosed(), m_Entries, m_pData, FREE::StatisticData::OpenEntry(), PostCreateChildEntry(), and throwExceptionMacro.

Referenced by FREE::StatisticData::CreateChildEntry(), FREE::RegistrationProcessEventHandler< TRegistrationProcessor >::OnNextLevel(), FREE::EvolutionaryStrategySOOptimizerController::SetStatisticEntryMainComponent(), FREE::EvolutionaryStrategyOptimizerController::SetStatisticEntryMainComponent(), and FREE::SetupOptimizationProcessorController::SetStatisticEntrySubComponents().

Here is the call graph for this function:

FREE::StatisticData::CreateEntryFREE::TimeStampedObject::IsClosedFREE::StatisticData::OpenEntryFREE::StatisticEntry::PostCreateChildEntryFREE::StatisticEntry::NewFREE::StatisticEntry::StatisticEntry

StatisticEntry::Pointer FREE::StatisticEntry::PostCreateChildEntry (  ) 

Creates a child entry retrospectively. Therefore the child entry will directly closed an its closing time will be now or the closing time of the current entry, if it is also already closed. The creation time will be the creation time of child created last or, if no preceeding child exists, the creation time of this entry.

Definition at line 91 of file freStatisticEntry.cxx.

References FREE::StatisticData::CreateEntry(), FREE::TimeStampedObject::IsClosed(), m_Entries, m_pData, FREE::StatisticData::OpenEntry(), and throwExceptionMacro.

Referenced by CreateChildEntry(), FREE::RegistrationProcessEventHandler< TRegistrationProcessor >::OnNextIteration(), and FREE::StatisticData::PostCreateChildEntry().

Here is the call graph for this function:

FREE::StatisticData::CreateEntryFREE::TimeStampedObject::IsClosedFREE::StatisticData::OpenEntryFREE::StatisticEntry::NewFREE::StatisticEntry::StatisticEntry

void FREE::StatisticEntry::CloseEntry (  ) 

Closes this entry and all child entries

Definition at line 126 of file freStatisticEntry.cxx.

References FREE::StatisticData::CloseEntry(), FREE::TimeStampedObject::IsClosed(), m_Entries, m_ID, m_pData, and FREE::TimeStampedObject::SetClosingTimeStamp().

Referenced by FREE::SetupOptimizationMetricMonitorBase< TResultClass >::EvaluationFinished(), FREE::RigidRegistrationControllerBase< TControlledRigidProcessor >::GetMediaCasted(), FREE::PointSetRegistrationControllerBase< TControlledRigidProcessor >::GetMediaCasted(), FREE::ImageToImageFilterControllerBase< TControlledFilter >::GetMediaCasted(), FREE::ClosedFormRegistrationControllerBase< TControlledRigidProcessor >::GetMediaCasted(), FREE::RegistrationProcessEventHandler< TRegistrationProcessor >::OnNextIteration(), FREE::MediaDrainController::SetMediaCasted(), FREE::EvolutionaryStrategySOOptimizerController::SetStatisticEntryMainComponent(), and FREE::EvolutionaryStrategyOptimizerController::SetStatisticEntryMainComponent().

Here is the call graph for this function:

FREE::StatisticData::CloseEntryFREE::TimeStampedObject::IsClosedFREE::TimeStampedObject::SetClosingTimeStampFREE::TimeStampedObject::Stamp

void FREE::StatisticEntry::Reset (  )  [virtual]

Resets the step by clearing all values and entries.

Reimplemented from FREE::TimeStampedObject.

Definition at line 154 of file freStatisticEntry.cxx.

References m_Entries, m_Values, and FREE::TimeStampedObject::Reset().

Referenced by ~StatisticEntry().

Here is the call graph for this function:

FREE::TimeStampedObject::ResetFREE::XMLStreamObject::Reset

void FREE::StatisticEntry::SetID ( const IDType id  )  [inline]

Definition at line 99 of file freStatisticEntry.h.

References m_ID.

IDType FREE::StatisticEntry::GetID (  )  const [inline]

Definition at line 100 of file freStatisticEntry.h.

References m_ID.

Referenced by FREE::StatisticData::SearchEntry().

void FREE::StatisticEntry::SetRefID ( const ReferenceIDType id  )  [inline]

Definition at line 102 of file freStatisticEntry.h.

References m_RefID.

Referenced by FREE::ComponentControllerBase< TControlledComponent >::AddStatisticEntry(), FREE::SetupOptimizationMetricMonitorBase< TResultClass >::EvaluationFinished(), FREE::RegistrationProcessEventHandler< TRegistrationProcessor >::OnNextIteration(), FREE::RegistrationProcessEventHandler< TRegistrationProcessor >::OnNextLevel(), FREE::EvolutionaryStrategySOOptimizerController::SetStatisticEntryMainComponent(), and FREE::EvolutionaryStrategyOptimizerController::SetStatisticEntryMainComponent().

ReferenceIDType FREE::StatisticEntry::GetRefID (  )  const [inline]

Definition at line 103 of file freStatisticEntry.h.

References m_RefID.

const ValuesType& FREE::StatisticEntry::GetValues (  )  const [inline]

Definition at line 105 of file freStatisticEntry.h.

References m_Values.

ValuesType& FREE::StatisticEntry::GetValues (  )  [inline]

Definition at line 106 of file freStatisticEntry.h.

References m_Values.

const EntriesType& FREE::StatisticEntry::GetEntries (  )  const [inline]

Definition at line 108 of file freStatisticEntry.h.

References m_Entries.

Referenced by FREE::StatisticData::SearchEntry().

EntriesType& FREE::StatisticEntry::GetEntries (  )  [inline]

Definition at line 109 of file freStatisticEntry.h.

References m_Entries.

StatisticValue & FREE::StatisticEntry::AddValue ( const std::string &  sValue,
const StatisticValue::ReferenceIDType refID 
)

Definition at line 163 of file freStatisticEntry.cxx.

References m_Values.

Referenced by FREE::PrecisionSOMetric< VImageDimension >::EnlistInterimResultsToStatistic(), FREE::ImageDifferenceSOMetricMonitor::EnlistResultsToStatistic(), FREE::ImageClassificationSOMetricMonitor::EnlistResultsToStatistic(), FREE::AccuracySOMetricMonitor::EnlistResultsToStatistic(), FREE::SetupOptimizationMetricMonitorBase< TResultClass >::EvaluationFinished(), FREE::RegistrationProcessEventHandler< TRegistrationProcessor >::OnNextIteration(), FREE::RegistrationProcessEventHandler< TRegistrationProcessor >::OnNextLevel(), FREE::VersorTransformOptimizerController::SetStatisticEntryMainComponent(), FREE::SVNonLinearVNLOptimizerControllerBase< TControlledVNLOptimizer >::SetStatisticEntryMainComponent(), FREE::StoreableMediaControllerBase< TMedia >::SetStatisticEntryMainComponent(), FREE::SPSASOOptimizerController::SetStatisticEntryMainComponent(), FREE::SPSAOptimizerController::SetStatisticEntryMainComponent(), FREE::RegStepGradDescOptimizerControllerBase< TOptimizer >::SetStatisticEntryMainComponent(), FREE::PrecisionSOMetricController::SetStatisticEntryMainComponent(), FREE::PowellSOOptimizerController::SetStatisticEntryMainComponent(), FREE::PowellOptimizerController::SetStatisticEntryMainComponent(), FREE::PointSupportedMetricControllerBase< ImageTypes< 3 >::InternalImageType, FREE::ImageTypes< 3 >::PointSetType >::SetStatisticEntryMainComponent(), FREE::OptimizerControllerBase< TControlledOptimizer >::SetStatisticEntryMainComponent(), FREE::OnePlusOneEvolutionarySOOptimizerController::SetStatisticEntryMainComponent(), FREE::OnePlusOneEvolutionaryOptimizerController::SetStatisticEntryMainComponent(), FREE::MVNonLinearVNLOptimizerControllerBase< TControlledVNLOptimizer >::SetStatisticEntryMainComponent(), FREE::LimitedAxisAmoebaSOOptimizerController::SetStatisticEntryMainComponent(), FREE::LBFGSOptimizerController::SetStatisticEntryMainComponent(), FREE::IntensityImageMediaControllerBase< float, unsigned short, VDimension >::SetStatisticEntryMainComponent(), FREE::ImageDifferenceSOMetricControllerBase< FREE::ConstrainedImageDifferenceSOMetric< 2 > >::SetStatisticEntryMainComponent(), FREE::ImageClassificationSOMetricControllerBase< FREE::ConstrainedImageClassificationSOMetric< 2 > >::SetStatisticEntryMainComponent(), FREE::GradientDescentOptimizerController::SetStatisticEntryMainComponent(), FREE::FEMRegistrationControllerBase< FREE::FEMRegistrationProcessor >::SetStatisticEntryMainComponent(), FREE::ExhaustiveSOOptimizerController::SetStatisticEntryMainComponent(), FREE::ExhaustiveOptimizerController::SetStatisticEntryMainComponent(), FREE::EvolutionaryStrategySOOptimizerController::SetStatisticEntryMainComponent(), FREE::EvolutionaryStrategyOptimizerController::SetStatisticEntryMainComponent(), FREE::ESCMAMutationController::SetStatisticEntryMainComponent(), FREE::ContinuousLBFGSOptimizerController::SetStatisticEntryMainComponent(), FREE::ConstrainedOnePlusOneEvolutionarySOOptimizerController::SetStatisticEntryMainComponent(), FREE::ConstrainedImageDifferenceSOMetricControllerBase< FREE::ConstrainedImageDifferenceSOMetric< 2 > >::SetStatisticEntryMainComponent(), FREE::ConstrainedImageClassificationSOMetricControllerBase< FREE::ConstrainedImageClassificationSOMetric< 2 > >::SetStatisticEntryMainComponent(), FREE::ConstrainedAccuracySOMetricControllerBase< FREE::ConstrainedAccuracySOMetric< 3 > >::SetStatisticEntryMainComponent(), FREE::ConsistencySOMetricControllerBase< FREE::ConsistencyRegistrationMetric< 2 > >::SetStatisticEntryMainComponent(), FREE::ConjugateGradientOptimizerController::SetStatisticEntryMainComponent(), FREE::AmoebaSOOptimizerController::SetStatisticEntryMainComponent(), FREE::AmoebaOptimizerController::SetStatisticEntryMainComponent(), and FREE::AccuracySOMetricControllerBase< FREE::ConstrainedAccuracySOMetric< 3 > >::SetStatisticEntryMainComponent().

void FREE::StatisticEntry::SubElementLoadProcessing ( const std::string &  rsXMLSubTag,
const std::string &  rsXMLSubElement,
const std::string &  rsXMLSubData 
) [protected, virtual]

Function is called by after the parser has extracted a new sub element out of the xml data string. The tag of the sub element is passed, along with its data and a string containing the total element (needed to call subsequent LoadFromString). To change the loading behaviour, this class should be reimplemented. This function is also called for plain text data of the element. In this case rsXMLTag is cXML_Text (an empty string), if not there is a real sub element in the data. Depending on the structure the text case (rsXMLTag==cXML_Text) could occure more then once.

Example:

 <Element>aaaaaa<SubElement>bbbbbb</Subelement>cccccc</Element>\n
This string passed as rsXMLData in a call of LoadFromXMLString() would cause 3 calls of SubElementLoadProcessing() with following parameters:
1. rsXMLTag == cXML_Text; rsXMLSubElement == "aaaaaa"; rsXMLSubData == "aaaaaa"
2. rsXMLTag == "Subelement"; rsXMLSubElement == "<SubElement>bbbbbb</Subelement>"; rsXMLSubData == "bbbbbb"
1. rsXMLTag == cXML_Text; rsXMLSubElement == "cccccc"; rsXMLSubElement == "cccccc"
Parameters:
[in] rsXMLSubTag Reference to the tag of xml to be loaded with the function call.
[in] rsXMLSubElement Reference to the whole element string (with attributes, start and end tag).
[in] rsXMLSubData Reference to the whole data of the xml element (without start and end tag)

Reimplemented from FREE::XMLStreamObject.

Definition at line 172 of file freStatisticEntry.cxx.

References FREE::StatisticData::CreateEntry(), FREE::XMLStreamObject::LoadFromString(), m_Entries, m_pData, m_Values, and FREE::XMLStreamObject::SubElementLoadProcessing().

Here is the call graph for this function:

FREE::StatisticData::CreateEntryFREE::XMLStreamObject::LoadFromStringFREE::XMLStreamObject::SubElementLoadProcessingFREE::StatisticEntry::NewFREE::StatisticEntry::StatisticEntryFREE::XMLStreamObject::CB_Static_EndElementFREE::XMLStreamObject::CB_Static_StartElementFREE::XMLStreamObject::CheckValidLoadingFREE::XMLStreamObject::FinalizeLoadingFREE::XMLStreamObject::ResetFREE::XMLStreamObject::ResetLoadingHelpersFREE::XMLStreamObject::ResetRequirementsFREE::Convert::ToStrFREE::XMLStreamObject::CB_EndElementFREE::XMLStreamObject::CB_Static_CharacterDataHandlerFREE::XMLStreamObject::CommitSubElementFREE::XMLStreamObject::CB_CharacterDataHandlerFREE::XMLStreamObject::ExtractSubElementContentStringFREE::XMLStreamObject::ExtractSubElementXmlStringFREE::XMLStreamObject::NotifyFoundSubElementFREE::XMLStreamObject::CB_StartElementFREE::XMLStreamObject::AttributesLoadProcessingFREE::XMLStreamObject::ConvertExpatAttrToMapFREE::XMLStreamObject::GetXMLTagFREE::XMLStreamObject::SetNeededSubElements

std::string FREE::StatisticEntry::SaveData ( const unsigned int &  iDepth,
bool &  bHasSubElements 
) const [protected, virtual]

Function that returns the data of the object converted to a xml element. This function is called by SaveToString() to compose the whole xml string and should contain the data/value of the xml element couples.

Parameters:
[in] iDepth The depth of the data within the xml structure tree. Used to realize correct indentation of the formated data by AddIndentation().
[out] bHasSubElements Indicates whether the data string contains sub elements or just a plain value. By default bHasSubElements is true when the functon is called by SaveToString(). Reset the value to reset behavior of SaveToString. Example: <element attr1="1" attr2="a">aaaaaa<subElement>bbbbbb</subelement></element> For this xml string the function should return: "aaaaaa<subElement>bbbbbb</subElement>"
Returns:
Data of the xml as xml string.

Reimplemented from FREE::XMLStreamObject.

Definition at line 191 of file freStatisticEntry.cxx.

References FREE::XMLStreamObject::AddSubElement(), m_Entries, and m_Values.

Here is the call graph for this function:

FREE::XMLStreamObject::AddSubElementFREE::XMLStreamObject::AddIndentationFREE::XMLStreamObject::CreateSimpleElementFREE::Convert::ToStr

void FREE::StatisticEntry::AttributesLoadProcessing ( const AttributesType rAttributes  )  [protected, virtual]

Reimplemented from FREE::TimeStampedObject.

Definition at line 209 of file freStatisticEntry.cxx.

References FREE::TimeStampedObject::AttributesLoadProcessing(), cUndefinedRef, m_RefID, and FREE::Convert::ToInt().

Here is the call graph for this function:

FREE::TimeStampedObject::AttributesLoadProcessingFREE::Convert::ToIntFREE::Convert::ToLong

void FREE::StatisticEntry::SaveAttributes ( AttributesSaveListType rAttributes  )  const [protected, virtual]

Reimplemented from FREE::TimeStampedObject.

Definition at line 220 of file freStatisticEntry.cxx.

References m_ID, m_RefID, FREE::TimeStampedObject::SaveAttributes(), and FREE::Convert::ToStr().

Here is the call graph for this function:

FREE::TimeStampedObject::SaveAttributesFREE::Convert::ToStr


Member Data Documentation

const IDType FREE::StatisticEntry::cUndefinedID [static]

Definition at line 57 of file freStatisticEntry.h.

const StatisticEntry::ReferenceIDType FREE::StatisticEntry::cUndefinedRef = 0 [static]

Implementation of FREE::StatisticEntry /////////////////////////////

Definition at line 70 of file freStatisticEntry.h.

Referenced by AttributesLoadProcessing().

IDType FREE::StatisticEntry::m_ID [protected]

Unique identifierer of an entry. This ID will be given by StatisticData. If the ID is not defined it is 0.

Definition at line 119 of file freStatisticEntry.h.

Referenced by CloseEntry(), GetID(), SaveAttributes(), SetID(), and StatisticEntry().

ReferenceIDType FREE::StatisticEntry::m_RefID [protected]

ID of the Type within the statistical legend

Definition at line 122 of file freStatisticEntry.h.

Referenced by AttributesLoadProcessing(), GetRefID(), SaveAttributes(), and SetRefID().

StatisticData* FREE::StatisticEntry::m_pData [protected]

Pointer to the statistic data used to centralize the creation process of entries

Definition at line 126 of file freStatisticEntry.h.

Referenced by CloseEntry(), CreateChildEntry(), operator=(), PostCreateChildEntry(), StatisticEntry(), and SubElementLoadProcessing().

ValuesType FREE::StatisticEntry::m_Values [protected]

Contains the value of the optimizer while the stored iteration.

Definition at line 129 of file freStatisticEntry.h.

Referenced by AddValue(), GetValues(), operator=(), Reset(), SaveData(), and SubElementLoadProcessing().

EntriesType FREE::StatisticEntry::m_Entries [protected]

Definition at line 131 of file freStatisticEntry.h.

Referenced by CloseEntry(), CreateChildEntry(), GetEntries(), operator=(), PostCreateChildEntry(), Reset(), SaveData(), and SubElementLoadProcessing().


The documentation for this class was generated from the following files:
Generated at Sat Oct 13 18:29:39 2007 for f.r.e.e. - Flexible Registration and Evaluation Engine by doxygen 1.5.3 written by Dimitri van Heesch, © 1997-2000