]> Creatis software - creaMaracasVisu.git/commitdiff
*** empty log message ***
authorJuan Prieto <Juan.Prieto@creatis.insa-lyon.fr>
Wed, 3 Dec 2008 11:42:54 +0000 (11:42 +0000)
committerJuan Prieto <Juan.Prieto@creatis.insa-lyon.fr>
Wed, 3 Dec 2008 11:42:54 +0000 (11:42 +0000)
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_N_ViewersWidget.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_ViewerWidget.cxx
lib/maracasVisuLib/src/kernel/marImageData.cpp
lib/maracasVisuLib/src/kernel/marImageData.h

index d9d07c600e6c16fb17c76652f651eac9d7d08f0f..c24788a7b53f6e7160c07c93da0ecd436617621b 100644 (file)
@@ -3,8 +3,8 @@
   Program:   wxMaracas
   Module:    $RCSfile: wxMaracas_N_ViewersWidget.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/10/31 16:32:42 $
-  Version:   $Revision: 1.1 $
+  Date:      $Date: 2008/12/03 11:42:54 $
+  Version:   $Revision: 1.2 $
 
   Copyright: (c) 2002, 2003
   License:
 
  void wxMaracas_N_ViewersWidget::SetImage( vtkImageData *image )
  {
-        if (wxwindow1!=NULL) { wxwindow1->SetImage(image); }
-        if (wxwindow2!=NULL) { wxwindow2->SetImage(image); }
+        if (wxwindow1!=NULL) { 
+                
+               wxwindow1->SetImage(image); 
+       }
+        if (wxwindow2!=NULL) { wxwindow2->SetImage(image); } 
         if (wxwindow3!=NULL) { wxwindow3->SetImage(image); }
         if (wxwindow4!=NULL) { wxwindow4->SetImage(image); }
+
+
  }
 
 
index 9c8cc594656bd2264f3fb7a08b845920dba70ca8..d81a4680e53e4807be703a387c9fcca005714678 100644 (file)
@@ -3,8 +3,8 @@
   Program:   wxMaracas
   Module:    $RCSfile: wxMaracas_ViewerWidget.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/11/24 15:11:25 $
-  Version:   $Revision: 1.2 $
+  Date:      $Date: 2008/12/03 11:42:54 $
+  Version:   $Revision: 1.3 $
 
   Copyright: (c) 2002, 2003
   License:
 
        void wxMaracas_ViewerWidget::SetImage( vtkImageData *image      )
        {
-               printf("EED wxMaracas_ViewerWidget::SetImage   IMPORTANT this methode is missing \n");
+               //printf("EED wxMaracas_ViewerWidget::SetImage   IMPORTANT this methode is missing \n");
+               marImageData* mar = mvtkmprbasedata->GetMarImageData();
+               mar->removeImageData(0);
+               mar->AddImageData(image);
+
+               ConfigureVTK();
+               RefreshView();
+
+
+
        }
 
        double wxMaracas_ViewerWidget :: GetX()
index de4273fe032003f2097ff4cb52bfaf76a833e578..88476ca82ac0b7225d243b6d16cb32059c472198 100644 (file)
@@ -78,6 +78,19 @@ vtkImageData *marImageData::GetImageData()
 {
        return _imagedataLST[0];
 }
+
+void marImageData::removeImageData(int index)
+{
+       if(index < _imagedataLST.size()){
+
+               //vtkImageData* img = _imagedataLST[index];
+               for(int i = index; i < _imagedataLST.size()-1; i++){                    
+                       _imagedataLST[i] = _imagedataLST[i+1];
+               }
+               _imagedataLST.pop_back();
+               //delete img;
+       }       
+}
 // ----------------------------------------------------------------------------------------------
 int marImageData::GetXOriginal(int value)
 {
index 87db79ccbc4a840fa1ed45db39aad86490383473..0eaaf2ed09ee24425b123a816ce67eb992ecc676 100644 (file)
@@ -19,6 +19,8 @@ public:
        void SetVoiOriginal(int voi[6]);
        void AddImageData(vtkImageData *imagedata);
 
+       void removeImageData(int index);
+
        void GetSpcOriginal(double spc[3]);
        void GetVoiOriginal(int voi[6]);
        vtkImageData *GetImageData();