]> Creatis software - creaVtk.git/commitdiff
MeshManager
authorEduardo DAVILA <davila@creatis.insa-lyon.fr>
Thu, 15 Sep 2022 12:03:17 +0000 (14:03 +0200)
committerEduardo DAVILA <davila@creatis.insa-lyon.fr>
Thu, 15 Sep 2022 12:03:17 +0000 (14:03 +0200)
bbtk_creaVtk_PKG/src/bbcreaVtkLinearExtrusionFilter.cxx
bbtk_creaVtk_PKG/src/bbcreaVtkPlaneWidget.cxx
bbtk_creaVtk_PKG/src/bbcreaVtkPlaneWidget_Base.cxx
bbtk_creaVtk_PKG/src/bbcreaVtkPointPicker.cxx
bbtk_creaVtk_PKG/src/bbcreaVtkPolyDataNormals.cxx
lib/creaVtk/MeshManagerModel.cpp
lib/creaVtk/creaVtkPlaneWidget.cpp

index 2b39efe8a1463a6c85188901682e363c273aeae3..0c16df888c6381f2b1b20f72c68cbb381ecdd69a 100644 (file)
@@ -29,8 +29,6 @@ void LinearExtrusionFilter::Process()
 //    bbSetOutputOut( bbGetInputIn() );
 //    std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
     
-    printf("EED LinearExtrusionFilter::Process In=%p \n",bbGetInputIn() );
-
     if (extrude!=NULL)
     {
         extrude->Delete();
index 1698e7115dcce0b5b9404034545e8c4b01843a87..d7ae9a41285c7fd28f9737dad30e530e19594762 100644 (file)
@@ -12,6 +12,7 @@ void boxcreaVtkPlaneWidget::Execute()  // virutal
 {
     std::vector<double> center = _box->_boxcreavtkplanewidget.GetCenter();
     std::vector<double> normal = _box->_boxcreavtkplanewidget.GetNormal();
+    SetNormalIn( normal );
     double  delta   = 0.00000001;
     bool    ok      = false;
     
@@ -47,7 +48,6 @@ void boxcreaVtkPlaneWidget::Execute()  // virutal
 //       _box->bbSignalOutputModification(std::string("Center"));
 //       _box->bbSignalOutputModification(std::string("Normal"));
         _box->bbSignalOutputModification();
-
     }
 }
 
@@ -74,18 +74,14 @@ void PlaneWidget::Process()
 //      (the one provided in the attribute 'name' of the tag 'input')
 //    * TYPE is the C++ type of the input/output
 //      (the one provided in the attribute 'type' of the tag 'input')
-    printf("EED PlaneWidget::Process 1 \n");
        if ((bbGetInputIn()==NULL) || (bbGetInputRenderer()==NULL))
        {
-        printf("EED PlaneWidget::Process 2 \n");
                bbSetOutputOut( NULL );
                std::vector<double> center;
                std::vector<double> normal;
                bbSetOutputCenter( center );
                bbSetOutputNormal( normal );
        } else {
-        if (bbGetInputOrigin().size()==3) printf("EED PlaneWidget::Process 3  Origin  %f, %f, %f \n",  bbGetInputOrigin()[0], bbGetInputOrigin()[1], bbGetInputOrigin()[2] );
-        else printf("EED PlaneWidget::Process 3  Origin -1 \n" );
                _boxcreavtkplanewidget.SetActive( bbGetInputActive() );
                _boxcreavtkplanewidget.SetImage( bbGetInputIn() );
                _boxcreavtkplanewidget.SetResolution( bbGetInputResolution() );
index de10767405304ae4d90e7b4d0883310562cf8fbc..029d552dfdb26ff81e5837a6bbdeb9e2fc1f24e6 100644 (file)
@@ -29,17 +29,21 @@ void PlaneWidget_Base::Process()
 //    bbSetOutputOut( bbGetInputIn() );
 //    std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
 
+    printf("EED PlaneWidget_Base::Process Start \n");
     if ((bbGetInputType()==1)  &&  (bbGetInputIn()!=NULL) )
     {
+        printf("EED PlaneWidget_Base::Process 1 \n");
         std::vector<double> origin = bbGetInputIn()->GetCenter();
         std::vector<double> normal = bbGetInputIn()->GetNormal();
         origin[0] = origin[0] + normal[0]*bbGetInputParam();
         origin[1] = origin[1] + normal[1]*bbGetInputParam();
         origin[2] = origin[2] + normal[2]*bbGetInputParam();
         bbGetInputIn()->SetOrigin(origin);
+//        bbGetInputIn()->SetNormalIn(normal);
         bbGetInputIn()->Process();
         bbGetInputIn()->Execute();
-    }
+    } // if Type == 1
+    printf("EED PlaneWidget_Base::Process End \n");
 }
 
 //===== 
