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;
26 class SimpleMPRWidget;
28 typedef char ParametersQtDialog;
29 typedef char SimpleMPRWidget;
30 #endif // cpPlugins_Interface_QT4
34 class cpPlugins_Interface_EXPORT ProcessObject
38 typedef ProcessObject Self;
39 typedef Object Superclass;
40 typedef itk::SmartPointer< Self > Pointer;
41 typedef itk::SmartPointer< const Self > ConstPointer;
43 typedef Parameters TParameters;
44 typedef std::set< vtkRenderWindowInteractor* > TInteractors;
45 typedef bool DialogResult;
48 itkTypeMacro( ProcessObject, Object );
49 cpPlugins_Id_Macro( ProcessObject, BaseObject );
51 itkBooleanMacro( Interactive );
52 itkGetConstMacro( Interactive, bool );
53 itkSetMacro( Interactive, bool );
55 itkGetConstObjectMacro( Parameters, TParameters );
56 itkGetObjectMacro( Parameters, TParameters );
59 virtual std::set< std::string > GetInputsNames( ) const;
60 virtual std::set< std::string > GetOutputsNames( ) const;
61 unsigned int GetNumberOfInputs( ) const;
62 unsigned int GetNumberOfOutputs( ) const;
64 virtual bool SetInput( const std::string& id, DataObject* dobj );
66 virtual std::string Update( );
67 virtual void DisconnectOutputs( );
70 vtkRenderWindowInteractor* GetSingleInteractor( );
71 const vtkRenderWindowInteractor* GetSingleInteractor( ) const;
72 void SetSingleInteractor( vtkRenderWindowInteractor* interactor );
73 SimpleMPRWidget* GetMPRViewer( );
74 const SimpleMPRWidget* GetMPRViewer( ) const;
75 void SetMPRViewer( SimpleMPRWidget* wdg );
76 virtual bool ExecConfigurationDialog( QWidget* parent );
79 inline T* GetInput( const std::string& id );
82 inline const T* GetInput( const std::string& id ) const;
85 inline T* GetOutput( const std::string& id );
88 inline const T* GetOutput( const std::string& id ) const;
92 virtual ~ProcessObject( );
94 virtual void _AddInput( const std::string& name );
97 inline void _AddOutput( const std::string& id );
100 inline F* _CreateITK( );
103 inline F* _CreateVTK( );
105 virtual std::string _GenerateData( ) = 0;
108 // Purposely not implemented
109 ProcessObject( const Self& );
110 Self& operator=( const Self& );
113 Parameters::Pointer m_Parameters;
114 ParametersQtDialog* m_ParametersDialog;
116 vtkSmartPointer< vtkRenderWindowInteractor > m_SingleInteractor;
117 SimpleMPRWidget* m_MPRViewer;
120 typedef std::map< std::string, DataObject::Pointer > _TDataContainer;
121 _TDataContainer m_Inputs;
122 _TDataContainer m_Outputs;
128 CPPLUGINS_PROVIDER_HEADER( ProcessObject );
134 #include <cpPlugins/Interface/ProcessObject.hxx>
136 #endif // __CPPLUGINS__INTERFACE__PROCESSOBJECT__H__