#include <freSessionBuilder.h>
SessionBuilder is used on one hand to establish a valid setup and on the other hand for creation, initialization and actualization of setup components specified by this setup. Internally it uses the ControllerCentral and SessionAccessor to get access to the different component controller.
Definition at line 46 of file freSessionBuilder.h.
Definition at line 49 of file freSessionBuilder.h.
Generic component type
Definition at line 51 of file freSessionBuilder.h.
| typedef GenericComponentController::GenericComponentPointer FREE::SessionBuilder::GenericComponentPointer |
All components used within F.R.E.E. are derived from itk::LightObject. So this is the basic return within the generic controller interface.
Definition at line 54 of file freSessionBuilder.h.
Generic media type
Definition at line 56 of file freSessionBuilder.h.
Definition at line 57 of file freSessionBuilder.h.
| FREE::SessionBuilder::SessionBuilder | ( | ) |
Definition at line 38 of file freSessionBuilder.cxx.
| FREE::SessionBuilder::~SessionBuilder | ( | ) |
Definition at line 43 of file freSessionBuilder.cxx.
| SessionComponentCache::Pointer FREE::SessionBuilder::BuildComponent | ( | ComponentSetup * | pComponentSetup, | |
| SessionComponentCache * | pParentComponentCache | |||
| ) | [static] |
Uses the information of the ComponentSetup to establish a component and needed/specified subcomponents with the information gathered from the passed setup. Calls needed controller to create instances of the needed classes. Along with this instancing component caches will be created, which are used in further processes to interact with the builded section structure.
| [in,out] | pComponentSetup | Pointer to the ComponentSetup, with the setup information for the wanted registration component. |
| [in] | pParentComponentCache | Pointer to the parent component cache. If pointer is null, component has no parent, so is a section / main component. |
Definition at line 96 of file freSessionBuilder.cxx.
References FREE::ComponentControllerInterface::BuildSetup(), CheckComponentNecessity(), FREE::ComponentSetup::ControllerIsAssigned(), FREE::ComponentSetup::GetComponentID(), FREE::ControllerCentral::GetController(), FREE::ComponentSetup::GetControllerID(), FREE::ComponentSetup::GetIDPath(), FREE::SessionComponentCache::New(), throwStaticExceptionMacro, FREE::IDPath::ToStr(), and FREE::ControllerCentral::TriggerBuildEvent().
Referenced by BuildSession(), and FREE::ComponentControllerBase< TControlledComponent >::BuildSubComponents().

| SessionInfo::Pointer FREE::SessionBuilder::BuildSession | ( | Setup * | pSetup | ) | [static] |
Uses the information of the setup to establish the whole registration process with all section and their components and parameters specified by the setup. Calls all controller needed, they create instances of the needed classes and manage to set the parameters or in case of media container load their media. After completing the function the registration is created and ready to do its job.
| [in,out] | pSetup | Pointer to the setup describing the registration session. |
Definition at line 122 of file freSessionBuilder.cxx.
References BuildComponent(), catchAllNPassStaticMacro, FREE::Setup::GetSections(), FREE::SessionInfo::New(), throwStaticExceptionMacro, and FREE::ControllerCentral::TriggerBuildEvent().
Referenced by FREE::SessionProcessor::InitializeSession().

| SessionComponentCache::Pointer FREE::SessionBuilder::GeneratePassiveComponentCache | ( | ComponentSetup * | pComponentSetup, | |
| SessionComponentCache * | pParentComponentCache = NULL | |||
| ) | [static] |
Uses the information of the ComponentSetup to establish a component cache the result equals the result of BuildComponent, excepts the fact that no component will be created and referenced in the cache. Hence the cache is inactiv and only contains references for the controller and the setup. This cache cannot be used for any image processing tasks. It is used if only controller and setup information is needed (e.g. setup editor). The caches will be marked as passive.
| [in] | pComponentSetup | Pointer to the ComponentSetup, with the setup information for the wanted registration component. |
| [in] | pParentComponentCache | Pointer to the parent component cache. If pointer is null, component has no parent, so is a section / main component. |
Definition at line 149 of file freSessionBuilder.cxx.
References FREE::ComponentSetup::Components(), FREE::ControllerCentral::GetController(), FREE::ComponentSetup::GetControllerID(), FREE::KeyedCollectionBase< TKey, TElement, TIdentifierClass >::GetElement(), FREE::SessionComponentCache::New(), FREE::CollectionBase< TElement, TStorageType >::Size(), and throwStaticExceptionMacro.
Referenced by FREE::SetupManager::SetSetup().

