X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcpPlugins%2FInterface%2FParameters.h;h=56cb5fdc51719922754a33913b8ce5df630bb90a;hb=9c75dcecf566cc567583caf4687ce523a2af586d;hp=abde990d0759714b422a594c28fe9722c938abf8;hpb=e9143845b476fc8b86c1706fb140ebee770a650b;p=cpPlugins.git diff --git a/lib/cpPlugins/Interface/Parameters.h b/lib/cpPlugins/Interface/Parameters.h index abde990..56cb5fd 100644 --- a/lib/cpPlugins/Interface/Parameters.h +++ b/lib/cpPlugins/Interface/Parameters.h @@ -15,6 +15,9 @@ namespace cpPlugins { namespace Interface { + // Some forward declarations + class ProcessObject; + /** */ class cpPlugins_Interface_EXPORT Parameters @@ -28,12 +31,12 @@ namespace cpPlugins enum Type { - String , Bool , Int , - Uint , Real , Index , - Point , StringList , BoolList , - IntList , UintList , RealList , - IndexList , PointList , Choices , - NoType + String , Bool , Int , + Uint , Real , Index , + Point , Vector , StringList , + BoolList , IntList , UintList , + RealList , IndexList , PointList , + VectorList , Choices , NoType }; typedef bool TBool; @@ -52,6 +55,12 @@ namespace cpPlugins itkTypeMacro( cpPlugins::Interface::Parameters, itk::Object ); public: + // To impact pipeline + virtual ProcessObject* GetProcessObject( ); + virtual const ProcessObject* GetProcessObject( ) const; + virtual void SetProcessObject( ProcessObject* v ); + virtual void Modified( ) const; + // Parameters container configuration void Clear( ); @@ -69,6 +78,10 @@ namespace cpPlugins inline void ConfigureAsPoint( const TString& name, const TUint& dim, const P& v ); + template< class V > + inline void ConfigureAsVector( + const TString& name, const TUint& dim, const V& v + ); void ConfigureAsStringList( const TString& name ); void ConfigureAsBoolList( const TString& name ); @@ -77,6 +90,7 @@ namespace cpPlugins void ConfigureAsRealList( const TString& name ); void ConfigureAsIndexList( const TString& name ); void ConfigureAsPointList( const TString& name ); + void ConfigureAsVectorList( const TString& name ); void ConfigureAsChoices( const TString& name, const std::vector< TString >& choices ); @@ -92,6 +106,7 @@ namespace cpPlugins bool HasReal( const TString& name ) const; bool HasIndex( const TString& name ) const; bool HasPoint( const TString& name ) const; + bool HasVector( const TString& name ) const; bool HasStringList( const TString& name ) const; bool HasBoolList( const TString& name ) const; bool HasIntList( const TString& name ) const; @@ -99,6 +114,7 @@ namespace cpPlugins bool HasRealList( const TString& name ) const; bool HasIndexList( const TString& name ) const; bool HasPointList( const TString& name ) const; + bool HasVectorList( const TString& name ) const; bool HasChoices( const TString& name ) const; TString GetString( const TString& name ) const; @@ -132,6 +148,8 @@ namespace cpPlugins inline I GetIndex( const TString& name, const TUint& dim ) const; template< class P > inline P GetPoint( const TString& name, const TUint& dim ) const; + template< class V > + inline V GetVector( const TString& name, const TUint& dim ) const; template< class I > inline void GetIndexList( @@ -141,6 +159,10 @@ namespace cpPlugins inline void GetPointList( std::vector< P >& lst, const TString& name, const TUint& dim ) const; + template< class V > + inline void GetVectorList( + std::vector< V >& lst, const TString& name, const TUint& dim + ) const; // Set methods void SetString( const TString& name, const TString& v ); @@ -157,6 +179,10 @@ namespace cpPlugins inline void SetPoint( const TString& name, const TUint& dim, const P& v ); + template< class V > + inline void SetVector( + const TString& name, const TUint& dim, const V& v + ); void AddToStringList( const TString& name, const TString& v ); void AddToBoolList( const TString& name, const TBool& v ); @@ -172,6 +198,10 @@ namespace cpPlugins inline void AddToPointList( const TString& name, const TUint& dim, const P& v ); + template< class P > + inline void AddToVectorList( + const TString& name, const TUint& dim, const P& v + ); void ClearStringList( const TString& name ); void ClearBoolList( const TString& name ); @@ -180,6 +210,7 @@ namespace cpPlugins void ClearRealList( const TString& name ); void ClearIndexList( const TString& name ); void ClearPointList( const TString& name ); + void ClearVectorList( const TString& name ); bool SetSelectedChoice( const TString& name, const TString& choice ); @@ -195,6 +226,7 @@ namespace cpPlugins protected: TParameters m_Parameters; + ProcessObject* m_Process; }; } // ecapseman