]> Creatis software - cpPlugins.git/blobdiff - lib/cpPlugins/Pipeline/Functor.h
Discontinuity map (Wan Yu) filter added.
[cpPlugins.git] / lib / cpPlugins / Pipeline / Functor.h
index bac4523e85c425143527caeb25076672cf6952ec..96255b7f2b18c2e78777cc056931b0b34059484e 100644 (file)
@@ -23,6 +23,25 @@ namespace cpPlugins
       itkTypeMacro( Functor, ProcessObject );
       cpPlugins_Id_Macro( Functor, Object );
 
+    public:
+      virtual void Instantiate( itk::LightObject* filter ) = 0;
+
+      template< class _TFunctor >
+      _TFunctor* GetFunctor( )
+        {
+          return(
+            dynamic_cast< _TFunctor* >( this->m_Functor.GetPointer( ) )
+            );
+        }
+
+      template< class _TFunctor >
+      const _TFunctor* GetFunctor( ) const
+        {
+          return(
+            dynamic_cast< const _TFunctor* >( this->m_Functor.GetPointer( ) )
+            );
+        }
+
     protected:
       Functor( );
       virtual ~Functor( );
@@ -31,6 +50,9 @@ namespace cpPlugins
       // Purposely not implemented
       Functor( const Self& );
       Self& operator=( const Self& );
+
+    protected:
+      itk::LightObject::Pointer m_Functor;
     };
 
   } // ecapseman