1 #ifndef __CPPLUGINS__INTERFACE__PROCESSOBJECT__H__
2 #define __CPPLUGINS__INTERFACE__PROCESSOBJECT__H__
6 #include <itkProcessObject.h>
7 #include <cpPlugins/Interface/cpPlugins_Interface_Export.h>
8 #include <cpPlugins/Interface/Object.h>
9 #include <cpPlugins/Interface/DataObject.h>
17 class cpPlugins_Interface_EXPORT ProcessObject
21 typedef ProcessObject Self;
22 typedef Object Superclass;
23 typedef itk::SmartPointer< Self > Pointer;
24 typedef itk::SmartPointer< const Self > ConstPointer;
26 typedef std::pair< std::string, std::string > TParameter;
27 typedef std::map< std::string, TParameter > TParameters;
30 itkTypeMacro( ProcessObject, Object );
33 virtual std::string GetClassName( ) const;
34 virtual std::string GetClassType( ) const;
35 virtual const TParameters& GetDefaultParameters( ) const;
36 virtual void SetParameters( const TParameters& params );
38 virtual unsigned int GetNumberOfInputs( ) const;
39 virtual unsigned int GetNumberOfOutputs( ) const;
41 virtual void SetNumberOfInputs( unsigned int n );
42 virtual void SetNumberOfOutputs( unsigned int n );
44 virtual void SetInput( unsigned int idx, DataObject* dobj );
45 virtual DataObject* GetOutput( unsigned int idx );
47 virtual std::string Update( );
48 virtual void DisconnectOutputs( );
52 virtual ~ProcessObject( );
54 virtual itk::DataObject* _GetInput( unsigned int idx );
55 virtual void _SetOutput( unsigned int idx, itk::DataObject* dobj );
58 void _MakeOutput( unsigned int idx )
60 if( idx >= this->m_Outputs.size( ) )
62 this->m_Outputs[ idx ] = O::New( );
63 this->m_Outputs[ idx ]->SetSource( this );
66 virtual std::string _GenerateData( ) = 0;
69 // Purposely not implemented
70 ProcessObject( const Self& );
71 Self& operator=( const Self& );
74 itk::ProcessObject::Pointer m_RealProcessObject;
75 TParameters m_DefaultParameters;
76 TParameters m_Parameters;
78 std::vector< DataObject::Pointer > m_Inputs;
79 std::vector< DataObject::Pointer > m_Outputs;
86 #endif // __CPPLUGINS__INTERFACE__PROCESSOBJECT__H__