]> Creatis software - bbtk.git/commitdiff
#3501 Geodesic Deformation
authorPablo Garzon <gapablo2001@gmail.com>
Fri, 28 Jul 2023 09:18:14 +0000 (11:18 +0200)
committerPablo Garzon <gapablo2001@gmail.com>
Fri, 28 Jul 2023 09:18:14 +0000 (11:18 +0200)
packages/itkvtk/src/bbitkvtkGeodesicMeshDeformation.cxx

index 9bcf5feb87f09c54f35a9aa3f8e16931974f4284..98559509fcff7fbd279be8b342c6a87be2b9c03e 100644 (file)
@@ -32,6 +32,7 @@ void GeodesicMeshDeformation::Process()
     using MeshType      = itk::QuadEdgeMesh<double, 3>;
     std::vector<double> deformInfo;
        bbSetOutputOut(deformInfo);
+       //std::vector<double> displacementVector;
     
     //Set up QuadEdge and filter every time polydata changes
     if ((bbGetInputIn() != polydata) && (bbGetInputActive()==true) && (bbGetInputIn() != NULL))
@@ -215,8 +216,10 @@ void GeodesicMeshDeformation::Process()
                                                points->SetPoint(BegProcessedIt.Value().GetNode(), np);
                                        }
                                        ++BegProcessedIt;
-                               }                               
-                               std::vector<double> info{pb[0],pb[1],pb[2], (double) bbGetInputEdgeId(), s};
+                               }
+                               //double directionMoved[3] = {lstCenter[0]-displcement_x, lstCenter[1]-displcement_y, lstCenter[2]-displcement_z};
+                               //vtkMath::Normalize(directionMoved);
+                               std::vector<double> info{lstCenter[0],lstCenter[1],lstCenter[2], bbGetInputDirection()[0] , bbGetInputDirection()[1], bbGetInputDirection()[2],(double) bbGetInputEdgeId(), s};
                                bbSetOutputOut(info);
                                cout << "info updated" << endl;
                                points->Modified();