| bool FREE::SessionBuilder::CheckComponentNecessity | ( | const SessionComponentCache * | pComponentCache | ) | [static] |
Function checks if the component of the passed cache is required for a valid setup.
| [in] | pComponentCache | The cache of the component that should be checked |
Definition at line 49 of file freSessionBuilder.cxx.
References FREE::SessionComponentCache::GetComponentID(), FREE::SessionComponentCache::GetParentCache(), FREE::SessionComponentCache::SetupIsAssigned(), and throwStaticExceptionMacro.
Referenced by ActualizeComponent(), FREE::ComponentControllerBase< TControlledComponent >::ActualizeComponent(), FREE::ComponentControllerBase< TControlledComponent >::ActualizeSubComponents(), and BuildComponent().

| bool FREE::SessionBuilder::CheckComponentNecessity | ( | const SessionComponentCache * | pParentCache, | |
| const ComponentID & | componentID | |||
| ) | [static] |
Function checks if the component of the passed cache is required for a valid setup.
| [in] | pParentCache | The cache of the parent component that owns the component that should be checked. |
| [in] | componentID | ComponentID of the component that should be checked. |
Definition at line 61 of file freSessionBuilder.cxx.
References FREE::ComponentSetup::Components(), FREE::SessionComponentCache::Controller(), FREE::ComponentSetup::ControllerIsAssigned(), FREE::SessionComponentCache::ControllerIsAssigned(), FREE::CtrlProfile::SubComponent::GetComponentID(), FREE::KeyedCollectionBase< TKey, TElement, TIdentifierClass >::GetElement(), FREE::CtrlProfile::SubComponent::GetIsRequired(), FREE::ComponentControllerInterface::GetProfile(), FREE::SessionComponentCache::Setup(), FREE::CollectionBase< TElement, TStorageType >::Size(), and throwStaticExceptionMacro.

| void FREE::SessionBuilder::ActualizeComponent | ( | SessionComponentCache * | pComponentCache, | |
| SessionInfo * | pSessionInfo, | |||
| const unsigned int & | iActiveLayer = 0 | |||
| ) | [static] |
Function gets controller, checks if he is dynamic and if so let him actualize the parameters of the component setup.
| [in,out] | pComponentCache | Pointer to the component cache, containing the setup information for the component, the component itself and a pointer to its controller. |
| [in,out] | pSessionInfo | Pointer to the session info. |
| [in] | iActiveLayer | Indicates which layer of a parameter should be used, if the parameter is layer sensitive (e.g. as resolution level of a registration). Default is 0. |
Definition at line 170 of file freSessionBuilder.cxx.
References FREE::ComponentControllerInterface::ActualizeComponent(), FREE::ComponentControllerInterface::CheckComponentActualizationNecessity(), CheckComponentNecessity(), FREE::SessionComponentCache::Controller(), FREE::SessionComponentCache::ControllerIsAssigned(), FREE::SessionComponentCache::GetComponentID(), and throwStaticExceptionMacro.
Referenced by ActualizeSession(), FREE::MultiRigidRegistrationProcessor< VImageDimension >::ComputeRegistration(), FREE::SingleRigidRegistrationProcessorBase< TRegistrationMethod, TTransformBase, TInterpolateBase, TMetricBase, TOptimizerBase, VImageDimension >::ComputeRegistration(), FREE::FEMRegistrationProcessor< VImageDimension >::ComputeRegistration(), FREE::RigidRegistrationControllerBase< TControlledRigidProcessor >::GetMediaCasted(), FREE::PointSetRegistrationControllerBase< TControlledRigidProcessor >::GetMediaCasted(), FREE::ImageToImageFilterControllerBase< TControlledFilter >::GetMediaCasted(), FREE::FEMRegistrationControllerBase< FREE::FEMRegistrationProcessor >::GetMediaCasted(), FREE::DemonRegistrationControllerBase< FREE::DemonRegistrationProcessor >::GetMediaCasted(), FREE::ClosedFormRegistrationControllerBase< TControlledRigidProcessor >::GetMediaCasted(), and FREE::MultiRigidRegistrationProcessor< VImageDimension >::OnNewLevel().

| void FREE::SessionBuilder::ActualizeSession | ( | SessionInfo * | pSessionInfo, | |
| const unsigned int & | iActiveLayer = 0 | |||
| ) | [static] |
This function is used to actualize the components of the session, when the resolution level of the registration is to be changed. The function checks if the controllers "in charge" are dynamic in multi resolution, if so they will be called to actualize the Setup of their component. After completing the function the registration object is ready to do his job at the next level.
| [in,out] | pSessionInfo | Pointer to the session info, of the registration section which should be actualized. |
| [in] | iActiveLayer | Indicates which layer of a parameter should be used, if the parameter is layer sensitive (e.g. as resolution level of a registration). Default is 0. |
Definition at line 188 of file freSessionBuilder.cxx.
References ActualizeComponent(), catchAllNPassStaticMacro, FREE::SessionInfo::GetComponentCaches(), and throwStaticExceptionMacro.

