1 #ifndef __CPPLUGINS__INTERFACE__PROCESSOBJECT__H__
2 #define __CPPLUGINS__INTERFACE__PROCESSOBJECT__H__
6 #include <itkDataObject.h>
8 #include <cpPlugins/Interface/DataObject.h>
9 #include <cpPlugins/Interface/Parameters.h>
11 // Some forward declarations
12 class vtkRenderWindowInteractor;
13 #ifdef cpPlugins_Interface_QT4
17 #endif // cpPlugins_Interface_QT4
23 // Some forward declarations
24 #ifdef cpPlugins_Interface_QT4
25 class ParametersQtDialog;
27 typedef char ParametersQtDialog;
28 #endif // cpPlugins_Interface_QT4
32 class cpPlugins_Interface_EXPORT ProcessObject
36 typedef ProcessObject Self;
37 typedef Object Superclass;
38 typedef itk::SmartPointer< Self > Pointer;
39 typedef itk::SmartPointer< const Self > ConstPointer;
41 typedef Parameters TParameters;
42 typedef std::set< vtkRenderWindowInteractor* > TInteractors;
43 typedef bool DialogResult;
46 itkTypeMacro( ProcessObject, Object );
47 cpPlugins_Id_Macro( ProcessObject, BaseObject );
49 itkBooleanMacro( Interactive );
50 itkGetConstMacro( Interactive, bool );
51 itkSetMacro( Interactive, bool );
53 itkGetConstObjectMacro( Parameters, TParameters );
54 itkGetObjectMacro( Parameters, TParameters );
57 virtual std::set< std::string > GetInputsNames( ) const;
58 virtual std::set< std::string > GetOutputsNames( ) const;
59 unsigned int GetNumberOfInputs( ) const;
60 unsigned int GetNumberOfOutputs( ) const;
62 virtual bool SetInput( const std::string& id, DataObject* dobj );
64 virtual std::string Update( );
65 virtual void DisconnectOutputs( );
67 virtual const TInteractors& GetInteractors( ) const;
68 virtual void AddInteractor( vtkRenderWindowInteractor* interactor );
69 virtual bool ExecConfigurationDialog( QWidget* parent );
72 inline T* GetInput( const std::string& id );
75 inline const T* GetInput( const std::string& id ) const;
78 inline T* GetOutput( const std::string& id );
81 inline const T* GetOutput( const std::string& id ) const;
85 virtual ~ProcessObject( );
87 virtual void _AddInput( const std::string& name );
90 inline void _AddOutput( const std::string& id );
93 inline F* _CreateITK( );
96 inline F* _CreateVTK( );
98 virtual std::string _GenerateData( ) = 0;
101 // Purposely not implemented
102 ProcessObject( const Self& );
103 Self& operator=( const Self& );
106 Parameters::Pointer m_Parameters;
107 ParametersQtDialog* m_ParametersDialog;
109 TInteractors m_Interactors;
112 typedef std::map< std::string, DataObject::Pointer > _TDataContainer;
113 _TDataContainer m_Inputs;
114 _TDataContainer m_Outputs;
120 CPPLUGINS_PROVIDER_HEADER( ProcessObject );
126 #include <cpPlugins/Interface/ProcessObject.hxx>
128 #endif // __CPPLUGINS__INTERFACE__PROCESSOBJECT__H__