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;
37 itkTypeMacro( ProcessObject, Object );
39 cpPlugins::Interface::ProcessObject, "BaseObject"
43 virtual const Parameters& GetDefaultParameters( ) const;
44 virtual void SetParameters( const Parameters& params );
46 virtual unsigned int GetNumberOfInputs( ) const;
47 virtual unsigned int GetNumberOfOutputs( ) const;
49 virtual void SetNumberOfInputs( unsigned int n );
50 virtual void SetNumberOfOutputs( unsigned int n );
52 virtual void SetInput( unsigned int idx, DataObject* dobj );
54 virtual std::string Update( );
55 virtual void DisconnectOutputs( );
57 virtual bool ExecConfigurationDialog( QWidget* parent );
63 inline const T* GetITK( ) const;
69 inline const T* GetVTK( ) const;
72 inline T* GetInput( unsigned int idx );
75 inline const T* GetInput( unsigned int idx ) const;
78 inline T* GetOutput( unsigned int idx );
81 inline const T* GetOutput( unsigned int idx ) const;
85 virtual ~ProcessObject( );
88 inline F* _CreateITK( );
91 inline F* _CreateVTK( );
94 inline void _MakeOutput( unsigned int idx );
96 virtual std::string _GenerateData( ) = 0;
99 // Purposely not implemented
100 ProcessObject( const Self& );
101 Self& operator=( const Self& );
104 itk::ProcessObject::Pointer m_ITKObject;
105 vtkSmartPointer< vtkAlgorithm > m_VTKObject;
107 Parameters m_DefaultParameters;
108 Parameters m_Parameters;
110 std::vector< DataObject::Pointer > m_Inputs;
111 std::vector< DataObject::Pointer > m_Outputs;
118 #include <cpPlugins/Interface/ProcessObject.hxx>
120 #endif // __CPPLUGINS__INTERFACE__PROCESSOBJECT__H__