#include <cpPlugins/DataObject.h>
#include <cpPlugins/ProcessObject.h>
+#include <cpPlugins/DataObjectVisualizationQtDialog.h>
#include <itkDataObject.h>
#include <vtkImageData.h>
#include <vtkPolyData.h>
+#include <vtkRenderWindow.h>
// -------------------------------------------------------------------------
cpPlugins::ProcessObject* cpPlugins::DataObject::
this->Modified( );
}
+// -------------------------------------------------------------------------
+cpPlugins::DataObjectVisualizationQtDialog* cpPlugins::DataObject::
+CreateQtDialog( )
+{
+#ifdef cpPlugins_QT4
+ DataObjectVisualizationQtDialog* dlg = NULL;
+ if( QApplication::instance( ) != NULL )
+ {
+ dlg = new DataObjectVisualizationQtDialog( );
+ dlg->setDataObject( this );
+
+ } // fi
+ return( dlg );
+#else // cpPlugins_QT4
+ return( NULL );
+#endif // cpPlugins_QT4
+}
+
+// -------------------------------------------------------------------------
+void cpPlugins::DataObject::
+AddVTKActor( vtkProp* actor, vtkRenderer* renderer )
+{
+ if( actor != NULL && renderer != NULL )
+ {
+ TDataView v;
+ v.Actor = actor;
+ v.Renderer = renderer;
+ this->m_Actors.insert( v );
+ this->Modified( );
+
+ } // fi
+}
+
+// -------------------------------------------------------------------------
+void cpPlugins::DataObject::
+ClearVTKActors( )
+{
+ this->m_Actors.clear( );
+ this->Modified( );
+}
+
+// -------------------------------------------------------------------------
+void cpPlugins::DataObject::
+RenderVTKActors( )
+{
+ for( auto i = this->m_Actors.begin( ); i != this->m_Actors.end( ); ++i )
+ i->Renderer->GetRenderWindow( )->Render( );
+}
+
+// -------------------------------------------------------------------------
+cpPlugins::DataObject::TDataViews::
+iterator cpPlugins::DataObject::
+BeginVTKActors( )
+{
+ return( this->m_Actors.begin( ) );
+}
+
+// -------------------------------------------------------------------------
+cpPlugins::DataObject::TDataViews::
+iterator cpPlugins::DataObject::
+EndVTKActors( )
+{
+ return( this->m_Actors.end( ) );
+}
+
+// -------------------------------------------------------------------------
+cpPlugins::DataObject::TDataViews::
+const_iterator cpPlugins::DataObject::
+BeginVTKActors( ) const
+{
+ return( this->m_Actors.begin( ) );
+}
+
+// -------------------------------------------------------------------------
+cpPlugins::DataObject::TDataViews::
+const_iterator cpPlugins::DataObject::
+EndVTKActors( ) const
+{
+ return( this->m_Actors.end( ) );
+}
+
// -------------------------------------------------------------------------
cpPlugins::DataObject::
DataObject( )