1 #ifndef __CPPLUGINS__INTERFACE__PROCESSOBJECT__H__
2 #define __CPPLUGINS__INTERFACE__PROCESSOBJECT__H__
4 #include <cpPlugins/Interface/cpPlugins_Interface_Export.h>
5 #include <cpPlugins/Interface/Config.h>
6 #include <cpPlugins/Interface/Object.h>
7 #include <cpPlugins/Interface/DataObject.h>
8 #include <cpPlugins/Interface/Parameters.h>
10 #ifdef cpPlugins_Interface_QT4
14 #endif // cpPlugins_Interface_QT4
16 #include <itkProcessObject.h>
18 #include <vtkSmartPointer.h>
19 #include <vtkAlgorithm.h>
27 class cpPlugins_Interface_EXPORT ProcessObject
31 typedef ProcessObject Self;
32 typedef Object Superclass;
33 typedef itk::SmartPointer< Self > Pointer;
34 typedef itk::SmartPointer< const Self > ConstPointer;
36 typedef Parameters TParameters;
39 itkTypeMacro( ProcessObject, Object );
41 cpPlugins::Interface::ProcessObject, "BaseObject"
45 virtual TParameters* GetParameters( );
46 virtual const TParameters* GetParameters( ) const;
48 virtual unsigned int GetNumberOfInputs( ) const;
49 virtual unsigned int GetNumberOfOutputs( ) const;
51 virtual void SetNumberOfInputs( unsigned int n );
52 virtual void SetNumberOfOutputs( unsigned int n );
54 virtual void SetInput( unsigned int idx, DataObject* dobj );
56 virtual std::string Update( );
57 virtual void DisconnectOutputs( );
59 virtual bool ExecConfigurationDialog( QWidget* parent );
65 inline const T* GetITK( ) const;
71 inline const T* GetVTK( ) const;
74 inline T* GetInput( unsigned int idx );
77 inline const T* GetInput( unsigned int idx ) const;
80 inline T* GetOutput( unsigned int idx );
83 inline const T* GetOutput( unsigned int idx ) const;
87 virtual ~ProcessObject( );
90 inline F* _CreateITK( );
93 inline F* _CreateVTK( );
96 inline void _MakeOutput( unsigned int idx );
98 virtual std::string _GenerateData( ) = 0;
101 // Purposely not implemented
102 ProcessObject( const Self& );
103 Self& operator=( const Self& );
106 itk::ProcessObject::Pointer m_ITKObject;
107 vtkSmartPointer< vtkAlgorithm > m_VTKObject;
109 Parameters::Pointer m_Parameters;
111 std::vector< DataObject::Pointer > m_Inputs;
112 std::vector< DataObject::Pointer > m_Outputs;
119 #include <cpPlugins/Interface/ProcessObject.hxx>
121 #endif // __CPPLUGINS__INTERFACE__PROCESSOBJECT__H__