]> Creatis software - bbtk.git/blobdiff - packages/itkvtk/src/bbitkvtkGeodesicMeshDeformation.cxx
#3501 Geodesic Deformation
[bbtk.git] / packages / itkvtk / src / bbitkvtkGeodesicMeshDeformation.cxx
index 1ecc52f39d0050a5e5c0e258358136752ba55528..98559509fcff7fbd279be8b342c6a87be2b9c03e 100644 (file)
@@ -30,6 +30,9 @@ void GeodesicMeshDeformation::Process()
     bool    ok          = false;
     bool       pdChanged   = false;
     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))
@@ -140,7 +143,7 @@ void GeodesicMeshDeformation::Process()
             displcement_z = bbGetInputDirection()[2];
         } // if TypeIn 0 Direction
                
-               printf(" EED GeodesicMeshDeformation::Process   %ld   %ld  -   %f %f %f \n", EdgeIdBack, bbGetInputEdgeId() , lstCenter[0],lstCenter[1],lstCenter[2] );
+               //printf(" EED GeodesicMeshDeformation::Process   %ld   %ld  -   %f %f %f \n", EdgeIdBack, bbGetInputEdgeId() , lstCenter[0],lstCenter[1],lstCenter[2] );
                
         if (bbGetInputTypeIn()==1) // Center
         {
@@ -214,8 +217,13 @@ void GeodesicMeshDeformation::Process()
                                        }
                                        ++BegProcessedIt;
                                }
+                               //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();
-               bbGetInputIn()->Modified();
+                       bbGetInputIn()->Modified();
                        }// if ffmFilter != NULL
         } // if distance_x y z  != 0
     } // In != NULL    ok    active
@@ -239,6 +247,8 @@ void GeodesicMeshDeformation::bbUserSetDefaultValues()
        EdgeIdBack=-1;
        bbSetInputEdgeId(EdgeIdBack);
        bbSetInputS(10);
+       std::vector<double> OutputVect;
+       bbSetOutputOut(OutputVect);
 
        backLstCenter.push_back(0);
        backLstCenter.push_back(0);