FREE::GenericSetupToImageAdaptor Class Reference
[Setup utilities]

Class to generate setups adapted with image specific parameters. More...

#include <freGenericSetupToImageAdaptor.h>

Collaboration diagram for FREE::GenericSetupToImageAdaptor:

Collaboration graph
FREE::SetupFREE::XMLStreamObject
[legend]

List of all members.

Public Member Functions

virtual const char * GetNameOfClass () const
void SetTemplateSetup (Setup *pSetup)
SetupGetTemplateSetup ()
const
Adaptation::AdaptationList
GetAdaptationList ()
void AddAdaptation (const Adaptation::Adaptation &adaptation)
void AddAdaptations (const Adaptation::AdaptationList &adaptations)
void Reset ()
void RestartAdaptation ()
bool EndOfAdaptation ()
const int GetCurrentAdaptationID ()
Setup::Pointer AdaptSetup (int iActualAdaptationItemID)
Setup::Pointer AdaptNextSetup ()
 GenericSetupToImageAdaptor ()
 ~GenericSetupToImageAdaptor ()

Static Public Member Functions

static void AdaptSetup (const Adaptation::Adaptation &adaptation, Setup &rSetup)

Protected Types

typedef std::vector
< ComponentSetup * > 
ComponentVectorType

Static Protected Member Functions

static void AdaptSetupComponent (const Adaptation::AdaptationComponent *pAdaptComp, ComponentSetup *pComponentSetup)
static void AdaptComponent (const ComponentSetup *pAdaptComp, ComponentSetup *pComponentSetup)
static void ExtendComponent (const ComponentSetup *pAdaptComp, ComponentSetup *pComponentSetup)
static void ReplaceComponent (const ComponentSetup *pAdaptComp, ComponentSetup *pComponentSetup)
static void OverwriteComponent (const ComponentSetup *pAdaptComp, ComponentSetup *pComponentSetup, Setup &rSetup)
static bool ValidateController (const ComponentSetup *pAdaptComp, const ComponentSetup *pComponentSetup)

Protected Attributes

int m_iCurrentAdaptation
Setupm_pTemplateSetup
Adaptation::AdaptationList::Pointer m_AdaptationList


Detailed Description

Class to generate setups adapted with image specific parameters.

The GenericSetupToImageAdaptor is used to adapt a setup to the specific needs of one image couple or a group of. This is needed to ensure that image specific parameters (e.g. refernece points, ROIs) are used within a test series.

Definition at line 41 of file freGenericSetupToImageAdaptor.h.


Member Typedef Documentation

typedef std::vector<ComponentSetup*> FREE::GenericSetupToImageAdaptor::ComponentVectorType [protected]

Definition at line 107 of file freGenericSetupToImageAdaptor.h.


Constructor & Destructor Documentation

FREE::GenericSetupToImageAdaptor::GenericSetupToImageAdaptor (  ) 

Definition at line 120 of file freGenericSetupToImageAdaptor.cxx.

References m_AdaptationList, m_pTemplateSetup, FREE::Adaptation::AdaptationList::New(), and RestartAdaptation().

Here is the call graph for this function:

FREE::Adaptation::AdaptationList::NewFREE::GenericSetupToImageAdaptor::RestartAdaptation

FREE::GenericSetupToImageAdaptor::~GenericSetupToImageAdaptor (  ) 

Definition at line 128 of file freGenericSetupToImageAdaptor.cxx.


Member Function Documentation

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

Definition at line 44 of file freGenericSetupToImageAdaptor.h.

void FREE::GenericSetupToImageAdaptor::SetTemplateSetup ( Setup pSetup  ) 

Defines the template setup for the adaptation.

Remarks:
The change of the template setup resets the adaption position to the first couple.
Parameters:
[in] pSetup Pointer to the template setup.
Implementation of FREE::GenericSetupToImageAdaptor ////////////////////

Definition at line 36 of file freGenericSetupToImageAdaptor.cxx.

