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 );
40 virtual const Parameters& GetDefaultParameters( ) const;
41 virtual void SetParameters( const Parameters& params );
43 virtual unsigned int GetNumberOfInputs( ) const;
44 virtual unsigned int GetNumberOfOutputs( ) const;
46 virtual void SetNumberOfInputs( unsigned int n );
47 virtual void SetNumberOfOutputs( unsigned int n );
49 virtual void SetInput( unsigned int idx, DataObject* dobj );
51 virtual std::string Update( );
52 virtual void DisconnectOutputs( );
54 virtual bool ExecConfigurationDialog( QWidget* parent );
60 inline const T* GetITK( ) const;
66 inline const T* GetVTK( ) const;
69 inline T* GetInput( unsigned int idx );
72 inline const T* GetInput( unsigned int idx ) const;
75 inline T* GetOutput( unsigned int idx );
78 inline const T* GetOutput( unsigned int idx ) const;
82 virtual ~ProcessObject( );
85 inline F* _CreateITK( );
88 inline F* _CreateVTK( );
91 inline void _MakeOutput( unsigned int idx );
93 virtual std::string _GenerateData( ) = 0;
96 // Purposely not implemented
97 ProcessObject( const Self& );
98 Self& operator=( const Self& );
101 itk::ProcessObject::Pointer m_ITKObject;
102 vtkSmartPointer< vtkAlgorithm > m_VTKObject;
104 Parameters m_DefaultParameters;
105 Parameters m_Parameters;
107 std::vector< DataObject::Pointer > m_Inputs;
108 std::vector< DataObject::Pointer > m_Outputs;
115 #include <cpPlugins/Interface/ProcessObject.hxx>
117 #endif // __CPPLUGINS__INTERFACE__PROCESSOBJECT__H__