| void FREE::SessionBuilder::SetStatisticEntry | ( | StatisticEntry & | rStatisticEntry, | |
| SessionComponentCache * | pComponentCache, | |||
| SessionInfo * | pSessionInfo | |||
| ) | [static] |
Function gets controller and let him record any statistical information for the actual registration step.
| [in,out] | rStatisticEntry | reference to the Statistic object, where the relevant information should be stored. |
| [in] | pComponentCache | The cache of the component, that should set its statistic. |
| [in] | pSessionInfo | Pointer to the session info containing the cache and the statistic the entry is associated with. |
Definition at line 204 of file freSessionBuilder.cxx.
References FREE::SessionComponentCache::ComponentIsAssigned(), FREE::SessionComponentCache::Controller(), FREE::SessionComponentCache::ControllerIsAssigned(), FREE::SessionComponentCache::GetComponentID(), FREE::ComponentControllerInterface::SetStatisticEntry(), FREE::SessionComponentCache::SetupIsAssigned(), and throwStaticExceptionMacro.
Referenced by FREE::SetupOptimizationProcessorController::SetStatisticEntrySubComponents(), and FREE::ComponentControllerBase< TControlledComponent >::SetStatisticEntrySubComponents().

| void FREE::SessionBuilder::LinkMediaToComponent | ( | SessionComponentCache * | pComponentCache, | |
| SessionInfo * | pInfo | |||
| ) | [static] |
Checks a passed component for specified media links. If found, the media will be linked.
| [in,out] | pComponentCache | Cache of the component that should be linked. |
| [in] | pInfo | Pointer to the info structure of the ongoing session. |
Definition at line 232 of file freSessionBuilder.cxx.
References FREE::SessionComponentCache::Controller(), FREE::KeyedCollectionBase< TKey, TElement, TIdentifierClass >::GetElement(), FREE::SessionComponentCache::GetIDPath(), FREE::SessionAccessor::GetMedia(), FREE::ComponentSetup::MediaLinks(), FREE::ComponentControllerInterface::SetMedia(), FREE::SessionComponentCache::Setup(), FREE::SessionComponentCache::SetupIsAssigned(), FREE::CollectionBase< TElement, TStorageType >::Size(), FREE::SessionComponentCache::SubCaches(), throwStaticExceptionMacro, FREE::IDPath::ToStr(), and FREE::ControllerCentral::TriggerBuildEvent().
Referenced by FREE::RigidRegistrationControllerBase< TControlledRigidProcessor >::GetMediaCasted(), FREE::PointSetRegistrationControllerBase< TControlledRigidProcessor >::GetMediaCasted(), FREE::ImageToImageFilterControllerBase< TControlledFilter >::GetMediaCasted(), FREE::FEMRegistrationControllerBase< FREE::FEMRegistrationProcessor >::GetMediaCasted(), FREE::DemonRegistrationControllerBase< FREE::DemonRegistrationProcessor >::GetMediaCasted(), and FREE::ClosedFormRegistrationControllerBase< TControlledRigidProcessor >::GetMediaCasted().

| void FREE::SessionBuilder::LinkMediaToComponentByID | ( | const std::string & | sMediaID, | |
| SessionComponentCache * | pComponentCache, | |||
| SessionInfo * | pInfo | |||
| ) | [static] |
Links a passed component with the specified media link.
| [in] | sMediaID | ID of the media that should be linked. |
| [in,out] | pComponentCache | Cache of the component that should be linked. |
| [in] | pInfo | Pointer to the info structure of the ongoing session. |
Definition at line 264 of file freSessionBuilder.cxx.
References FREE::SessionComponentCache::Controller(), FREE::KeyedCollectionBase< TKey, TElement, TIdentifierClass >::GetElement(), FREE::SessionComponentCache::GetIDPath(), FREE::SessionAccessor::GetMedia(), FREE::ComponentSetup::MediaLinks(), FREE::ComponentControllerInterface::SetMedia(), FREE::SessionComponentCache::Setup(), FREE::SessionComponentCache::SetupIsAssigned(), throwStaticExceptionMacro, FREE::IDPath::ToStr(), and FREE::ControllerCentral::TriggerBuildEvent().

1.5.3 written by Dimitri van Heesch,
© 1997-2000