References m_pTemplateSetup, and RestartAdaptation().

Referenced by FREE::PrecisionSOMetric< VImageDimension >::ComputeDecomposedValue(), and FREE::SetupOptimizationMetricMonitorBase< TResultClass >::Initialize().

Here is the call graph for this function:

FREE::GenericSetupToImageAdaptor::RestartAdaptation

Setup * FREE::GenericSetupToImageAdaptor::GetTemplateSetup (  ) 

Returns the pointer to the actual template setup .

Returns:
Pointer to the template setup.

Definition at line 47 of file freGenericSetupToImageAdaptor.cxx.

References m_pTemplateSetup.

const Adaptation::AdaptationList & FREE::GenericSetupToImageAdaptor::GetAdaptationList (  ) 

Returns reference of the internal adaptation list.

Returns:
Pointer to the ImageAdaptionList.

Definition at line 52 of file freGenericSetupToImageAdaptor.cxx.

References m_AdaptationList.

void FREE::GenericSetupToImageAdaptor::AddAdaptation ( const Adaptation::Adaptation adaptation  ) 

Adds a copy of the adaptation to the internal adaptation list.

Parameters:
[in] adaptation Reference of the adaptation, that schould be added.

Definition at line 59 of file freGenericSetupToImageAdaptor.cxx.

References m_AdaptationList.

void FREE::GenericSetupToImageAdaptor::AddAdaptations ( const Adaptation::AdaptationList adaptations  ) 

Adds a copy of all adaptations in the passed list to the internal adaptation list.

Remarks:
Calling this function will restart the adaptation process.
Parameters:
[in] adaptations Reference of the adaptation list, that schould be added.

Definition at line 66 of file freGenericSetupToImageAdaptor.cxx.

References m_AdaptationList, and RestartAdaptation().

Referenced by FREE::PrecisionSOMetric< VImageDimension >::ComputeDecomposedValue(), and FREE::SetupOptimizationMetricMonitorBase< TResultClass >::Initialize().

Here is the call graph for this function:

FREE::GenericSetupToImageAdaptor::RestartAdaptation

void FREE::GenericSetupToImageAdaptor::Reset (  ) 

Resets the internal adaptation list and sets the actual postion to the beginning.

Definition at line 74 of file freGenericSetupToImageAdaptor.cxx.

References m_AdaptationList, and RestartAdaptation().

Here is the call graph for this function:

FREE::GenericSetupToImageAdaptor::RestartAdaptation

void FREE::GenericSetupToImageAdaptor::RestartAdaptation (  ) 

Sets the actual adaption step to the beginning.

Definition at line 87 of file freGenericSetupToImageAdaptor.cxx.

References m_iCurrentAdaptation.

Referenced by AddAdaptations(), GenericSetupToImageAdaptor(), Reset(), and SetTemplateSetup().

bool FREE::GenericSetupToImageAdaptor::EndOfAdaptation (  ) 

Returns false if there is at least one adaptation left in the internal list to process. Otherwise m_iActualAdaptation will be out of bound and the return is true.

Returns:
Returns if all adaptations have been processed.

Definition at line 92 of file freGenericSetupToImageAdaptor.cxx.

References m_AdaptationList, and m_iCurrentAdaptation.

Referenced by FREE::PrecisionSOMetric< VImageDimension >::ComputeDecomposedValue().

const int FREE::GenericSetupToImageAdaptor::GetCurrentAdaptationID (  ) 

Returns the ID of the current adaptation item of the AdaptationList.

Returns:
Number of the current iteration.

Definition at line 82 of file freGenericSetupToImageAdaptor.cxx.

References m_iCurrentAdaptation.

Referenced by FREE::PrecisionSOMetric< VImageDimension >::ComputeDecomposedValue().

Setup::Pointer FREE::GenericSetupToImageAdaptor::AdaptSetup ( int  iActualAdaptationItemID  ) 

Adapts the template setup with the information of an Adaptation. The Adaptation is specified by the passed ID and indicates the position in the Adaptation.

