]> Creatis software - bbtk.git/commitdiff
#3505 bug Deformation action region
authorEduardo DAVILA <davila@creatis.insa-lyon.fr>
Tue, 20 Jun 2023 08:35:41 +0000 (10:35 +0200)
committerEduardo DAVILA <davila@creatis.insa-lyon.fr>
Tue, 20 Jun 2023 08:35:41 +0000 (10:35 +0200)
packages/itkvtk/src/bbitkvtkGeodesicMeshDeformation.cxx

index 9fb4792a1d993cc6df600f32cadd8b49581cd39f..1ecc52f39d0050a5e5c0e258358136752ba55528 100644 (file)
@@ -26,10 +26,10 @@ void GeodesicMeshDeformation::Process()
 //    * TYPE is the C++ type of the input/output
 //      (the one provided in the attribute 'type' of the tag 'input')
     std::vector<double> lstCenter = bbGetInputCenter();
-    double s   = bbGetInputS();
-    bool    ok  = false;
-    bool       pdChanged = false;
-    using MeshType = itk::QuadEdgeMesh<double, 3>;
+    double  s           = bbGetInputS();
+    bool    ok          = false;
+    bool       pdChanged   = false;
+    using MeshType      = itk::QuadEdgeMesh<double, 3>;
     
     //Set up QuadEdge and filter every time polydata changes
     if ((bbGetInputIn() != polydata) && (bbGetInputActive()==true) && (bbGetInputIn() != NULL))
@@ -124,10 +124,10 @@ void GeodesicMeshDeformation::Process()
         double  p[3];  // point
         double  pb[3]; // point base
         double  np[3]; // new point
-        double  sx,sy,sz;
-        sx = s*2;
-        sy = sx;
-        sz = sy;
+//        double  sx,sy,sz;
+//        sx = s*2;
+//        sy = s*2;
+//        sz = s*2;
 
         double displcement_x = 0;
         double displcement_y = 0;
@@ -184,7 +184,7 @@ void GeodesicMeshDeformation::Process()
                                using CriterionType = itk::FastMarchingThresholdStoppingCriterion<MeshType, MeshType>;
                                auto criterion = CriterionType::New();
                                sCurrent = s;
-                               criterion->SetThreshold(s*2);
+                               criterion->SetThreshold(s*4);
                                fmmFilter->SetStoppingCriterion(criterion);
                        }
                        fmmFilter->Update();