00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef __freRigidRegistrationControllerBase_h
00023 #define __freRigidRegistrationControllerBase_h
00024
00025 #include "freImageRegistrationControllerBase.h"
00026 #include "freOptimizerOwnerControllerInterface.h"
00027
00028 namespace FREE
00029 {
00030
00040 freControllerIDMacro(RigidRegistrationControllerBase, "RigidRegistrationBase");
00041 template <class TControlledRigidProcessor>
00042 class RigidRegistrationControllerBase : public ImageRegistrationControllerBase<TControlledRigidProcessor>, public OptimizerOwnerControllerInterface
00043 {
00044 public:
00045 typedef TControlledRigidProcessor ComponentType;
00046 typedef typename ComponentType::Pointer ComponentPointer;
00047 typedef ImageRegistrationControllerBase<ComponentType> Superclass;
00048 typedef RigidRegistrationControllerBase<ComponentType> Self;
00049
00050 typedef typename Superclass::GenericComponentType GenericComponentType;
00051 typedef typename Superclass::GenericComponentPointer GenericComponentPointer;
00052 typedef typename Superclass::GenericMediaPointer GenericMediaPointer;
00053
00054 DeclareParameterMacro(PersistentFinalField);
00055
00056 DeclareMediaIDMacro(fieldReference);
00057 DeclareMediaIDMacro(finalField);
00058 DeclareMediaIDMacro(finalTransform);
00059 DeclareMediaIDMacro(finalInverseTransform);
00060
00061 itkTypeMacro(RigidRegistrationControllerBase, ImageRegistrationControllerBase);
00062
00063 virtual ValidityTag::Pointer GetMediaValidityTagRequirement(const MediaID& mediaID, SessionComponentCache* pComponentCache) const;
00064
00065 virtual bool GetMinimizeToOptimize(const SessionComponentCache* pComponentCache) const;
00066
00067 virtual Parameter::Pointer GetParameter(const SessionComponentCache* pComponentCache,
00068 const std::string& sParameterName) const;
00069
00070 protected:
00071 RigidRegistrationControllerBase();
00072
00073 virtual void GenerateProfile(CtrlProfile::ControllerProfile& profile,
00074 const SessionComponentCache* pComponentCache,
00075 bool bRegardOldSetup) const;
00076
00077 virtual ComponentPointer BuildMainComponent(ComponentSetup* pComponentSetup,
00078 SessionComponentCache* pComponentCache) const;
00079
00080 virtual void ActualizeMainComponent(ComponentType* pMainComponent,
00081 SessionComponentCache* pComponentCache,
00082 SessionInfo* pSessionInfo,
00083 const unsigned int& iActLevel) const;
00084
00085 virtual GenericComponentType* GetSubComponentCasted(ComponentType* pMainComponent, const ComponentID& compID,
00086 SessionComponentCache* pMainComponentCache) const;
00087 virtual void SetSubComponentCasted(GenericComponentType* pSubComponent, ComponentType* pMainComponent,
00088 const ComponentID compID, SessionComponentCache* pMainComponentCache) const;
00089
00090 virtual GenericMediaPointer GetMediaCasted(const MediaID& mediaID,
00091 ComponentType* pComponent,
00092 SessionComponentCache* pComponentCache,
00093 SessionInfo* pSessionInfo) const;
00094
00095 virtual void SetMediaCasted(const MediaID& mediaID, GenericMediaType* pMedia, ComponentType* pComponent, SessionComponentCache* pComponentCache,
00096 SessionInfo* pSessionInfo) const;
00097
00098 virtual ValidityTag::Pointer GetValidityTagRequirement(const std::string& id, SessionComponentCache* pComponentCache) const;
00099
00100 virtual void ResetMainComponent(SessionComponentCache* pComponentCache,
00101 SessionInfo* pSessionInfo) const;
00102
00103 virtual void ResetSubComponents(SessionComponentCache* pComponentCache,
00104 SessionInfo* pSessionInfo) const;
00105 };
00106
00107 }
00108
00109 #ifndef ITK_MANUAL_INSTANTIATION
00110 #include "freRigidRegistrationControllerBase.txx"
00111 #endif
00112
00113 #endif