Remarks:
The returned setup is a copy of the template setup.
Parameters:
[in] iActualAdaptationItemID Position of the Adaptation, which should be used.
Returns:
Smartpointer to the adapted setup.

Definition at line 97 of file freGenericSetupToImageAdaptor.cxx.

References m_AdaptationList, m_pTemplateSetup, FREE::Setup::New(), and throwExceptionMacro.

Referenced by AdaptNextSetup(), FREE::ConsistencyRegistrationMetric< VImageDimension >::ComputeDecomposedValue(), and FREE::SetupOptimizationMetricMonitorBase< TResultClass >::GetUnevaluatedAdaptedSetup().

Here is the call graph for this function:

FREE::Setup::New

Setup::Pointer FREE::GenericSetupToImageAdaptor::AdaptNextSetup (  ) 

Adapts the template setup with the information of an Adaptation. The Adaptation is specified by m_iActualAdaptation, which will be increased after the adaptation. If m_iActualAdaptation is out of bound, the function will return NULL.

Remarks:
The returned setup is a copy of the template setup.
Returns:
Smartpointer to the adapted setup.

Definition at line 112 of file freGenericSetupToImageAdaptor.cxx.

References AdaptSetup(), and m_iCurrentAdaptation.

Referenced by FREE::PrecisionSOMetric< VImageDimension >::ComputeDecomposedValue().

Here is the call graph for this function:

FREE::GenericSetupToImageAdaptor::AdaptSetupFREE::Setup::New

void FREE::GenericSetupToImageAdaptor::AdaptSetup ( const Adaptation::Adaptation adaptation,
Setup rSetup 
) [static]

Adapts the passed setup with the passed adaptation information

Parameters:
[in] adaptation Reference to the adaption information
[in,out] rSetup Reference to the setup that should be adapted.

Definition at line 132 of file freGenericSetupToImageAdaptor.cxx.

References AdaptComponent(), FREE::Adaptation::AdaptationComponent::AMAdapt, FREE::Adaptation::AdaptationComponent::AMExtend, FREE::Adaptation::AdaptationComponent::AMOverwrite, FREE::Adaptation::AdaptationComponent::AMReplace, ExtendComponent(), FREE::Adaptation::AdaptationComponent::GetAdaptationMode(), FREE::Adaptation::AdaptationComponent::GetComponentPath(), FREE::SmartCollectionBase< TElement >::GetElement(), FREE::Setup::GetRootComponent(), FREE::IDPath::IsAbsolute(), OverwriteComponent(), ReplaceComponent(), and FREE::CollectionBase< TElement, TStorageType >::Size().

Here is the call graph for this function:

FREE::GenericSetupToImageAdaptor::AdaptComponentFREE::CollectionBase::SizeFREE::GenericSetupToImageAdaptor::ExtendComponentFREE::Adaptation::AdaptationComponent::GetAdaptationModeFREE::Adaptation::AdaptationComponent::GetComponentPathFREE::SmartCollectionBase::GetElementFREE::Setup::GetRootComponentFREE::IDPath::IsAbsoluteFREE::GenericSetupToImageAdaptor::OverwriteComponentFREE::GenericSetupToImageAdaptor::ReplaceComponentFREE::SmartCollectionBase::AddElementFREE::ComponentSetup::ComponentsFREE::CollectionBase::DeleteElementFREE::ComponentSetup::GetComponentIDFREE::KeyedCollectionBase::GetElementFREE::KeyedCollectionBase::GetElementIndexFREE::ComponentMediaLink::GetMediaIDFREE::ParameterCollection::GetParameterFREE::Parameter::GetParameterNameFREE::ComponentSetup::MediaLinksFREE::ParameterCollection::ParameterExistsFREE::ComponentSetup::ParametersFREE::ParameterCollection::SizeFREE::GenericSetupToImageAdaptor::ValidateControllerFREE::ParameterCollection::GetParameterIndexFREE::ControllerCentral::GetControllerFREE::ComponentSetup::GetControllerIDFREE::ComponentControllerInterface::IsRelatedToFREE::ControllerInfo::GetControllerFREE::ControllerCentral::GetControllerInfoFREE::ControllerCentral::InitializeFREE::ControllerCentral::LoadDynamicControllersFREE::ControllerCentral::RegisterDefaultsFREE::GetGeneralFREEPathFREE::ControllerCentral::LoadLibrariesInPathFREE::LogFileController::AddEntryFREE::CreateFullPathFREE::NameIsSharedLibraryFREE::ControllerCentral::RegisterControllerFREE::ControllerCentral::TriggerControlEventFREE::ComponentControllerInterface::ControllerIDFREE::CtrlProfile::ProfileInheritance::IsChildOfFREE::CtrlProfile::ProfileInheritance::IndexOfAncestorFREE::XMLStringMultiMap::GetElementDataFREE::XMLStringMultiMap::SizeFREE::ParameterCollection::AddParameterFREE::Parameter::NewFREE::ComponentSetupCollection::AddElementFREE::ComponentSetup::SetControllerID

