00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __itkTransformFactoryBase_h
00021 #define __itkTransformFactoryBase_h
00022
00023 #include "itkObjectFactoryBase.h"
00024
00025 namespace itk
00026 {
00031 class ITKCommon_EXPORT TransformFactoryBase : public ObjectFactoryBase
00032 {
00033 public:
00035 typedef TransformFactoryBase Self;
00036 typedef ObjectFactoryBase Superclass;
00037 typedef SmartPointer< Self > Pointer;
00038 typedef SmartPointer< const Self > ConstPointer;
00039
00041 virtual const char* GetITKSourceVersion(void) const;
00042 virtual const char* GetDescription(void) const;
00043
00045 itkTypeMacro(TransformFactoryBase, ObjectFactoryBase);
00046
00048 itkFactorylessNewMacro(Self);
00049
00051 static void RegisterDefaultTransforms();
00052
00054 static TransformFactoryBase* GetFactory ()
00055 {
00056 if ( m_Factory == 0 )
00057 {
00058
00059 TransformFactoryBase::Pointer p = TransformFactoryBase::New();
00060 m_Factory = p.GetPointer();
00061 ObjectFactoryBase::RegisterFactory ( p );
00062 p->RegisterDefaultTransforms ();
00063 }
00064 return m_Factory;
00065 }
00066
00067 void RegisterTransform(const char* classOverride,
00068 const char* overrideClassName,
00069 const char* description,
00070 bool enableFlag,
00071 CreateObjectFunctionBase* createFunction)
00072 {
00073 this->RegisterOverride ( classOverride, overrideClassName, description, enableFlag, createFunction );
00074 }
00075
00076 protected:
00077 TransformFactoryBase();
00078 virtual ~TransformFactoryBase();
00079
00080 private:
00081 TransformFactoryBase(const Self&);
00082 void operator=(const Self&);
00083 static TransformFactoryBase* m_Factory;
00084 };
00085 }
00086
00087 #endif