]> Creatis software - creaMaracasVisu.git/blobdiff - bbtk/src/bbmaracasvisuViewerNV.h
Transform dicom
[creaMaracasVisu.git] / bbtk / src / bbmaracasvisuViewerNV.h
index c1bd8311832d2196a9b07eb7d1dcebb983469005..f2ae6d5a10aea6846cf7e793636195b7273f2271 100644 (file)
@@ -1,6 +1,6 @@
 #ifdef _USE_WXWIDGETS_
-#ifndef __bbmaracasvisuViewerNV_h_INCLUDED__
-#define __bbmaracasvisuViewerNV_h_INCLUDED__
+#ifndef __bbcreaMaracasVisuViewerNV_h_INCLUDED__
+#define __bbcreaMaracasVisuViewerNV_h_INCLUDED__
 #include "bbtkWxBlackBox.h"
 
 
 #include "widgets/wxMaracas_ViewerWidget.h"
 #include "widgets/wxMaracas_N_ViewersWidget.h"
 
-namespace bbmaracasvisu
+namespace bbcreaMaracasVisu
 {
 
+
+
+  class ViewerNV;
+  class bbwxMaracas_N_ViewersWidget : public wxMaracas_N_ViewersWidget
+  {
+       public:
+               bbwxMaracas_N_ViewersWidget(ViewerNV* box,wxWindow *parent, vtkImageData* imagedata=NULL, std::vector<int> *nTypeView=NULL);
+               ~bbwxMaracas_N_ViewersWidget();
+           
+               //if the MPR had generated the refresh event
+               void OnRefreshView(wxCommandEvent & event);
+               void OnDClickLeft(wxCommandEvent & event);              
+       private:
+               ViewerNV                        *mbbViewerNV;
+       DECLARE_EVENT_TABLE( );     
+  };
+
+
+//-------------------------------------------------------------------
+//-------------------------------------------------------------------
+//-------------------------------------------------------------------
+
+
 class /*BBTK_EXPORT*/ ViewerNV
  : 
    public bbtk::WxBlackBox
@@ -24,7 +47,7 @@ class /*BBTK_EXPORT*/ ViewerNV
 /// User callback called in the box contructor
 virtual void bbUserConstructor();
 /// User callback called in the box copy constructor
-virtual void bbUserCopyConstructor();
+virtual void bbUserCopyConstructor(bbtk::BlackBox::Pointer p);
 /// User callback called in the box destructor
 virtual void bbUserDestructor();
 //==================================================================
@@ -43,11 +66,16 @@ virtual void bbUserDestructor();
   BBTK_PROCESS(Process);
   void Process();
   BBTK_CREATE_WIDGET(CreateWidget);
-  void CreateWidget();
+  void CreateWidget(wxWindow* parent);
 
-private:
-       wxMaracas_N_ViewersWidget       *mwxwidget;
+private:       
+       bool    enter;
        std::vector<int>                        point;
+       vtkImageData* currentimg;
+       std::vector<int>  currenttype;
+       wxMaracas_N_ViewersWidget       *mwxwidget;
+
+       bool compareVectors(std::vector<int> type,std::vector<int> currenttype);
 };
 
 BBTK_BEGIN_DESCRIBE_BLACK_BOX(ViewerNV,bbtk::WxBlackBox);
@@ -57,7 +85,7 @@ BBTK_DESCRIPTION("Viewer : N view configuration 2D and 3D");
   BBTK_CATEGORY("viewer");
   BBTK_INPUT(ViewerNV,Title,"Title prepended to the text",std::string,"");
        BBTK_INPUT(ViewerNV,In,"Input image",vtkImageData*,"");
-       BBTK_INPUT(ViewerNV,nTypeView,"vector of viewer types (default 5 0 1 3 ): -1=Z_2DwithOutAxis 0=Z_2D 1=X_2D 2=Y_2D 3=Plane 4=Sphere 5=3D ",std::vector<int>,"");
+       BBTK_INPUT(ViewerNV,nTypeView,"vector of viewer types (default 5 0 1 3 ): -1=Z_2DwithOutAxis 0=Z_2D 1=X_2D 2=Y_2D 3=Plane 4=Sphere 5=3D 6=3Dplane",std::vector<int>,"");
        BBTK_OUTPUT(ViewerNV,wxVtkBaseView1,"wxVtkBaseView 1",wxVtkBaseView  *,"");
        BBTK_OUTPUT(ViewerNV,wxVtkBaseView2,"wxVtkBaseView 2",wxVtkBaseView  *,"");
        BBTK_OUTPUT(ViewerNV,wxVtkBaseView3,"wxVtkBaseView 3",wxVtkBaseView  *,"");
@@ -69,8 +97,8 @@ BBTK_DESCRIPTION("Viewer : N view configuration 2D and 3D");
        BBTK_OUTPUT(ViewerNV,Point,"Axis point",std::vector<int>,"");
 BBTK_END_DESCRIBE_BLACK_BOX(ViewerNV);
 }
-// EO namespace bbmaracasvisu
+// EO namespace bbcreaMaracasVisu
 
-#endif // __bbmaracasvisuViewerNV_h_INCLUDED__
+#endif // __bbcreaMaracasVisuViewerNV_h_INCLUDED__
 #endif // _USE_WXWIDGETS_