]> Creatis software - creaContours.git/blobdiff - lib/Interface_ManagerContour_NDimensions/wxVtkBaseView_SceneManager.cxx
Changes with manualBaseModel. It improves the functionality with the new
[creaContours.git] / lib / Interface_ManagerContour_NDimensions / wxVtkBaseView_SceneManager.cxx
index 5aabd85529be24397810b43f5488869125ecfe59..a6ceb2031d5c4e066156fdea94fceed86d685b58 100644 (file)
@@ -124,7 +124,7 @@ DEFINE_EVENT_TYPE( wxEVT_CHANGED_DEEP )
                return _wxVtk_BaseView;
        }
        //------------------------------------------------------------------------------------------------------------
-       void wxVtkBaseView_SceneManager :: configureViewControlTo( std::string theKeyName, manualContourModel * manModelContour, double * spc,int typeContour)
+       void wxVtkBaseView_SceneManager :: configureViewControlTo( std::string theKeyName, manualBaseModel * manModelContour, double * spc,int typeContour)
        {
                //setControlActiveStateOfALL( false );
                _creatingROI = true;
@@ -142,6 +142,7 @@ DEFINE_EVENT_TYPE( wxEVT_CHANGED_DEEP )
                manualViewBaseContour           *manViewerContour;
 
                // Creating the view manualViewContour and the manualContourControler
+               // NOTE: The model is created in the KernelManagerContour class, factoryManualContourModel method
                if (typeContour==1)
                {
                        manContourControl       = new manualContourControler();
@@ -171,6 +172,11 @@ DEFINE_EVENT_TYPE( wxEVT_CHANGED_DEEP )
                        manContourControl       = new manualLineControler();
                        manViewerContour        = new manualViewLine();
                }
+               if (typeContour==7)
+               {
+                       manContourControl       = new manualContourControler();
+                       manViewerContour        = new manualViewPoints();
+               }
 
 
 
@@ -328,7 +334,7 @@ DEFINE_EVENT_TYPE( wxEVT_CHANGED_DEEP )
        //  Other functional methods
        //------------------------------------------------------------------------------------------------------------
 
-       void wxVtkBaseView_SceneManager :: createCopyContourOf( std::string anExistingKName, std::string cloneName, manualContourModel * manualModel, bool append )
+       void wxVtkBaseView_SceneManager :: createCopyContourOf( std::string anExistingKName, std::string cloneName, manualBaseModel * manualModel, bool append )
        {
                if ( !append )
                {
@@ -340,7 +346,7 @@ DEFINE_EVENT_TYPE( wxEVT_CHANGED_DEEP )
 
                iter = _contours_ViewControl->find( anExistingKName );
 
-               manualContourModel                      *cModule        = manualModel;
+               manualBaseModel                 *cModule        = manualModel;
                manualViewBaseContour           *cViewer        = iter->second->getViewer()->Clone();
                manualContourBaseControler      *cControl       = iter->second->getControler()->Clone(  );
 
@@ -1109,7 +1115,7 @@ DEFINE_EVENT_TYPE( wxEVT_CHANGED_DEEP )
                if (currentSelection.size()>=1){
                        
                        manualContourBaseControler *cControler  = this->getControlerOf( currentSelection[0] );
-                       manualContourModel *cModel                              = cControler->GetManualContourModel();
+                       manualBaseModel *cModel                         = cControler->GetManualContourModel();
                        int i,size = cModel->GetNumberOfPointsSpline();
                        double x,y,z;
                        for (i=0; i<size; i++)