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>
28 #ifdef cpPlugins_Interface_QT4
29 class ParametersQtDialog;
31 typedef char ParametersQtDialog;
32 #endif // cpPlugins_Interface_QT4
36 class cpPlugins_Interface_EXPORT ProcessObject
40 typedef ProcessObject Self;
41 typedef Object Superclass;
42 typedef itk::SmartPointer< Self > Pointer;
43 typedef itk::SmartPointer< const Self > ConstPointer;
45 typedef Parameters TParameters;
48 itkTypeMacro( ProcessObject, Object );
50 cpPlugins::Interface::ProcessObject, "BaseObject"
55 virtual void Modified( ) const;
57 virtual TParameters* GetParameters( );
58 virtual const TParameters* GetParameters( ) const;
60 virtual unsigned int GetNumberOfInputs( ) const;
61 virtual unsigned int GetNumberOfOutputs( ) const;
63 virtual void SetInput( const std::string& id, DataObject* dobj );
65 virtual std::string Update( );
66 virtual void DisconnectOutputs( );
68 virtual bool ExecConfigurationDialog( QWidget* parent );
74 inline const T* GetITK( ) const;
80 inline const T* GetVTK( ) const;
83 inline T* GetInput( const std::string& id );
86 inline const T* GetInput( const std::string& id ) const;
89 inline T* GetOutput( const std::string& id );
92 inline const T* GetOutput( const std::string& id ) const;
96 virtual ~ProcessObject( );
98 virtual void _AddInput( const std::string& name );
101 inline F* _CreateITK( );
104 inline F* _CreateVTK( );
107 inline void _MakeOutput( const std::string& id );
109 virtual std::string _GenerateData( ) = 0;
112 // Purposely not implemented
113 ProcessObject( const Self& );
114 Self& operator=( const Self& );
117 itk::ProcessObject::Pointer m_ITKObject;
118 vtkSmartPointer< vtkAlgorithm > m_VTKObject;
120 Parameters::Pointer m_Parameters;
121 ParametersQtDialog* m_ParametersDialog;
123 typedef std::map< std::string, DataObject::Pointer > _TDataContainer;
124 _TDataContainer m_Inputs;
125 _TDataContainer m_Outputs;
132 #include <cpPlugins/Interface/ProcessObject.hxx>
134 #endif // __CPPLUGINS__INTERFACE__PROCESSOBJECT__H__