#ifdef cpPlugins_Interface_QT4
#include <QApplication>
#include <cpPlugins/Interface/ParametersQtDialog.h>
+#include <cpPlugins/Interface/SimpleMPRWidget.h>
#endif // cpPlugins_Interface_QT4
#include <vtkRenderWindowInteractor.h>
// -------------------------------------------------------------------------
bool cpPlugins::Interface::ProcessObject::
-SetInput( const std::string& id, cpPlugins::Interface::DataObject* dobj )
+SetInput(
+ const std::string& id, cpPlugins::Interface::DataObject::Pointer* dobj
+ )
{
_TDataContainer::iterator i = this->m_Inputs.find( id );
if( i != this->m_Inputs.end( ) )
_TDataContainer::iterator i = this->m_Inputs.begin( );
for( ; i != this->m_Inputs.end( ) && r == ""; ++i )
{
- if( i->second.IsNotNull( ) )
+ if( i->second->IsNotNull( ) )
{
- Self* src = dynamic_cast< Self* >( i->second->GetSource( ) );
+ Self* src = dynamic_cast< Self* >( ( *( i->second ) )->GetSource( ) );
if( src != NULL )
r = src->Update( );
}
{
_TDataContainer::iterator i = this->m_Outputs.begin( );
for( ; i != this->m_Outputs.end( ); ++i )
- if( i->second.IsNotNull( ) )
- i->second->DisconnectPipeline( );
+ if( i->second->IsNotNull( ) )
+ ( *( i->second ) )->DisconnectPipeline( );
}
// -------------------------------------------------------------------------
-const cpPlugins::Interface::ProcessObject::
-TInteractors& cpPlugins::Interface::ProcessObject::
-GetInteractors( ) const
+vtkRenderWindowInteractor* cpPlugins::Interface::ProcessObject::
+GetSingleInteractor( )
{
- return( this->m_Interactors );
+ return( this->m_SingleInteractor );
+}
+
+// -------------------------------------------------------------------------
+const vtkRenderWindowInteractor* cpPlugins::Interface::ProcessObject::
+GetSingleInteractor( ) const
+{
+ return( this->m_SingleInteractor );
}
// -------------------------------------------------------------------------
void cpPlugins::Interface::ProcessObject::
-AddInteractor( vtkRenderWindowInteractor* interactor )
+SetSingleInteractor( vtkRenderWindowInteractor* interactor )
{
- this->m_Interactors.insert( interactor );
-#ifdef cpPlugins_Interface_QT4
- this->m_ParametersDialog->addInteractor( interactor );
-#endif // cpPlugins_Interface_QT4
+ this->m_SingleInteractor = interactor;
+}
+
+// -------------------------------------------------------------------------
+cpPlugins::Interface::
+SimpleMPRWidget* cpPlugins::Interface::ProcessObject::
+GetMPRViewer( )
+{
+ return( this->m_MPRViewer );
+}
+
+// -------------------------------------------------------------------------
+const cpPlugins::Interface::
+SimpleMPRWidget* cpPlugins::Interface::ProcessObject::
+GetMPRViewer( ) const
+{
+ return( this->m_MPRViewer );
+}
+
+// -------------------------------------------------------------------------
+void cpPlugins::Interface::ProcessObject::
+SetMPRViewer( cpPlugins::Interface::SimpleMPRWidget* wdg )
+{
+ this->m_MPRViewer = wdg;
}
// -------------------------------------------------------------------------
cpPlugins::Interface::ProcessObject::
ProcessObject( )
: Superclass( ),
- m_ParametersDialog( NULL )
+ m_ParametersDialog( NULL ),
+ m_MPRViewer( NULL )
{
this->m_Parameters = TParameters::New( );
this->m_Parameters->SetProcessObject( this );
if( this->m_ParametersDialog != NULL )
delete this->m_ParametersDialog;
#endif // cpPlugins_Interface_QT4
+
+ /*
+ auto iIt = this->m_Inputs.begin( );
+ for( ; iIt != this->m_Inputs.end( ); ++iIt )
+ delete iIt->second;
+ this->m_Inputs.clear( );
+ */
+
+ auto oIt = this->m_Outputs.begin( );
+ for( ; oIt != this->m_Outputs.end( ); ++oIt )
+ delete oIt->second;
+ this->m_Outputs.clear( );
}
// -------------------------------------------------------------------------
void cpPlugins::Interface::ProcessObject::
_AddInput( const std::string& name )
{
- this->m_Inputs[ name ] = NULL;
- this->Modified( );
-}
+ auto i = this->m_Inputs.find( name );
+ if( i == this->m_Inputs.end( ) )
+ {
+ this->m_Inputs[ name ] = NULL;
+ this->Modified( );
-// -------------------------------------------------------------------------
-CPPLUGINS_PROVIDER_SOURCE( cpPlugins::Interface::ProcessObject, 1, 1 );
+ } // fi
+}
// eof - $RCSfile$