#ifdef cpPlugins_Interface_QT4
+#include <map>
#include <set>
#include <string>
-#include <vector>
#include <QApplication>
#include <QMenu>
typedef cpPlugins::Interface::Image TImage;
typedef cpPlugins::Interface::Mesh TMesh;
- typedef std::vector< TImage::Pointer > TImages;
- typedef std::vector< TMesh::Pointer > TMeshes;
- typedef std::set< std::string > TOrderedStringContainer;
+ typedef cpExtensions::Visualization::MPRObjects TMPRObjects;
+ typedef TMPRObjects::TCursorCommand TCursorCommand;
+ typedef TMPRObjects::TMouseCommand TMouseCommand;
+ typedef TMPRObjects::TMouseWheelCommand TMouseWheelCommand;
+ typedef TMPRObjects::TKeyCommand TKeyCommand;
+
+ typedef std::map< std::string, TImage::Pointer > TImages;
+ typedef std::map< std::string, TMesh::Pointer > TMeshes;
+ typedef std::set< std::string > TOrderedStringContainer;
typedef std::map< std::string, std::set< std::string > > TFilters;
public:
explicit BaseMPRWindow( QWidget* parent = 0 );
virtual ~BaseMPRWindow( );
+ void AddCursorCommand( TCursorCommand command, void* data )
+ {
+ this->m_MPRObjects->AddCursorCommand( command, data );
+ }
+
void DialogLoadPlugins( );
void AssociatePluginsToMenu(
QMenu* menu, QObject* obj, const char* slot
bool LoadPlugins( const std::string& fname );
void LoadPlugins( );
- bool LoadImage( );
- bool LoadMesh( );
+ std::string LoadImage( );
+ std::string LoadMesh( );
void ExecuteFilter(
const std::string& name,
- int input_id, int output_id = -1
+ const std::string& input_id,
+ const std::string& output_id
);
+ TProcessObject::Pointer CreateFilter( const std::string& name )
+ {
+ return( this->m_Interface.CreateProcessObject( name ) );
+ }
+
+ void AddImage( const std::string& name, TImage* image );
+ TImage* GetImage( std::string& name ) const
+ {
+ TImages::const_iterator i = this->m_Images.find( name );
+ if( i != this->m_Images.end( ) )
+ return( i->second );
+ else
+ return( NULL );
+ }
+
+ double GetWindow( ) const
+ {
+ return( this->m_MPRObjects->GetWindow( ) );
+ }
+ double GetLevel( ) const
+ {
+ return( this->m_MPRObjects->GetLevel( ) );
+ }
+
void ClearAll( );
protected:
void _UpdatePlugins( );
protected:
- typedef cpExtensions::Visualization::MPRObjects TMPRObjects;
vtkSmartPointer< TMPRObjects > m_MPRObjects;
QVTKWidget* m_XVTK;