X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=packages%2Fstd%2Fsrc%2FbbstdVectorFilterDouble.cxx;h=c132e918a19f4bdf67b98d34977c885849eeb50b;hb=8e21d66a76ff9117acc7dbbaec9123c56115ff56;hp=30798dffb8d168dd85123b3f04c2f38627fae647;hpb=fc51206edaff3b433039cb38969d308e750fc277;p=bbtk.git diff --git a/packages/std/src/bbstdVectorFilterDouble.cxx b/packages/std/src/bbstdVectorFilterDouble.cxx index 30798df..c132e91 100644 --- a/packages/std/src/bbstdVectorFilterDouble.cxx +++ b/packages/std/src/bbstdVectorFilterDouble.cxx @@ -15,7 +15,6 @@ BBTK_BLACK_BOX_IMPLEMENTATION(VectorFilterDouble,bbtk::AtomicBlackBox); //===== void VectorFilterDouble::Process() { - // THE MAIN PROCESSING METHOD BODY // Here we simply set the input 'In' value to the output 'Out' // And print out the output value @@ -27,7 +26,6 @@ void VectorFilterDouble::Process() // (the one provided in the attribute 'name' of the tag 'input') // * TYPE is the C++ type of the input/output // (the one provided in the attribute 'type' of the tag 'input') - std::vector< std::vector * > pLstVec; std::vector< std::vector * > pLstVecOut; std::vector In0 = bbGetInputIn0(); @@ -40,7 +38,6 @@ void VectorFilterDouble::Process() std::vector In7 = bbGetInputIn7(); std::vector In8 = bbGetInputIn8(); std::vector In9 = bbGetInputIn9(); - if (bbGetInputIn0().size()!=0) { pLstVec.push_back( &In0 ); } if (bbGetInputIn1().size()!=0) { pLstVec.push_back( &In1 ); } if (bbGetInputIn2().size()!=0) { pLstVec.push_back( &In2 ); } @@ -51,7 +48,6 @@ void VectorFilterDouble::Process() if (bbGetInputIn7().size()!=0) { pLstVec.push_back( &In7 ); } if (bbGetInputIn8().size()!=0) { pLstVec.push_back( &In8 ); } if (bbGetInputIn9().size()!=0) { pLstVec.push_back( &In9 ); } - std::vector Out0; std::vector Out1; std::vector Out2; @@ -62,7 +58,6 @@ void VectorFilterDouble::Process() std::vector Out7; std::vector Out8; std::vector Out9; - pLstVecOut.push_back( &Out0 ); pLstVecOut.push_back( &Out1 ); pLstVecOut.push_back( &Out2 ); @@ -73,49 +68,48 @@ void VectorFilterDouble::Process() pLstVecOut.push_back( &Out7 ); pLstVecOut.push_back( &Out8 ); pLstVecOut.push_back( &Out9 ); - - if (bbGetInputType()==0) // Erase duplicate lines { - bool okSizeVec=true; - int ipLstvec; - for (ipLstvec=1;ipLstvec=2 } // for pLstVec } // Type==2 - - - if (bbGetInputType()==3) // Addition k1 + if (bbGetInputType()==3) // Addition k1[0] { int ipLstvec; int i; @@ -166,13 +155,12 @@ void VectorFilterDouble::Process() size=(*pLstVec[ipLstvec]).size(); for (i=0;i0) && (In3.size()==3) ) { int i; @@ -382,8 +343,130 @@ void VectorFilterDouble::Process() printf("EED Warnning VectorFilterDouble::Process() For Type 10 the size of the vectors are not coherent.\n"); }// if size } // Type 10 - - + if (bbGetInputType()==11) // Nearest point in vector + { + int i; + int sizeLstX = In0.size(); // lstX + int sizeLstY = In1.size(); // lstY + int sizeLstZ = In2.size(); // lstZ + std::vector spc = bbGetInputk1(); + if (spc.size()>=1) + { + for (i=0;i=2) + { + for (i=0;i=3) + { + for (i=0;i spc = bbGetInputk1(); + if (spc.size()>=1) + { + if (spc[0]!=0) + { + for (i=0;i=2) + { + if (spc[0]!=0) + { + for (i=0;i=3) + { + if (spc[0]!=0) + { + for (i=0;i k1 =bbGetInputk1(); + int iSeg, sizeLstIndex = In3.size(); + int iGeneral=0; + int i, size; + for (iSeg = 0; iSeg k1; + k1.push_back(0); + bbSetInputk1(k1); } + //===== // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost) //===== void VectorFilterDouble::bbUserInitializeProcessing() { - // THE INITIALIZATION METHOD BODY : // Here does nothing // but this is where you should allocate the internal/output pointers -// if any - - +// if any } + //===== // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost) //===== void VectorFilterDouble::bbUserFinalizeProcessing() { - // THE FINALIZATION METHOD BODY : // Here does nothing // but this is where you should desallocate the internal/output pointers // if any - -} } -// EO namespace bbstd + +}// EO namespace bbstd