1 #include "PipelineEditor.h"
2 #include "ui_PipelineEditor.h"
9 #include <cpPlugins/Image.h>
10 #include <cpPipelineEditor/Editor.h>
12 #include <vtkImageData.h>
13 #include <vtkPolyData.h>
14 #include <vtkRenderWindowInteractor.h>
16 // -------------------------------------------------------------------------
18 PipelineEditor( int argc, char* argv[], QApplication* app, QWidget* parent )
19 : Superclass( argc, argv, app, parent ),
20 m_UI( new Ui::PipelineEditor )
22 // Load environment configuration
23 char* p = std::getenv( cpPlugins_PATHS );
26 sp = std::string( p ) + std::string( cpPlugins_SEPARATOR );
27 QFileInfo info( argv[ 0 ] );
29 sp += info.canonicalPath( ).toStdString( );
30 setenv( cpPlugins_PATHS, sp.c_str( ), 0 );
32 // Basic configuration
33 this->m_UI->setupUi( this );
35 this->m_UI->LoadedPlugins,
37 this->m_UI->Canvas->editor( )
40 // Connect actions to slots
42 this->m_UI->ActionBackgroundMPR, SIGNAL( triggered( ) ),
43 this, SLOT( _ActionBackgroundMPR( ) )
46 this->m_UI->ActionBackground3D, SIGNAL( triggered( ) ),
47 this, SLOT( _ActionBackground3D( ) )
50 this->m_UI->ButtonLoadPluginsFile, SIGNAL( clicked( ) ),
51 this, SLOT( _InteractiveLoadPlugins( ) )
54 this->m_UI->ButtonLoadPluginsPath, SIGNAL( clicked( ) ),
55 this, SLOT( _InteractiveLoadPluginsFromPath( ) )
58 this->m_UI->ActionOpenWorkspace, SIGNAL( triggered( ) ),
59 this, SLOT( _InteractiveLoadWorkspace( ) )
62 this->m_UI->ActionSaveWorkspace, SIGNAL( triggered( ) ),
63 this, SLOT( _InteractiveSaveWorkspace( ) )
66 this->m_UI->Canvas->editor( ),
67 SIGNAL( execFilter( const std::string& ) ),
69 SLOT( _ExecFilter( const std::string& ) )
72 this->m_UI->Canvas->editor( ),
73 SIGNAL( showFilterOutput( const std::string&, const std::string& ) ),
75 SLOT( _ShowFilterOutput( const std::string&, const std::string& ) )
78 this->m_UI->Canvas->editor( ),
79 SIGNAL( hideFilterOutput( const std::string&, const std::string& ) ),
81 SLOT( _HideFilterOutput( const std::string&, const std::string& ) )
84 this->m_UI->Canvas->editor( ),
85 SIGNAL( visualPropertiesFilterOutput( const std::string&, const std::string& ) ),
87 SLOT( _PropertiesFilterOutput( const std::string&, const std::string& ) )
91 // -------------------------------------------------------------------------
98 // -------------------------------------------------------------------------
100 _ActionBackgroundMPR( )
102 this->_BackgroundProperties( 4 );
105 // -------------------------------------------------------------------------
106 void PipelineEditor::
107 _ActionBackground3D( )
109 this->_BackgroundProperties( 3 );
112 // -------------------------------------------------------------------------
113 void PipelineEditor::
115 const std::string& filter_name, const std::string& output_name
118 this->_ExecFilter( filter_name );
119 this->_ShowData( filter_name, output_name );
122 // -------------------------------------------------------------------------
123 void PipelineEditor::
125 const std::string& filter_name, const std::string& output_name
128 this->_HideData( filter_name, output_name );
131 // -------------------------------------------------------------------------
132 void PipelineEditor::
133 _PropertiesFilterOutput(
134 const std::string& filter_name, const std::string& output_name
137 this->_DataProperties( filter_name, output_name );