]> Creatis software - creaVtk.git/blobdiff - bbtk_creaVtk_PKG/src/bbcreaVtkMeshDeformation.cxx
#3472 MeshDeformation
[creaVtk.git] / bbtk_creaVtk_PKG / src / bbcreaVtkMeshDeformation.cxx
index b5b429492f2e29219dc5d60c6ed88299071c978c..3fac0f90d851f8ab9d628e89cea451159796c259 100644 (file)
@@ -28,14 +28,16 @@ void MeshDeformation::Process()
 //    bbSetOutputOut( bbGetInputIn() );
 //    std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
   
+    
     double s = bbGetInputS();
     bool ok=true;
     if (bbGetInputDirection().size()==3)
     {
         ok = !( (bbGetInputDirection()[0]==0) && (bbGetInputDirection()[1]==0) && (bbGetInputDirection()[2]==0) );
     }
-    if ( (bbGetInputIn()!=NULL) && (ok==true))
+    if ( (bbGetInputIn()!=NULL) && (ok==true) && (bbGetInputEdgeId()>=0))
     {
+
         vtkPoints* points=bbGetInputIn()->GetPoints();
         long    i,size=points->GetNumberOfPoints();
         double  p[3];  // point
@@ -67,12 +69,14 @@ void MeshDeformation::Process()
         double displcement_x = 0;
         double displcement_y = 0;
         double displcement_z = 0;
+        
         if (bbGetInputDirection().size()==3)
         {
             displcement_x = bbGetInputDirection()[0];
             displcement_y = bbGetInputDirection()[1];
             displcement_z = bbGetInputDirection()[2];
         }
+        
         size=voiIdPoints.size();
         for (i=0;i<size;i++)
         {