static void FREE::GenericSetupToImageAdaptor::AdaptSetupComponent ( const Adaptation::AdaptationComponent pAdaptComp,
ComponentSetup pComponentSetup 
) [static, protected]

void FREE::GenericSetupToImageAdaptor::AdaptComponent ( const ComponentSetup pAdaptComp,
ComponentSetup pComponentSetup 
) [static, protected]

Definition at line 205 of file freGenericSetupToImageAdaptor.cxx.

References FREE::SmartCollectionBase< TElement >::AddElement(), FREE::ComponentSetup::Components(), FREE::CollectionBase< TElement, TStorageType >::DeleteElement(), FREE::ComponentSetup::GetComponentID(), FREE::KeyedCollectionBase< TKey, TElement, TIdentifierClass >::GetElement(), FREE::KeyedCollectionBase< TKey, TElement, TIdentifierClass >::GetElementIndex(), FREE::ComponentMediaLink::GetMediaID(), FREE::ParameterCollection::GetParameter(), FREE::Parameter::GetParameterName(), FREE::ComponentSetup::MediaLinks(), FREE::ParameterCollection::ParameterExists(), FREE::ComponentSetup::Parameters(), FREE::CollectionBase< TElement, TStorageType >::Size(), FREE::ParameterCollection::Size(), and ValidateController().

Referenced by AdaptSetup().

Here is the call graph for this function:

FREE::SmartCollectionBase::AddElementFREE::ComponentSetup::ComponentsFREE::CollectionBase::DeleteElementFREE::ComponentSetup::GetComponentIDFREE::KeyedCollectionBase::GetElementFREE::KeyedCollectionBase::GetElementIndexFREE::ComponentMediaLink::GetMediaIDFREE::ParameterCollection::GetParameterFREE::Parameter::GetParameterNameFREE::ComponentSetup::MediaLinksFREE::ParameterCollection::ParameterExistsFREE::ComponentSetup::ParametersFREE::CollectionBase::SizeFREE::ParameterCollection::SizeFREE::GenericSetupToImageAdaptor::ValidateControllerFREE::ParameterCollection::GetParameterIndexFREE::ControllerCentral::GetControllerFREE::ComponentSetup::GetControllerIDFREE::ComponentControllerInterface::IsRelatedToFREE::ControllerInfo::GetControllerFREE::ControllerCentral::GetControllerInfoFREE::ControllerCentral::InitializeFREE::ControllerCentral::LoadDynamicControllersFREE::ControllerCentral::RegisterDefaultsFREE::GetGeneralFREEPathFREE::ControllerCentral::LoadLibrariesInPathFREE::LogFileController::AddEntryFREE::CreateFullPathFREE::NameIsSharedLibraryFREE::ControllerCentral::RegisterControllerFREE::ControllerCentral::TriggerControlEventFREE::ComponentControllerInterface::ControllerIDFREE::CtrlProfile::ProfileInheritance::IsChildOfFREE::CtrlProfile::ProfileInheritance::IndexOfAncestorFREE::XMLStringMultiMap::GetElementDataFREE::XMLStringMultiMap::Size

