]> Creatis software - creaVtk.git/commitdiff
#3276 creaVtk Feature New Normal - DistanceMap Box
authorEduardo DAVILA <davila@localhost.localdomain>
Fri, 19 Jul 2019 07:03:31 +0000 (09:03 +0200)
committerEduardo DAVILA <davila@localhost.localdomain>
Fri, 19 Jul 2019 07:03:31 +0000 (09:03 +0200)
bbtk_creaVtk_PKG/src/bbcreaVtkDistanceMap.cxx
bbtk_creaVtk_PKG/src/bbcreaVtkDistanceMap.h
bbtk_creaVtk_PKG/src/bbcreaVtkImageContinuousErode3D.cxx

index 1c50d0f3405c1a0fd028e19a3521dbcfa7821c31..787c1efa5e3d9033935458369b5534768066adec 100644 (file)
@@ -75,6 +75,16 @@ void DistanceMap::Process()
                int px,py,pz;           
                int pxOut,pyOut,pzOut;  
 
+
+printf("EED Warnning!  DistanceMap::Process    Clean Ponter Image......\n");
+printf("EED Warnning!  DistanceMap::Process    Clean Ponter Image......\n");
+printf("EED Warnning!  DistanceMap::Process    Clean Ponter Image......\n");
+printf("EED Warnning!  DistanceMap::Process    Clean Ponter Image......\n");
+printf("EED Warnning!  DistanceMap::Process    Clean Ponter Image......\n");
+printf("EED Warnning!  DistanceMap::Process    Clean Ponter Image......\n");
+printf("EED Warnning!  DistanceMap::Process    Clean Ponter Image......\n");
+printf("EED Warnning!  DistanceMap::Process    Clean Ponter Image......\n");
+
                while (lst1X.size()>0)
                {
                        depth=depth+bbGetInputSlope();
@@ -163,6 +173,7 @@ void DistanceMap::Process()
                int pxOutBack;
                int pyOutBack;
                int pzOutBack;
+               int length=0;
                while (ok==true)
                {       
                        ok2=false;
@@ -184,9 +195,9 @@ void DistanceMap::Process()
                                                                        ok2                     = true;
                                                                } // if min
                                                } // if 
-                                       } // for kk
-                               } // fo jj
-                       } // for ii
+                                       } // for pz
+                               } // fo py
+                       } // for px
 
                        if (ok2==true)
                        {
@@ -196,14 +207,15 @@ void DistanceMap::Process()
                                lstPathXOut.push_back( pxOut );
                                lstPathYOut.push_back( pyOut );
                                lstPathZOut.push_back( pzOut );
+                               length++;
                        } else {
                                ok=false;
                        }
-               }
+               } // while
 
                bbSetOutputOut( imageoutput );
                bbSetOutputFinalPoint( lstPointOut );
-
+               bbSetOutputLength( length );
                bbSetOutputLstPathXOut( lstPathXOut );
                bbSetOutputLstPathYOut( lstPathYOut );
                bbSetOutputLstPathZOut( lstPathZOut );
index a86d68e405ce696c82f6225c7da69cbe80dc2bb2..9fc412ac7259ebb802a070003a55f45e589b3a46 100644 (file)
@@ -28,6 +28,7 @@ class bbcreaVtk_EXPORT DistanceMap
   BBTK_DECLARE_INPUT(Point2, std::vector<int>);
 
   BBTK_DECLARE_OUTPUT(Out,vtkImageData*);
+  BBTK_DECLARE_OUTPUT(Length, int );
   BBTK_DECLARE_OUTPUT(FinalPoint,std::vector<int>);
   BBTK_DECLARE_OUTPUT(LstPathXOut,std::vector<int>);
   BBTK_DECLARE_OUTPUT(LstPathYOut,std::vector<int>);
@@ -55,6 +56,7 @@ BBTK_BEGIN_DESCRIBE_BLACK_BOX(DistanceMap,bbtk::AtomicBlackBox);
     BBTK_INPUT(DistanceMap,Point2,"End point (There is no guarantee of reaching this point.)",std::vector<int>,"");
 
     BBTK_OUTPUT(DistanceMap,Out,"Output image",vtkImageData*,"");
+    BBTK_OUTPUT(DistanceMap,Length,"Path Length",int,"");
     BBTK_OUTPUT(DistanceMap,FinalPoint,"Final Point",std::vector<int>,"");
     BBTK_OUTPUT(DistanceMap,LstPathXOut,"Vector path X",std::vector<int>,"");
     BBTK_OUTPUT(DistanceMap,LstPathYOut,"Vector path Y",std::vector<int>,"");
index 5836b62e5d1af5babe4bd0ddb595865811658a40..debccc0b0f0cbe37c6732d0567e4430eee67ecd4 100644 (file)
@@ -13,9 +13,6 @@ BBTK_BLACK_BOX_IMPLEMENTATION(ImageContinuousErode3D,bbtk::AtomicBlackBox);
 
 void ImageContinuousErode3D::Process()
 {
-printf("EED ImageContinuousErode3D::Process Repetitions=%d\n", bbGetInputRepetitions() );
-printf("EED ImageContinuousErode3D::Process XYZ=%f %f %f\n", bbGetInputX(), bbGetInputY(), bbGetInputZ() );
-
                vtkImageData* result = erodeFilterRecursive(bbGetInputImage(), bbGetInputRepetitions(), bbGetInputX(),bbGetInputY(),bbGetInputZ());
                bbSetOutputOut(result);
 }