]> Creatis software - FrontAlgorithms.git/blob - lib/fpa/Functors/BaseVertexFunction.h
...
[FrontAlgorithms.git] / lib / fpa / Functors / BaseVertexFunction.h
1 // =========================================================================
2 // @author Leonardo Florez Valencia
3 // @email florez-l@javeriana.edu.co
4 // =========================================================================
5 #ifndef __fpa__Functors__BaseVertexFunction__h__
6 #define __fpa__Functors__BaseVertexFunction__h__
7
8 #include <itkDataObject.h>
9 #include <itkObject.h>
10
11 namespace fpa
12 {
13   namespace Functors
14   {
15     /**
16      */
17     template< class _TVertex >
18     class BaseVertexFunction
19       : public itk::Object
20     {
21     public:
22       typedef _TVertex TVertex;
23       typedef itk::Object                     Superclass;
24       typedef BaseVertexFunction              Self;
25       typedef itk::SmartPointer< Self >       Pointer;
26       typedef itk::SmartPointer< const Self > ConstPointer;
27
28     public:
29       itkTypeMacro( fpa::Functors::BaseVertexFunction, itk::Object );
30
31       itkSetConstObjectMacro( DataObject, itk::DataObject );
32
33     public:
34       template< class _TDataObject = itk::DataObject >
35       const _TDataObject* GetDataObject( ) const
36         {
37           return(
38             dynamic_cast< const _TDataObject* >(
39               this->m_DataObject.GetPointer( )
40               )
41             );
42         }
43
44     protected:
45       BaseVertexFunction( )
46         : Superclass( ),
47           m_DataObject( NULL )
48         {
49         }
50
51       virtual ~BaseVertexFunction( )
52         {
53         }
54
55     private:
56       // Purposely not implemented.
57       BaseVertexFunction( const Self& other );
58       Self& operator=( const Self& other );
59
60     protected:
61       itk::DataObject::ConstPointer m_DataObject;
62     };
63
64   } // ecapseman
65
66 } // ecapseman
67
68 #endif // __fpa__Functors__BaseVertexFunction__h__
69 // eof - $RCSfile$