#include <freGenericSetupToImageAdaptor.h>

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.
typedef std::vector<ComponentSetup*> FREE::GenericSetupToImageAdaptor::ComponentVectorType [protected] |
Definition at line 107 of file freGenericSetupToImageAdaptor.h.
| FREE::GenericSetupToImageAdaptor::GenericSetupToImageAdaptor | ( | ) |
Definition at line 120 of file freGenericSetupToImageAdaptor.cxx.
References m_AdaptationList, m_pTemplateSetup, FREE::Adaptation::AdaptationList::New(), and RestartAdaptation().

| FREE::GenericSetupToImageAdaptor::~GenericSetupToImageAdaptor | ( | ) |
Definition at line 128 of file freGenericSetupToImageAdaptor.cxx.
| 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.
| [in] | pSetup | Pointer to the template setup. |
Definition at line 36 of file freGenericSetupToImageAdaptor.cxx.
References m_pTemplateSetup, and RestartAdaptation().
Referenced by FREE::PrecisionSOMetric< VImageDimension >::ComputeDecomposedValue(), and FREE::SetupOptimizationMetricMonitorBase< TResultClass >::Initialize().

| Setup * FREE::GenericSetupToImageAdaptor::GetTemplateSetup | ( | ) |
Returns the pointer to the actual 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.
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.
| [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.
| [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().

| 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().

| 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.
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.
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.
| [in] | iActualAdaptationItemID | Position of the Adaptation, which should be used. |
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().

| 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.
Definition at line 112 of file freGenericSetupToImageAdaptor.cxx.
References AdaptSetup(), and m_iCurrentAdaptation.
Referenced by FREE::PrecisionSOMetric< VImageDimension >::ComputeDecomposedValue().

| void FREE::GenericSetupToImageAdaptor::AdaptSetup | ( | const Adaptation::Adaptation & | adaptation, | |
| Setup & | rSetup | |||
| ) | [static] |
Adapts the passed setup with the passed adaptation information
| [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().

| 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().

| 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().

| 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().

| 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().

| 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().

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().
Internal list of adaptations.
Definition at line 126 of file freGenericSetupToImageAdaptor.h.
Referenced by AdaptSetup(), AddAdaptation(), AddAdaptations(), EndOfAdaptation(), GenericSetupToImageAdaptor(), GetAdaptationList(), and Reset().
1.5.3 written by Dimitri van Heesch,
© 1997-2000