]> Creatis software - creaMaracasVisu.git/blobdiff - lib/maracasVisuLib/src/CutModule/interface/CutModel2MainPanel.cxx
*** empty log message ***
[creaMaracasVisu.git] / lib / maracasVisuLib / src / CutModule / interface / CutModel2MainPanel.cxx
index 4b0367f44635ced747494caaba81d9ebb6252e5e..d2fa53fcad917608b4f63ba2db726492b73a5fec 100644 (file)
@@ -3,8 +3,8 @@
   Program:   wxMaracas
   Module:    $RCSfile: CutModel2MainPanel.cxx,v $
   Language:  C++
-  Date:      $Date: 2009/11/19 16:34:43 $
-  Version:   $Revision: 1.3 $
+  Date:      $Date: 2009/11/23 13:00:20 $
+  Version:   $Revision: 1.5 $
 
   Copyright: (c) 2002, 2003
   License:
@@ -50,7 +50,7 @@ CutModel2MainPanel::~CutModel2MainPanel( ){
 
 void CutModel2MainPanel::initialize(std::string path){
        
-       cutmanager = new CutModelManager(path);
+       cutmanager = new CutModel2Manager(path);
 
        _panelid = 0;
        _wxauimanager = new wxAuiManager(this); 
@@ -79,7 +79,7 @@ void CutModel2MainPanel::setImageData(vtkImageData* img){
        try{
                checkInvariant();
                cutmanager->setImageData(img);
-       }catch(CutModel2Exception e){
+       }catch(CutModelException e){
                showErrorDialog(e.getCause());
        }
 }
@@ -97,7 +97,7 @@ void CutModel2MainPanel::setRenderer(vtkRenderer* renderer){
     try{
                checkInvariant();
                cutmanager->setRenderer(renderer);
-       }catch(CutModel2Exception e){
+       }catch(CutModelException e){
                showErrorDialog(e.getCause());
        }
 }
@@ -130,7 +130,7 @@ void CutModel2MainPanel::RemoveActor(int id){
 
                cutmanager->RemoveActor(id);
 
-       }catch(CutModel2Exception e){
+       }catch(CutModelException e){
                showErrorDialog(e.getCause());
        }
 }
@@ -140,13 +140,13 @@ void CutModel2MainPanel::onAddCutModel2(){
                checkInvariant();
 
                int id = addNewViewPanel();             
-               cutmanager->onAddCutModel(id, getModelView(id));
+               cutmanager->onAddCutModel2(id, getModelView(id));
 
                _panelid++;
 
                ShowCurrentPanel(id);
 
-       }catch(CutModel2Exception e){
+       }catch(CutModelException e){
                showErrorDialog(e.getCause());
        }
 }
@@ -163,7 +163,7 @@ void CutModel2MainPanel::ShowCurrentPanel(int id){
 }
 int CutModel2MainPanel::addNewViewPanel()throw( CutModelException){
        
-       CutModelView* viewpanel = new CutModelView(this,cutmanager->getImageRange());
+       CutModel2View* viewpanel = new CutModel2View(this,cutmanager->getImageRange());
 
        wxAuiPaneInfo paneinfo0;
        _wxauimanager->AddPane(viewpanel, paneinfo0.DefaultPane().DestroyOnClose().Centre());   
@@ -176,9 +176,9 @@ int CutModel2MainPanel::addNewViewPanel()throw( CutModelException){
        
        
 }
-CutModel2View* CutModel2MainPanel::getModelView(int id)throw( CutModel2Exception){
+CutModel2View* CutModel2MainPanel::getModelView(int id)throw( CutModelException){
 
-       CutModelView* current = NULL;
+       CutModel2View* current = NULL;
        for(int i = 0; i < viewpanels.size();i++){
                if(viewpanels[i]->getId()==id){
             current = viewpanels[i];
@@ -186,7 +186,7 @@ CutModel2View* CutModel2MainPanel::getModelView(int id)throw( CutModel2Exception
        }
        if(current == NULL){
                std::string s = "Id not found";
-               throw CutModel2Exception(s);
+               throw CutModelException(s);
        }
        return current;
 }
@@ -241,7 +241,7 @@ void CutModel2MainPanel::changeColor(int id,double r,double g,double b){
                checkInvariant();               
                cutmanager->changeColor(id, r, g, b);
 
-       }catch(CutModel2Exception e){
+       }catch(CutModelException e){
                showErrorDialog(e.getCause());
        }
        
@@ -252,7 +252,7 @@ void CutModel2MainPanel::ChangeShape(int id,int selection){
                
                cutmanager->ChangeShape(id, selection);
 
-       }catch(CutModel2Exception e){
+       }catch(CutModelException e){
                showErrorDialog(e.getCause());
        }
 }
@@ -262,7 +262,7 @@ void CutModel2MainPanel::updateActorDirection(int id){
                
                cutmanager->updateActorDirection(id);
 
-       }catch(CutModel2Exception e){
+       }catch(CutModelException e){
                showErrorDialog(e.getCause());
        }
 }
@@ -287,7 +287,7 @@ vtkImageData* CutModel2MainPanel::GetResultImage(){
     try{
                checkInvariant();
                return cutmanager->GetResultImage();
-       }catch(CutModel2Exception e){
+       }catch(CutModelException e){
                showErrorDialog(e.getCause());
        }
        return NULL;
@@ -305,11 +305,11 @@ void CutModel2MainPanel::ShowStatistics(int id){
        delete histo;
 }
 
-void CutModel2MainPanel::SaveCutModel2Data(std::string filename){
+void CutModel2MainPanel::SaveCutModelData(std::string filename){
        cutmanager->SaveCutModelData(filename);
 }
 
-void CutModel2MainPanel::LoadCutModel2Data(std::string filename){
+void CutModel2MainPanel::LoadCutModelData(std::string filename){
     cutmanager->LoadCutModelData(filename);
 }
 /**