]> Creatis software - creaMaracasVisu.git/commitdiff
*** empty log message ***
authordonadio <donadio>
Fri, 5 Jun 2009 16:44:25 +0000 (16:44 +0000)
committerdonadio <donadio>
Fri, 5 Jun 2009 16:44:25 +0000 (16:44 +0000)
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasSuperposition.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasSuperposition.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasSuperpositionPanel.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasSuperpositionPanel.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR2DView.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR2DView.h

index 2581b3922e2071df308f31d06b353c02b82d7570..7684de86a24f8a9d008cf2b7d6a48db4b4223605 100644 (file)
@@ -3,8 +3,8 @@
   Program:   wxMaracas
   Module:    $RCSfile: wxMaracasSuperposition.cxx,v $
   Language:  C++
-  Date:      $Date: 2009/06/03 13:47:07 $
-  Version:   $Revision: 1.3 $
+  Date:      $Date: 2009/06/05 16:44:25 $
+  Version:   $Revision: 1.4 $
 
   Copyright: (c) 2002, 2003
   License:
@@ -46,7 +46,8 @@ wxMaracasSuperposition::wxMaracasSuperposition( wxWindow* parent, std::vector<vt
 wxMaracasSuperposition::~wxMaracasSuperposition()
 {
        _notebook->Destroy();
-       m_mgr.UnInit(); 
+       instance = NULL;
+       m_mgr.UnInit();
 }
 
 wxMaracasSuperposition* wxMaracasSuperposition :: getInstance ( wxWindow* parent, std::vector<vtkImageData*> imgs)
@@ -108,7 +109,7 @@ void wxMaracasSuperposition :: createPanels()
 {
        if( _superposition1==NULL )
        {
-               createSuperpositionPanel(1);
+               _superposition1 = new wxMaracasSuperpositionPanel ( _images, 1, _notebook );
        }
        
        else if( _superposition1!=NULL )
@@ -118,7 +119,7 @@ void wxMaracasSuperposition :: createPanels()
 
        if( _superposition2==NULL )
        {
-               createSuperpositionPanel(2);
+               _superposition2 = new wxMaracasSuperpositionPanel ( _images, 2, _notebook );
        }
        
        else if( _superposition2!=NULL )
@@ -128,7 +129,7 @@ void wxMaracasSuperposition :: createPanels()
        
        if( _superposition3==NULL )
        {
-               createSuperpositionPanel(3);
+               _superposition3 = new wxMaracasSuperpositionPanel ( _images, 3, _notebook );
        }
        
        else if( _superposition3!=NULL )
@@ -136,22 +137,6 @@ void wxMaracasSuperposition :: createPanels()
                
        }       
 }
