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:
void CutModel2MainPanel::initialize(std::string path){
- cutmanager = new CutModelManager(path);
+ cutmanager = new CutModel2Manager(path);
_panelid = 0;
_wxauimanager = new wxAuiManager(this);
try{
checkInvariant();
cutmanager->setImageData(img);
- }catch(CutModel2Exception e){
+ }catch(CutModelException e){
showErrorDialog(e.getCause());
}
}
try{
checkInvariant();
cutmanager->setRenderer(renderer);
- }catch(CutModel2Exception e){
+ }catch(CutModelException e){
showErrorDialog(e.getCause());
}
}
cutmanager->RemoveActor(id);
- }catch(CutModel2Exception e){
+ }catch(CutModelException e){
showErrorDialog(e.getCause());
}
}
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());
}
}
}
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());
}
-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];
}
if(current == NULL){
std::string s = "Id not found";
- throw CutModel2Exception(s);
+ throw CutModelException(s);
}
return current;
}
checkInvariant();
cutmanager->changeColor(id, r, g, b);
- }catch(CutModel2Exception e){
+ }catch(CutModelException e){
showErrorDialog(e.getCause());
}
cutmanager->ChangeShape(id, selection);
- }catch(CutModel2Exception e){
+ }catch(CutModelException e){
showErrorDialog(e.getCause());
}
}
cutmanager->updateActorDirection(id);
- }catch(CutModel2Exception e){
+ }catch(CutModelException e){
showErrorDialog(e.getCause());
}
}
try{
checkInvariant();
return cutmanager->GetResultImage();
- }catch(CutModel2Exception e){
+ }catch(CutModelException e){
showErrorDialog(e.getCause());
}
return NULL;
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);
}
/**