X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=packages%2Fstd%2Fsrc%2FbbstdVectorFilterDouble.cxx;h=812f6469d399f802bc97db34172ee1609e9789f3;hb=3756cecc1ce2a296d9a19628ecb49248e7472f09;hp=9a948a85367b3884d62c19964248e2a20502f9bb;hpb=427d8c0ac838ab789a57b28f62a7f9ff243e7b60;p=bbtk.git diff --git a/packages/std/src/bbstdVectorFilterDouble.cxx b/packages/std/src/bbstdVectorFilterDouble.cxx index 9a948a8..812f646 100644 --- a/packages/std/src/bbstdVectorFilterDouble.cxx +++ b/packages/std/src/bbstdVectorFilterDouble.cxx @@ -3,6 +3,8 @@ //===== #include "bbstdVectorFilterDouble.h" #include "bbstdPackage.h" +#include "math.h" + namespace bbstd { @@ -113,7 +115,7 @@ void VectorFilterDouble::Process() int ipLstvec2; double iLine; int sizeLines = (*pLstVec[0]).size(); - double step = (double)sizeLines/(double)bbGetInputk1(); + double step = (double)sizeLines/((double)bbGetInputk1()-1); for (iLine=0 ; iLine0) && (In3.size()==3) ) + { + int i; + double x1 = In3[0]; // pointX of pointXYZ + double y1 = In3[1]; // pointY of pointXYZ + double z1 = In3[2]; // pointZ of pointXYZ + double distMin = 100000; + double dist; + double x2; + double y2; + double z2; + Out0.push_back( -1 ); + Out1.push_back( -999 ); + Out1.push_back( -999 ); + Out1.push_back( -999 ); + for (i=0;i