X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcpPlugins%2FInterface%2FObject.cxx;h=3e259169d517d949665405550f98c544c63aa32f;hb=1b600247da314fe62d007ca8a0ce24d0006931f4;hp=c0418d3ce1f69ae4a6bd92d907f779750fecf365;hpb=8c23766af88a29c3e830299dffc4b95d9fe61df9;p=cpPlugins.git diff --git a/lib/cpPlugins/Interface/Object.cxx b/lib/cpPlugins/Interface/Object.cxx index c0418d3..3e25916 100644 --- a/lib/cpPlugins/Interface/Object.cxx +++ b/lib/cpPlugins/Interface/Object.cxx @@ -1,25 +1,67 @@ #include +#include +#include + // ------------------------------------------------------------------------- -cpPlugins::Interface::Object:: -Object( ) +void cpPlugins::Interface::Object:: +Modified( ) const { + const itk::Object* i = this->GetITK< itk::Object >( ); + vtkObject* v = const_cast< vtkObject* >( this->GetVTK< vtkObject >( ) ); + if( i != NULL ) i->Modified( ); + if( v != NULL ) v->Modified( ); + this->Superclass::Modified( ); } // ------------------------------------------------------------------------- -cpPlugins::Interface::Object:: -~Object( ) +void cpPlugins::Interface::Object:: +SetViewCoords( float x, float y ) { + this->SetViewX( x ); + this->SetViewY( y ); } // ------------------------------------------------------------------------- -std::string cpPlugins::Interface::Object:: -GetClassName( ) const +void cpPlugins::Interface::Object:: +SetITK( itk::LightObject* o ) { - return( "cpPlugins::Interface::Object" ); + if( this->m_ITKObject.GetPointer( ) != o ) + { + this->m_ITKObject = o; + this->Modified( ); + + } // fi +} + +// ------------------------------------------------------------------------- +void cpPlugins::Interface::Object:: +SetVTK( vtkObjectBase* o ) +{ + if( this->m_VTKObject.GetPointer( ) != o ) + { + this->m_VTKObject = o; + this->Modified( ); + + } // fi } // ------------------------------------------------------------------------- -PLUMA_PROVIDER_SOURCE( cpPlugins::Interface::Object, 1, 1 ); +cpPlugins::Interface::Object:: +Object( ) + : Superclass( ), + m_ITKObject( NULL ), + m_VTKObject( NULL ), + m_Name( "" ), + m_ViewX( float( 0 ) ), + m_ViewY( float( 0 ) ) +{ +} + +// ------------------------------------------------------------------------- +cpPlugins::Interface::Object:: +~Object( ) +{ +} // eof - $RCSfile$