From: Eduardo DAVILA Date: Fri, 19 Jul 2019 07:03:31 +0000 (+0200) Subject: #3276 creaVtk Feature New Normal - DistanceMap Box X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=76f1142e5d1a48a2e929e5a732f7b863d6b3497b;p=creaVtk.git #3276 creaVtk Feature New Normal - DistanceMap Box --- diff --git a/bbtk_creaVtk_PKG/src/bbcreaVtkDistanceMap.cxx b/bbtk_creaVtk_PKG/src/bbcreaVtkDistanceMap.cxx index 1c50d0f..787c1ef 100644 --- a/bbtk_creaVtk_PKG/src/bbcreaVtkDistanceMap.cxx +++ b/bbtk_creaVtk_PKG/src/bbcreaVtkDistanceMap.cxx @@ -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 ); diff --git a/bbtk_creaVtk_PKG/src/bbcreaVtkDistanceMap.h b/bbtk_creaVtk_PKG/src/bbcreaVtkDistanceMap.h index a86d68e..9fc412a 100644 --- a/bbtk_creaVtk_PKG/src/bbcreaVtkDistanceMap.h +++ b/bbtk_creaVtk_PKG/src/bbcreaVtkDistanceMap.h @@ -28,6 +28,7 @@ class bbcreaVtk_EXPORT DistanceMap BBTK_DECLARE_INPUT(Point2, std::vector); BBTK_DECLARE_OUTPUT(Out,vtkImageData*); + BBTK_DECLARE_OUTPUT(Length, int ); BBTK_DECLARE_OUTPUT(FinalPoint,std::vector); BBTK_DECLARE_OUTPUT(LstPathXOut,std::vector); BBTK_DECLARE_OUTPUT(LstPathYOut,std::vector); @@ -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,""); BBTK_OUTPUT(DistanceMap,Out,"Output image",vtkImageData*,""); + BBTK_OUTPUT(DistanceMap,Length,"Path Length",int,""); BBTK_OUTPUT(DistanceMap,FinalPoint,"Final Point",std::vector,""); BBTK_OUTPUT(DistanceMap,LstPathXOut,"Vector path X",std::vector,""); BBTK_OUTPUT(DistanceMap,LstPathYOut,"Vector path Y",std::vector,""); diff --git a/bbtk_creaVtk_PKG/src/bbcreaVtkImageContinuousErode3D.cxx b/bbtk_creaVtk_PKG/src/bbcreaVtkImageContinuousErode3D.cxx index 5836b62..debccc0 100644 --- a/bbtk_creaVtk_PKG/src/bbcreaVtkImageContinuousErode3D.cxx +++ b/bbtk_creaVtk_PKG/src/bbcreaVtkImageContinuousErode3D.cxx @@ -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); }