void FREE::GenericSetupToImageAdaptor::ExtendComponent ( const ComponentSetup pAdaptComp,
ComponentSetup pComponentSetup 
) [static, protected]

Definition at line 250 of file freGenericSetupToImageAdaptor.cxx.

References FREE::SmartCollectionBase< TElement >::AddElement(), FREE::ParameterCollection::AddParameter(), FREE::ComponentSetup::Components(), FREE::CollectionBase< TElement, TStorageType >::DeleteElement(), FREE::ComponentSetup::GetComponentID(), FREE::KeyedCollectionBase< TKey, TElement, TIdentifierClass >::GetElement(), FREE::KeyedCollectionBase< TKey, TElement, TIdentifierClass >::GetElementIndex(), FREE::ComponentMediaLink::GetMediaID(), FREE::ParameterCollection::GetParameter(), FREE::Parameter::GetParameterName(), FREE::ComponentSetup::MediaLinks(), FREE::ParameterCollection::ParameterExists(), FREE::ComponentSetup::Parameters(), FREE::CollectionBase< TElement, TStorageType >::Size(), FREE::ParameterCollection::Size(), and ValidateController().

Referenced by AdaptSetup().

Here is the call graph for this function:

FREE::SmartCollectionBase::AddElementFREE::ParameterCollection::AddParameterFREE::ComponentSetup::ComponentsFREE::CollectionBase::DeleteElementFREE::ComponentSetup::GetComponentIDFREE::KeyedCollectionBase::GetElementFREE::KeyedCollectionBase::GetElementIndexFREE::ComponentMediaLink::GetMediaIDFREE::ParameterCollection::GetParameterFREE::Parameter::GetParameterNameFREE::ComponentSetup::MediaLinksFREE::ParameterCollection::ParameterExistsFREE::ComponentSetup::ParametersFREE::CollectionBase::SizeFREE::ParameterCollection::SizeFREE::GenericSetupToImageAdaptor::ValidateControllerFREE::Parameter::NewFREE::ParameterCollection::GetParameterIndexFREE::ControllerCentral::GetControllerFREE::ComponentSetup::GetControllerIDFREE::ComponentControllerInterface::IsRelatedToFREE::ControllerInfo::GetControllerFREE::ControllerCentral::GetControllerInfoFREE::ControllerCentral::InitializeFREE::ControllerCentral::LoadDynamicControllersFREE::ControllerCentral::RegisterDefaultsFREE::GetGeneralFREEPathFREE::ControllerCentral::LoadLibrariesInPathFREE::LogFileController::AddEntryFREE::CreateFullPathFREE::NameIsSharedLibraryFREE::ControllerCentral::RegisterControllerFREE::ControllerCentral::TriggerControlEventFREE::ComponentControllerInterface::ControllerIDFREE::CtrlProfile::ProfileInheritance::IsChildOfFREE::CtrlProfile::ProfileInheritance::IndexOfAncestorFREE::XMLStringMultiMap::GetElementDataFREE::XMLStringMultiMap::Size

void FREE::GenericSetupToImageAdaptor::ReplaceComponent ( const ComponentSetup pAdaptComp,
ComponentSetup pComponentSetup 
) [static, protected]

Definition at line 300 of file freGenericSetupToImageAdaptor.cxx.

References FREE::ComponentSetup::Components(), FREE::ComponentSetup::GetControllerID(), FREE::ComponentSetup::MediaLinks(), FREE::ComponentSetup::Parameters(), and FREE::ComponentSetup::SetControllerID().

Referenced by AdaptSetup(), and OverwriteComponent().

Here is the call graph for this function:

FREE::ComponentSetup::ComponentsFREE::ComponentSetup::GetControllerIDFREE::ComponentSetup::MediaLinksFREE::ComponentSetup::ParametersFREE::ComponentSetup::SetControllerID

