X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FInterface_ManagerContour_NDimensions%2FwxContourMainFrame.cxx;fp=lib%2FInterface_ManagerContour_NDimensions%2FwxContourMainFrame.cxx;h=f780b86c741d31df73826895a236ef25cc0acdf7;hb=d8ae77db08ab2e951c0e984c20fc47b615744abb;hp=5f3aeae73e9f417bf750f2296c57ea16961f447e;hpb=87001c540c1fbcdf21ea7f994d620c8341755848;p=creaContours.git diff --git a/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.cxx b/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.cxx index 5f3aeae..f780b86 100644 --- a/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.cxx +++ b/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.cxx @@ -140,10 +140,10 @@ void wxContourMainFrame::setVectImages(std::vector imgs) #elif defined(__GNUC__) std::string str_home(getenv("HOME")); #endif - std::string strCreaContourDataTmp = str_home + "/.creaContourDataTemp/"; - std::vector conceptNameVect; - std::vector conceptSizeVect; - notebook = this->createNotebook(); + std::string strCreaContourDataTmp = str_home + "/.creaContourDataTemp/"; + std::vector conceptNameVect; + std::vector conceptSizeVect; + notebook = this->createNotebook(); kernelManager = new KernelManagerContour( imgs , _datadir+"/data/" , strCreaContourDataTmp ); _instantPanel = new wxInstantChooserPanel( notebook, "Instant Chooser", true, false, "c" ); _theViewPanel = new wxContourViewPanel( kernelManager->getSourceImage(), notebook ); @@ -394,12 +394,17 @@ void wxContourMainFrame :: onCreateContourBullEye(wxPanel* panel ) } } -void wxContourMainFrame :: createContour( int typeContour ) +void wxContourMainFrame::createContour( int typeContour ) { //Creating the manualContourModel and including in the model manualBaseModel * manModelContour = kernelManager->factoryManualContourModel(typeContour); std::vector instantVector; _instantPanel->getInstant( instantVector ); + + std::vector tempVector; + getInstantVector( tempVector ); + manModelContour->SetLabel2( std::to_string(tempVector[1]) ); + std::string theName = kernelManager->createOutline(manModelContour, instantVector); /*std::vector instantVector; _instantPanel->getInstant( instantVector ); @@ -548,11 +553,17 @@ void wxContourMainFrame :: deleteContour( std::string theKeyName ) //JCP 21 - 11 - 08 } -void wxContourMainFrame::onDeleteContoursActSlice(){ +void wxContourMainFrame::onDeleteContoursActSlice() +{ //JCP 20-10-08 Undo redo implementation saveState(); //JCP 20-10-08 Undo redo implementation - deleteContours( (std::vector)_theViewPanel->getSceneManager()->GetlstContoursNameActualSlice() ); + + std::vector tempVector; + getInstantVector( tempVector ); + deleteContours( getOutlinesName( tempVector[1] ) ); +// deleteContours( (std::vector)_theViewPanel->getSceneManager()->GetlstContoursNameActualSlice() ); + } void wxContourMainFrame::onDeleteAllContours(){ //JCP 20-10-08 Undo redo implementation @@ -2390,6 +2401,13 @@ void wxContourMainFrame::onInterpolation(bool interpolate) RefreshInterface(); } +void wxContourMainFrame::onBeforeAfterContour(bool before,bool after) +{ + _theViewPanel->onBeforeAfterContour(before,after); + RefreshInterface(); +} + + void wxContourMainFrame::onChangeInstant(std::string name,int actual) { _instantPanel->setConceptValue( name, actual ); @@ -2512,7 +2530,6 @@ void wxContourMainFrame::onSpreadGo(int type) void wxContourMainFrame::getInstantVector(std::vector& tempVector) { - printf("wxContourMainFrame::getInstantVector Warning!! Methon not implemented ... \n"); _instantPanel->getInstant( tempVector ); }