]> Creatis software - cpPlugins.git/blobdiff - lib/cpPlugins/BaseObjects/DataObject.cxx
Cast image filter added. ROI filter modified.
[cpPlugins.git] / lib / cpPlugins / BaseObjects / DataObject.cxx
index 2b53a32de3fdc4c1cfb58e4f10c313d140a89aa0..fde94b54c1e099687491164a25dff5a8a9778d46 100644 (file)
@@ -51,7 +51,6 @@ DisconnectFromPipeline( )
 
   // Disconnect input pipelines (VTK)
   bool      ok = this->_DisconnectVTK< vtkImageData >( );
-  if( !ok ) ok = this->_DisconnectVTK< vtkUnstructuredGrid >( );
   if( !ok ) ok = this->_DisconnectVTK< vtkPolyData >( );
 
   // Unbind source
@@ -78,7 +77,7 @@ template< class _TType >
 bool cpPlugins::BaseObjects::DataObject::
 _DisconnectVTK( )
 {
-  _TType* v = this->GetVTK< _TType >( );
+  _TType* v = dynamic_cast< _TType* >( this->m_VTK.GetPointer( ) );
   if( v != NULL )
   {
     vtkSmartPointer< _TType > d = vtkSmartPointer< _TType >::New( );