X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcpPlugins%2FPipeline%2FProcessObject.h;fp=lib%2FcpPlugins%2FPipeline%2FProcessObject.h;h=0000000000000000000000000000000000000000;hb=2e142df11d6f312a2a2b5097b8da73571ed523e8;hp=c2ce34ca52f74a7193b62d05603322def895de50;hpb=61b3659afe961ed248f30e26f9ca8f28fcfafddc;p=cpPlugins.git diff --git a/lib/cpPlugins/Pipeline/ProcessObject.h b/lib/cpPlugins/Pipeline/ProcessObject.h deleted file mode 100644 index c2ce34c..0000000 --- a/lib/cpPlugins/Pipeline/ProcessObject.h +++ /dev/null @@ -1,168 +0,0 @@ -#ifndef __cpPlugins__Pipeline__ProcessObject__h__ -#define __cpPlugins__Pipeline__ProcessObject__h__ - -#include -#include -#include -#include - -// ------------------------------------------------------------------------- -class QDialog; -class vtkRenderWindowInteractor; - -// ------------------------------------------------------------------------- -namespace cpPlugins -{ - namespace Pipeline - { - /** - */ - class cpPlugins_EXPORT ProcessObject - : public Object - { - public: - typedef ProcessObject Self; - typedef Object Superclass; - typedef itk::SmartPointer< Self > Pointer; - typedef itk::SmartPointer< const Self > ConstPointer; - - public: - itkTypeMacro( ProcessObject, Object ); - cpPlugins_Id_Macro( ProcessObject, Object ); - - itkBooleanMacro( ExplicitExecution ); - - itkGetStringMacro( Name ); - itkGetStringMacro( PluginName ); - itkGetConstMacro( ExplicitExecution, bool ); - itkGetConstMacro( LastExecutionSpan, long ); - - itkSetStringMacro( Name ); - itkSetStringMacro( PluginName ); - itkSetMacro( ExplicitExecution, bool ); - - public: - void PrintExecutionOn( ); - void PrintExecutionOff( ); - bool GetPrintExecution( ) const; - void SetPrintExecution( bool v ); - void SetPrintExecutionStream( std::ofstream* s ); - - Parameters* GetParameters( ); - const Parameters* GetParameters( ) const; - - virtual void SetITK( itk::LightObject* o ) override; - virtual void SetVTK( vtkObjectBase* o ) override; - - // "Getters" - std::set< std::string > GetInputsNames( ) const; - std::set< std::string > GetOutputsNames( ) const; - bool HasInput( const std::string& n ) const; - bool HasOutput( const std::string& n ) const; - - unsigned int GetNumberOfInputs( ) const; - unsigned int GetNumberOfOutputs( ) const; - unsigned int GetInputSize( const std::string& n ) const; - bool IsInputMultiple( const std::string& n ) const; - - template< class _TType = DataObject > - inline _TType* GetInput( const std::string& n, unsigned int i = 0 ); - - template< class _TType = DataObject > - inline const _TType* GetInput( - const std::string& n, unsigned int i = 0 - ) const; - - template< class _TType = itk::LightObject > - inline _TType* GetInputData( const std::string& n, unsigned int i = 0 ); - - template< class _TType = itk::LightObject > - inline const _TType* GetInputData( - const std::string& n, unsigned int i = 0 - ) const; - - template< class _TType = DataObject > - inline _TType* GetOutput( const std::string& n ); - - template< class _TType = DataObject > - inline const _TType* GetOutput( const std::string& n ) const; - - template< class _TType = itk::LightObject > - inline _TType* GetOutputData( const std::string& n ); - - template< class _TType = itk::LightObject > - inline const _TType* GetOutputData( const std::string& n ) const; - - // "Setters" - virtual void AddInput( const std::string& n, DataObject* o ); - virtual void SetInput( const std::string& n, DataObject* o ); - - // Other interesting methods - void DisconnectInput( const std::string& n, unsigned int id ); - void DisconnectInputs( ); - void DisconnectOutputs( ); - void Disconnect( ); - - // Pipeline execution - virtual void Modified( ) const override; - virtual void Update( ); - - // Qt dialog creation - virtual QDialog* CreateQDialog( ); - virtual void AddInteractor( vtkRenderWindowInteractor* i ); - virtual bool IsInteractive( ); - - protected: - ProcessObject( ); - virtual ~ProcessObject( ); - - // Error handling method - void _Error( const std::string& error ); - - // For configuration purposes - template< class _TType = DataObject > - inline void _ConfigureInput( - const std::string& name, bool required, bool multiple - ); - - template< class _TType = DataObject > - inline void _ConfigureOutput( const std::string& name ); - - template< class _TFilter > - inline _TFilter* _CreateITK( ); - - template< class _TFilter > - inline _TFilter* _CreateVTK( ); - - virtual void _GenerateData( ) = 0; - - private: - // Purposely not implemented - ProcessObject( const Self& ); - Self& operator=( const Self& ); - - protected: - Parameters m_Parameters; - std::string m_Name; - std::string m_PluginName; - bool m_ExplicitExecution; - - std::map< std::string, Port* > m_Inputs; - std::map< std::string, Port* > m_Outputs; - - itk::ModifiedTimeType m_LastExecutionTime; - mutable long m_LastExecutionSpan; - - bool m_PrintExecution; - std::ostream* m_PrintExecutionStream; - }; - - } // ecapseman - -} // ecapseman - -#include - -#endif // __cpPlugins__Pipeline__ProcessObject__h__ - -// eof - $RCSfile$