1 #ifndef __CPPLUGINS__INTERFACE__PROCESSOBJECT__H__
2 #define __CPPLUGINS__INTERFACE__PROCESSOBJECT__H__
4 #include <cpPlugins/Interface/cpPlugins_Interface_Export.h>
8 #include <cpPlugins/Interface/Config.h>
9 #include <cpPlugins/Interface/Object.h>
10 #include <cpPlugins/Interface/DataObject.h>
11 #include <cpPlugins/Interface/Parameters.h>
13 #ifdef cpPlugins_Interface_QT4
17 #endif // cpPlugins_Interface_QT4
19 #include <itkProcessObject.h>
21 #include <vtkSmartPointer.h>
22 #include <vtkAlgorithm.h>
30 class cpPlugins_Interface_EXPORT ProcessObject
34 typedef ProcessObject Self;
35 typedef Object Superclass;
36 typedef itk::SmartPointer< Self > Pointer;
37 typedef itk::SmartPointer< const Self > ConstPointer;
39 typedef Parameters TParameters;
42 itkTypeMacro( ProcessObject, Object );
44 cpPlugins::Interface::ProcessObject, "BaseObject"
49 virtual void Modified( ) const;
51 virtual TParameters* GetParameters( );
52 virtual const TParameters* GetParameters( ) const;
54 virtual unsigned int GetNumberOfInputs( ) const;
55 virtual unsigned int GetNumberOfOutputs( ) const;
57 virtual void SetInput( const std::string& id, DataObject* dobj );
59 virtual std::string Update( );
60 virtual void DisconnectOutputs( );
62 virtual bool ExecConfigurationDialog( QWidget* parent );
68 inline const T* GetITK( ) const;
74 inline const T* GetVTK( ) const;
77 inline T* GetInput( const std::string& id );
80 inline const T* GetInput( const std::string& id ) const;
83 inline T* GetOutput( const std::string& id );
86 inline const T* GetOutput( const std::string& id ) const;
90 virtual ~ProcessObject( );
92 virtual void _AddInput( const std::string& name );
95 inline F* _CreateITK( );
98 inline F* _CreateVTK( );
101 inline void _MakeOutput( const std::string& id );
103 virtual std::string _GenerateData( ) = 0;
106 // Purposely not implemented
107 ProcessObject( const Self& );
108 Self& operator=( const Self& );
111 itk::ProcessObject::Pointer m_ITKObject;
112 vtkSmartPointer< vtkAlgorithm > m_VTKObject;
114 Parameters::Pointer m_Parameters;
116 typedef std::map< std::string, DataObject::Pointer > _TDataContainer;
117 _TDataContainer m_Inputs;
118 _TDataContainer m_Outputs;
125 #include <cpPlugins/Interface/ProcessObject.hxx>
127 #endif // __CPPLUGINS__INTERFACE__PROCESSOBJECT__H__