]> Creatis software - creaContours.git/blobdiff - lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.cxx
#3322 creaContours Feature New Normal - Show reference contour Befor After actual...
[creaContours.git] / lib / Interface_ManagerContour_NDimensions / wxContourMainFrame.cxx
index 5f3aeae73e9f417bf750f2296c57ea16961f447e..f780b86c741d31df73826895a236ef25cc0acdf7 100644 (file)
@@ -140,10 +140,10 @@ void wxContourMainFrame::setVectImages(std::vector<vtkImageData*> imgs)
        #elif defined(__GNUC__)
                std::string str_home(getenv("HOME"));
        #endif
-       std::string strCreaContourDataTmp = str_home + "/.creaContourDataTemp/";
-       std::vector<std::string> conceptNameVect;
-       std::vector<int> conceptSizeVect;
-       notebook = this->createNotebook();
+       std::string                             strCreaContourDataTmp = str_home + "/.creaContourDataTemp/";
+       std::vector<std::string>        conceptNameVect;
+       std::vector<int>                        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<int> instantVector;
        _instantPanel->getInstant( instantVector );
+
+       std::vector<int> tempVector;
+       getInstantVector( tempVector );
+       manModelContour->SetLabel2( std::to_string(tempVector[1]) );
+
        std::string theName = kernelManager->createOutline(manModelContour, instantVector);
        /*std::vector<int> 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<std::string>)_theViewPanel->getSceneManager()->GetlstContoursNameActualSlice() );
+
+       std::vector<int> tempVector;
+       getInstantVector( tempVector );
+       deleteContours( getOutlinesName( tempVector[1] ) );
+//     deleteContours( (std::vector<std::string>)_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<int>& tempVector)
 {
-       printf("wxContourMainFrame::getInstantVector   Warning!!  Methon not implemented ... \n");
        _instantPanel->getInstant( tempVector );
 }