index f87ed20e22e1b671cb31dae0c2d54cb039d152b5..7bcdd934d91304ab5a235c6f1e0c61638d2a9713 100644 (file)
@@ -81,7 +81,6 @@ void creaVtkCallbackPointPicker::Execute(vtkObject *caller, unsigned long, void*
                         boxPointPicker->bbSetOutputNormal( lstNormal );
                     } // if dataarray
                 } // if ClassName
-                printf("EED creaVtkCallbackPointPicker::Execute  \n" );
                 boxPointPicker->bbSignalOutputModification();
                        }  // if
                } // if Active
index e36998924ed266a6a1ebef233de5849ce13297e6..c48f31c9bd7235b7cf6f514e14c7c3d5963fedd0 100644 (file)
@@ -36,8 +36,6 @@ void PolyDataNormals::Process()
 //    bbSetOutputOut( bbGetInputIn() );
 //    std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
     
-    printf("EED  PolyDataNormals::Process In=%p \n", bbGetInputIn() );
-
     if (bbGetInputIn()!=NULL)
     {
   
index 5c214513a31053d8e3328cb6560c0f6a99e65ea6..cf0b3dd2384da5f2e7b1b01847a5fbcc3a840e4e 100644 (file)
@@ -39,7 +39,6 @@ MeshManagerModel::~MeshManagerModel()
 
 void MeshManagerModel::ResetMeshTemp_()
 {
-    printf("EED MeshManagerModel::Process ResetMeshTemp_ Start\n");
     if (_meshBase!=NULL)
     {
         if (_meshTemp!=NULL)
@@ -47,13 +46,10 @@ void MeshManagerModel::ResetMeshTemp_()
             _meshTemp->Delete();
         } // if
         _meshTemp = vtkPolyData::New();
-        printf("EED MeshManagerModel::Process ResetMeshTemp_ 1\n");
         _meshTemp->DeepCopy(_meshBase);
-        printf("EED MeshManagerModel::Process ResetMeshTemp_ 2\n");
     } else {
         _meshTemp=NULL;
     }
-    printf("EED MeshManagerModel::Process ResetMeshTemp_ End\n");
 }
 
 void MeshManagerModel::SetMeshBase(vtkPolyData* mesh)
@@ -74,11 +70,8 @@ void MeshManagerModel::SetMeshMemoryMode(vtkPolyData* mesh)
 
 void MeshManagerModel::ResetMeshTemp()
 {
-    printf("EED MeshManagerModel::Process ResetMeshTemp 1\n");
     ResetMeshTemp_();
-    printf("EED MeshManagerModel::Process ResetMeshTemp 2\n");
     RefreshOutputs();
-    printf("EED MeshManagerModel::Process ResetMeshTemp 3\n");
 }
 
 void MeshManagerModel::CopySetMeshBase(vtkPolyData* mesh)
index 865343ca552614f7654a96497f92dc51f009754b..2081fb0277ceb89826f115fb1d9bd1436b854a54 100644 (file)
@@ -37,7 +37,7 @@ void creaVtkCallbackPlaneWidget::Execute(vtkObject *caller, unsigned long, void*
        {
                creavtkplanewidget->UpdatePlane();
                creavtkplanewidget->Execute();
-       }               
+       }       // if  creavtkplanewidget != NULL
 }