-       
-void wxMaracasSuperposition :: createSuperpositionPanel(int type)
-{
-       if (type=1)
-       {
-               _superposition1 = new wxMaracasSuperpositionPanel ( _images, _notebook );
-       }
-       if (type=2)
-       {
-               _superposition2 = new wxMaracasSuperpositionPanel ( _images, _notebook );
-       }
-       if (type=3)
-       {
-               _superposition3 = new wxMaracasSuperpositionPanel ( _images, _notebook );
-       }
-}
 
 void wxMaracasSuperposition :: changeImages(std::vector<vtkImageData*> imgs)
 {
index e595b7ef1401b6f04ac94c3a032c40253b542ab4..6b12c3f2c613bccaa03c50070013a057066bbc06 100644 (file)
@@ -3,8 +3,8 @@
   Program:   wxMaracas
   Module:    $RCSfile: wxMaracasSuperposition.h,v $
   Language:  C++
-  Date:      $Date: 2009/06/03 13:47:07 $
-  Version:   $Revision: 1.3 $
+  Date:      $Date: 2009/06/05 16:44:25 $
+  Version:   $Revision: 1.4 $
 
   Copyright: (c) 2002, 2003
   License:
@@ -44,8 +44,6 @@ public:
        wxAuiNotebook * createNotebook();
 
        void createPanels();
-       
-       void createSuperpositionPanel(int type);
 
        void configurePanels();
 
index 803eaa5b90a03df9f72ef3fcc3c16607f0fdeb7e..92c9b6b45feb980060a47876e27baea787c4588b 100644 (file)
        // Constructors & Destructors
        //------------------------------------------------------------------------------------------------------------
 
-       wxMaracasSuperpositionPanel :: wxMaracasSuperpositionPanel ( std::vector<vtkImageData*> imgs, wxWindow *parent, const wxPoint& pos, const wxSize& size,long style, int vertStart, int vertEnd, int horzStart, int horzEnd )     
+       wxMaracasSuperpositionPanel :: wxMaracasSuperpositionPanel ( std::vector<vtkImageData*> imgs, int type, wxWindow *parent, const wxPoint& pos, const wxSize& size,long style, int vertStart, int vertEnd, int horzStart, int horzEnd )   
        :wxPanel(parent, -1, pos, size, style)          
        {                               
                _images = imgs;
+               _type = type;
                int gapH = 20;
                int gapV = 10;
                createSuperpositionPanel();
 
                std::vector<int> * numViews = new std::vector<int> ();
                numViews->push_back(0);
-               theViewPanel = new wxMaracas_N_ViewersWidget( this, _images[0], numViews );
+               
+               if (_type==1 || _type==3)
+               {
+                       theViewPanel = new wxMaracas_N_ViewersWidget( this, _images[0], numViews );                     
+               }
+               else if (_type==2)
+               {
+                       theViewPanel = new wxMaracas_N_ViewersWidget( this, _images[1], numViews );                                             
+               }
+               
                SetVisibleAxis(false);
 
                theViewPanel->SetBackgroundColour(wxColour(0,0,0));
index 58ee0221f494c72d7821d2784b86694cdbfcc8d3..380bc4eb4d7d93d68a36ec7e9966fbce5c33ba25 100644 (file)
@@ -33,7 +33,7 @@ class creaMaracasVisu_EXPORT wxMaracasSuperpositionPanel : public wxPanel
 
 public:
 
-       wxMaracasSuperpositionPanel( std::vector<vtkImageData*> imgs, wxWindow *parent, const wxPoint& pos=wxDefaultPosition, 
+       wxMaracasSuperpositionPanel( std::vector<vtkImageData*> imgs, int type, wxWindow *parent, const wxPoint& pos=wxDefaultPosition, 
        const wxSize& size = wxDefaultSize,long style= wxDEFAULT_FRAME_STYLE | wxSUNKEN_BORDER, int vertStart=1, int vertEnd=1, 
        int horzStart=1, int horzEnd=1 );
 
@@ -70,6 +70,9 @@ private:
 
        std::vector<vtkImageData*> _images;
        
+       
+       int _type;
+       
        /*
        * Represents the panel for viewing
        */
index 52eb4cf4f6b9a263b38976dbebc38d02e3860be1..88cfd1a65d9524042386c82470f2d96c81c7b197 100644 (file)
@@ -464,7 +464,9 @@ void wxVtkMPR2DView::ChangeAxisColor(double x, double y, double z)
 }
 
 //-------------------------------------------------------------------
-void wxVtkMPR2DView::TransfromeCoordScreenToWorld(double &X, double &Y, double &Z, int type) // virtual 
+//EED 5 juin 2009
+//void wxVtkMPR2DView::TransfromeCoordScreenToWorld(double &X, double &Y, double &Z, int type) // virtual 
+void wxVtkMPR2DView::TransfromeCoordViewWorld(double &X, double &Y, double &Z, int type) // virtual 
 {
                
        wxVtkBaseView::TransfromeCoordScreenToWorld(X,Y,Z,_direction);
index 20ff77c03ce7083caf0de70e073a8a120c6d577a..d2a8326c8aa13fe4477388f08f9caa8d7d48f0f0 100644 (file)
@@ -29,8 +29,8 @@ public:
                        void                    MoveY(double x, double y, double z);
                        void                    MoveZ(double x, double y, double z);
                        void                    ChangeAxisColor(double x, double y, double z);
-//     virtual void                    TransfromeCoordViewWorld(double &X, double &Y, double &Z, int type);
-       virtual void                    TransfromeCoordScreenToWorld(double &X, double &Y, double &Z, int type);
+       virtual void                    TransfromeCoordViewWorld(double &X, double &Y, double &Z, int type);
+//     virtual void                    TransfromeCoordScreenToWorld(double &X, double &Y, double &Z, int type);
        
                        void                    SetVisibleAxis(bool ok);