X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcpPlugins%2FPipeline%2FDataObject.cxx;fp=lib%2FcpPlugins%2FPipeline%2FDataObject.cxx;h=0000000000000000000000000000000000000000;hb=2e142df11d6f312a2a2b5097b8da73571ed523e8;hp=7afa1c77dedf003b06c074b3a7a991ccd6afd510;hpb=61b3659afe961ed248f30e26f9ca8f28fcfafddc;p=cpPlugins.git diff --git a/lib/cpPlugins/Pipeline/DataObject.cxx b/lib/cpPlugins/Pipeline/DataObject.cxx deleted file mode 100644 index 7afa1c7..0000000 --- a/lib/cpPlugins/Pipeline/DataObject.cxx +++ /dev/null @@ -1,92 +0,0 @@ -#include - -#include -#include -#include -#include - -// ------------------------------------------------------------------------- -bool cpPlugins::Pipeline::DataObject:: -IsCompatible( const Self* other ) const -{ - return( true ); -} - -// ------------------------------------------------------------------------- -cpPlugins::Pipeline::ProcessObject* -cpPlugins::Pipeline::DataObject:: -GetSource( ) -{ - return( this->m_Source ); -} - -// ------------------------------------------------------------------------- -const cpPlugins::Pipeline::ProcessObject* -cpPlugins::Pipeline::DataObject:: -GetSource( ) const -{ - return( this->m_Source ); -} - -// ------------------------------------------------------------------------- -void cpPlugins::Pipeline::DataObject:: -SetSource( cpPlugins::Pipeline::ProcessObject* src ) -{ - if( this->m_Source != src ) - { - this->m_Source = src; - this->Modified( ); - - } // fi -} - -// ------------------------------------------------------------------------- -void cpPlugins::Pipeline::DataObject:: -DisconnectFromPipeline( ) -{ - // Disconnect input pipelines (ITK) - itk::DataObject::Pointer itk_obj = this->GetITK< itk::DataObject >( ); - if( itk_obj.IsNotNull( ) ) - itk_obj->DisconnectPipeline( ); - - // Disconnect input pipelines (VTK) - bool ok = this->_DisconnectVTK< vtkImageData >( ); - if( !ok ) ok = this->_DisconnectVTK< vtkPolyData >( ); - - // Unbind source - this->m_Source = NULL; - this->Modified( ); -} - -// ------------------------------------------------------------------------- -cpPlugins::Pipeline::DataObject:: -DataObject( ) - : Superclass( ), - m_Source( NULL ) -{ -} - -// ------------------------------------------------------------------------- -cpPlugins::Pipeline::DataObject:: -~DataObject( ) -{ -} - -// ------------------------------------------------------------------------- -template< class _TType > -bool cpPlugins::Pipeline::DataObject:: -_DisconnectVTK( ) -{ - _TType* v = dynamic_cast< _TType* >( this->m_VTK.GetPointer( ) ); - if( v != NULL ) - { - vtkSmartPointer< _TType > d = vtkSmartPointer< _TType >::New( ); - d->ShallowCopy( v ); - this->m_VTK = d; - return( true ); - } - else - return( false ); -} - -// eof - $RCSfile$