void FREE::GenericSetupToImageAdaptor::OverwriteComponent ( const ComponentSetup pAdaptComp,
ComponentSetup pComponentSetup,
Setup rSetup 
) [static, protected]

Definition at line 312 of file freGenericSetupToImageAdaptor.cxx.

References FREE::ComponentSetupCollection::AddElement(), FREE::ComponentSetup::Components(), FREE::ComponentSetup::GetComponentID(), FREE::KeyedCollectionBase< TKey, TElement, TIdentifierClass >::GetElement(), FREE::Setup::GetRootComponent(), and ReplaceComponent().

Referenced by AdaptSetup().

Here is the call graph for this function:

FREE::ComponentSetupCollection::AddElementFREE::ComponentSetup::ComponentsFREE::ComponentSetup::GetComponentIDFREE::KeyedCollectionBase::GetElementFREE::Setup::GetRootComponentFREE::GenericSetupToImageAdaptor::ReplaceComponentFREE::KeyedCollectionBase::GetElementIndexFREE::ComponentSetup::GetControllerIDFREE::ComponentSetup::MediaLinksFREE::ComponentSetup::ParametersFREE::ComponentSetup::SetControllerID

bool FREE::GenericSetupToImageAdaptor::ValidateController ( const ComponentSetup pAdaptComp,
const ComponentSetup pComponentSetup 
) [static, protected]

Definition at line 191 of file freGenericSetupToImageAdaptor.cxx.

References FREE::csUndefinedController, FREE::ControllerCentral::GetController(), FREE::ComponentSetup::GetControllerID(), and FREE::ComponentControllerInterface::IsRelatedTo().

Referenced by AdaptComponent(), and ExtendComponent().

Here is the call graph for this function:

FREE::ControllerCentral::GetControllerFREE::ComponentSetup::GetControllerIDFREE::ComponentControllerInterface::IsRelatedToFREE::ControllerInfo::GetControllerFREE::ControllerCentral::GetControllerInfoFREE::ControllerCentral::InitializeFREE::ControllerCentral::LoadDynamicControllersFREE::ControllerCentral::RegisterDefaultsFREE::GetGeneralFREEPathFREE::ControllerCentral::LoadLibrariesInPathFREE::LogFileController::AddEntryFREE::CreateFullPathFREE::NameIsSharedLibraryFREE::ControllerCentral::RegisterControllerFREE::ControllerCentral::TriggerControlEventFREE::ComponentControllerInterface::ControllerIDFREE::CtrlProfile::ProfileInheritance::IsChildOfFREE::CtrlProfile::ProfileInheritance::IndexOfAncestorFREE::XMLStringMultiMap::GetElementDataFREE::XMLStringMultiMap::Size


Member Data Documentation

int FREE::GenericSetupToImageAdaptor::m_iCurrentAdaptation [protected]

The adaptation item, which will be used for the next adaptation. Any changes on m_pAdaptationList will reset m_iActualAdaptation to 0.

Definition at line 120 of file freGenericSetupToImageAdaptor.h.

Referenced by AdaptNextSetup(), EndOfAdaptation(), GetCurrentAdaptationID(), and RestartAdaptation().

Setup* FREE::GenericSetupToImageAdaptor::m_pTemplateSetup [protected]

Pointer to the start setup.

Definition at line 123 of file freGenericSetupToImageAdaptor.h.

Referenced by AdaptSetup(), GenericSetupToImageAdaptor(), GetTemplateSetup(), and SetTemplateSetup().

Adaptation::AdaptationList::Pointer FREE::GenericSetupToImageAdaptor::m_AdaptationList [protected]

Internal list of adaptations.

Definition at line 126 of file freGenericSetupToImageAdaptor.h.

Referenced by AdaptSetup(), AddAdaptation(), AddAdaptations(), EndOfAdaptation(), GenericSetupToImageAdaptor(), GetAdaptationList(), and Reset().


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