#include <cpPlugins/Interface/DataObject.h>
+#include <cpPlugins/Interface/ProcessObject.h>
#include <itkDataObject.h>
#include <vtkImageData.h>
#include <vtkPolyData.h>
// -------------------------------------------------------------------------
-cpPlugins::Interface::Object* cpPlugins::Interface::DataObject::
+cpPlugins::Interface::ProcessObject* cpPlugins::Interface::DataObject::
GetSource( )
{
- return( this->m_Source );
+ auto ptr = reinterpret_cast< ProcessObject::Pointer* >( this->m_Source );
+ return( ptr->GetPointer( ) );
}
// -------------------------------------------------------------------------
-const cpPlugins::Interface::Object* cpPlugins::Interface::DataObject::
+const cpPlugins::Interface::ProcessObject* cpPlugins::Interface::DataObject::
GetSource( ) const
{
- return( this->m_Source );
+ auto ptr = reinterpret_cast< ProcessObject::Pointer* >( this->m_Source );
+ return( ptr->GetPointer( ) );
}
// -------------------------------------------------------------------------
void cpPlugins::Interface::DataObject::
-SetSource( cpPlugins::Interface::Object* src )
+SetSource( cpPlugins::Interface::ProcessObject* src )
{
- if( this->m_Source.GetPointer( ) != src )
+ auto ptr = reinterpret_cast< ProcessObject::Pointer* >( this->m_Source );
+ if( ptr->GetPointer( ) != src )
{
- this->m_Source = src;
+ *ptr = src;
this->Modified( );
} // fi
// -------------------------------------------------------------------------
void cpPlugins::Interface::DataObject::
-DisconnectPipeline( )
+DisconnectFromPipeline( )
{
// Disconnect input pipelines (ITK)
itk::DataObject* itk_obj = this->GetITK< itk::DataObject >( );
} // fi
// Unbind source
- this->m_Source = NULL;
+ auto ptr = reinterpret_cast< ProcessObject::Pointer* >( this->m_Source );
+ *ptr = NULL;
+ this->Modified( );
}
// -------------------------------------------------------------------------
cpPlugins::Interface::DataObject::
DataObject( )
- : Superclass( ),
- m_ITKObject( NULL ),
- m_VTKObject( NULL ),
- m_Source( NULL )
+ : Superclass( )
{
+ this->m_Source = new ProcessObject::Pointer( );
}
// -------------------------------------------------------------------------
cpPlugins::Interface::DataObject::
~DataObject( )
{
+ /* TODO
+ auto ptr = reinterpret_cast< ProcessObject::Pointer* >( this->m_Source );
+ delete ptr;
+ */
}
// eof - $RCSfile$