]> Creatis software - cpPlugins.git/blobdiff - appli/ImageMPR/ImageMPR.h
widget sphere update: works with mouse but is still buggy with key board
[cpPlugins.git] / appli / ImageMPR / ImageMPR.h
index a89d0f9ed2c80bf625b05889eefa73fc97f718f4..56b4623e1771ae71db61ea52844be193cbfaf1c9 100644 (file)
@@ -4,6 +4,7 @@
 #include <vector>
 
 // Qt stuff
+#include <QApplication>
 #include <QMainWindow>
 
 // vtk stuff
 #include <cpExtensions/Visualization/MPRObjects.h>
 
 // Plugins interface
-#include <cpPlugins/Interface/Interface.h>
-#include <cpPlugins/Interface/ProcessObject.h>
-#include <cpPlugins/Interface/Image.h>
-#include <cpPlugins/Interface/ImplicitFunction.h>
-#include <cpPlugins/Interface/Mesh.h>
-#include <vtkMetaImageWriter.h>
-#include <vtkMetaImageReader.h>
-
+#include <cpPlugins/Interface/Plugins.h>
 
 // -------------------------------------------------------------------------
 namespace Ui
@@ -123,10 +117,7 @@ public:
   typedef QMainWindow Superclass;
 
   typedef cpExtensions::Visualization::MPRObjects TMPRObjects;
-  typedef TMPRObjects::TCursorCommand     TCursorCommand;
-  typedef TMPRObjects::TMouseCommand      TMouseCommand;
-  typedef TMPRObjects::TMouseWheelCommand TMouseWheelCommand;
-  typedef TMPRObjects::TKeyCommand        TKeyCommand;
+  typedef cpPlugins::Interface::Plugins           TPlugins;
 
   // Plugins types
   /*
@@ -145,6 +136,18 @@ public:
   explicit ImageMPR( QWidget* parent = 0 );
   virtual ~ImageMPR( );
 
+protected:
+  inline void _Block( )
+    {
+      QApplication::setOverrideCursor( Qt::WaitCursor );
+      this->setEnabled( false );
+    }
+  inline void _Unblock( )
+    {
+      QApplication::restoreOverrideCursor( );
+      this->setEnabled( true );
+    }
+
   /*
     protected:
     bool _LoadPlugins( const std::string& filename );
@@ -154,6 +157,7 @@ public:
 
 private slots:
   void _aOpenImage( );
+  void _aOpenDICOMSeries( );
   void _aOpenSegmentation( );
   void _aOpenPolyData( );
   void _aSaveImage( );
@@ -166,16 +170,13 @@ private slots:
 
   void _execPlugin( );
 
-protected:
-  // Callbacks
-  static void _CursorCommand( double* pos, int axis, void* data );
-
 private:
   Ui::ImageMPR* m_UI;
+  TPlugins*     m_Plugins;
 
-  // Some state flags
-  std::string m_ImageLoaded;
-  bool m_Flooding;
+  // Objects
+  TPlugins::TImage::Pointer m_MainImage;
+  std::vector< TPlugins::TMesh::Pointer > m_Meshes;
 
   // Plugins objects
   /*