X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcpPlugins%2FInterface%2FProcessObject.cxx;h=72897d6729a615ca3368a85a62c434297e8063cf;hb=6ffc11d77924d6ab7e94db95d41105982ac73e00;hp=809ef35c5dd91584beb59021dda536ea047ed088;hpb=bf4172934768034696b1c4b993b7e92e3808e083;p=cpPlugins.git diff --git a/lib/cpPlugins/Interface/ProcessObject.cxx b/lib/cpPlugins/Interface/ProcessObject.cxx index 809ef35..72897d6 100644 --- a/lib/cpPlugins/Interface/ProcessObject.cxx +++ b/lib/cpPlugins/Interface/ProcessObject.cxx @@ -7,6 +7,20 @@ #include #endif // cpPlugins_Interface_QT4 +// ------------------------------------------------------------------------- +void cpPlugins::Interface::ProcessObject:: +SetITK( itk::LightObject* o ) +{ + // Polymorphism: do nothing -> this is a filter!!! +} + +// ------------------------------------------------------------------------- +void cpPlugins::Interface::ProcessObject:: +SetVTK( vtkObjectBase* o ) +{ + // Polymorphism: do nothing -> this is a filter!!! +} + // ------------------------------------------------------------------------- std::set< std::string > cpPlugins::Interface::ProcessObject:: GetInputsNames( ) const @@ -138,7 +152,14 @@ Update( ) bool need_to_update = false; for( ; i != this->m_Inputs.end( ) && r == ""; ++i ) { - if( i->second.IsValid( ) ) + bool iv = i->second.IsValid( ); + bool ir = i->second.IsRequired( ); + if( !iv && ir ) + r = + "ProcessObject: Required input \"" + + i->first + "@" + this->GetClassName( ) + + "\" is not valid (=NULL)."; + if( iv && r == "" ) { Self* src = dynamic_cast< Self* >( i->second->GetSource( ) ); if( src != NULL )