]> Creatis software - creaVtk.git/commitdiff
MeshManager
authorEduardo DAVILA <davila@creatis.insa-lyon.fr>
Wed, 14 Sep 2022 14:39:07 +0000 (16:39 +0200)
committerEduardo DAVILA <davila@creatis.insa-lyon.fr>
Wed, 14 Sep 2022 14:39:07 +0000 (16:39 +0200)
bbtk_creaVtk_PKG/src/bbcreaVtkBooleanOperationPolyDataFilter.cxx
bbtk_creaVtk_PKG/src/bbcreaVtkPlaneWidget.cxx
bbtk_creaVtk_PKG/src/bbcreaVtkPointPicker.cxx
bbtk_creaVtk_PKG/src/bbcreaVtkPointPickerNearest.cxx

index 564f379457259f14e0509e726a0d9f01d4a8155c..175e435a5ce850cdda78eab2ad7019b43f4e73c0 100644 (file)
@@ -115,12 +115,12 @@ printf("EED Warnning BooleanOperationPolyDataFilter::Process  Put this code at t
         vtkPoints *points = booleanOperation->GetOutput()->GetPoints();
         if (points!=NULL)
         {
-            vtkFillHolesFilter *fillHolesFilter = vtkFillHolesFilter::New();
-            fillHolesFilter->SetInputData( booleanOperation->GetOutput() );
-            fillHolesFilter->SetHoleSize(100000.0);
-            fillHolesFilter->Update();
-            bbSetOutputOut( fillHolesFilter->GetOutput() );
-//          bbSetOutputOut( booleanOperation->GetOutput() );
+//            vtkFillHolesFilter *fillHolesFilter = vtkFillHolesFilter::New();
+//            fillHolesFilter->SetInputData( booleanOperation->GetOutput() );
+//            fillHolesFilter->SetHoleSize(100000.0);
+//            fillHolesFilter->Update();
+//            bbSetOutputOut( fillHolesFilter->GetOutput() );
+            bbSetOutputOut( booleanOperation->GetOutput() );
         } else {
             bbSetOutputOut( NULL );
         } // if points!=NULL
index f45306d2d509adad819bbbe7ddb3797cae84c913..1698e7115dcce0b5b9404034545e8c4b01843a87 100644 (file)
@@ -74,14 +74,18 @@ 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 3d71c086809a59cfda0334da4ada5e4a2868acfa..f87ed20e22e1b671cb31dae0c2d54cb039d152b5 100644 (file)
@@ -81,6 +81,7 @@ 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
@@ -177,6 +178,8 @@ void PointPicker::Process()
 //    bbSetOutputOut( bbGetInputIn() );
 //    std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
   
+    printf("EED PointPicker::Process  %s\n", bbGetFullName().c_str()  );
+    
        if (firsttime==true)
        {
                firsttime = false;
@@ -263,6 +266,12 @@ void PointPicker::bbUserSetDefaultValues()
     lstNormal.push_back(0);
     lstNormal.push_back(1);
     bbSetOutputNormal( lstNormal );
+    
+    std::vector<double> point;
+    point.push_back(20);
+    point.push_back(20);
+    point.push_back(20);
+    bbSetOutputPoint( point );
 }
 
 //===== 
index fc2442a9977d9e9066fa24d9500a06ab067498d8..99a8d6c755ed3e7a8d1b96532a5fe142e629e408 100644 (file)
@@ -36,8 +36,6 @@ void PointPickerNearest::Process()
     std::vector<double> lstNormal;
     std::vector<double> refPoint = bbGetInputPoint();
 
-    printf ("EED PointPickerNearest::Process 1\n");
-
     if ((bbGetInputActive()==true) && ( bbGetInputMesh()!=NULL) && (refPoint.size()==3) )
     {
         double      p[3];
@@ -65,7 +63,6 @@ void PointPickerNearest::Process()
             } // if distMax
         } // for i
 
-        printf ("EED PointPickerNearest::Process 3\n");
         if (iBack>=0)
         {
             vtkPointData    *pointdata  = bbGetInputMesh()->GetPointData();
@@ -79,12 +76,10 @@ void PointPickerNearest::Process()
                 printf("EED creaVtkCallbackPointPicker::Execute dataarray=%s  n=%ld p=%ld\n", dataarray->GetName(),dataarray->GetNumberOfValues() ,polydata->GetNumberOfPoints() );
             } // for i
             */
-            printf ("EED PointPickerNearest::Process 4\n");
             dataarray   = pointdata->GetNormals();
             if (dataarray!=NULL)
             {
                 pValue      = dataarray->GetTuple3( iBack );
-                printf ("EED PointPickerNearest::Process 5\n");
                 lstNormal.push_back(pValue[0]);
                 lstNormal.push_back(pValue[1]);
                 lstNormal.push_back(pValue[2]);
@@ -92,7 +87,6 @@ void PointPickerNearest::Process()
         } // if iBack
         bbSetOutputPointId( iBack );
         bbSetOutputNormal( lstNormal );
-        printf ("EED PointPickerNearest::Process 6 %ld\n", iBack);
         std::vector<double> lstPointOut;
         if (iBack>=0){
             points->GetPoint(iBack,p);
@@ -102,6 +96,7 @@ void PointPickerNearest::Process()
             printf ("EED PointPickerNearest::Process 7 pointOut=%f %f %f\n", lstPointOut[0],lstPointOut[1],lstPointOut[2]);
         }// if iBack
         bbSetOutputPointOut( lstPointOut );
+        bbSignalOutputModification();
     } else {
         bbSetOutputPointId( -1 );
         lstNormal.push_back(0);
@@ -109,10 +104,9 @@ void PointPickerNearest::Process()
         lstNormal.push_back(2);
         bbSetOutputNormal( lstNormal );
         bbSetOutputPointOut( bbGetInputPoint() );
+        bbSignalOutputModification();
     }
-    
     printf ("EED PointPickerNearest::Process END\n");
-
 }
 //===== 
 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)