X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=packages%2Fstd%2Fsrc%2FbbstdVectorFilterDouble.cxx;h=c132e918a19f4bdf67b98d34977c885849eeb50b;hb=dc4bdf0496eecfd676835fb9c783c867cfc5d901;hp=88370e28fa392ebd62d14121e3afddb1f0a6323d;hpb=9e8c95c96acaea8851733d20090bf6de7eed1269;p=bbtk.git diff --git a/packages/std/src/bbstdVectorFilterDouble.cxx b/packages/std/src/bbstdVectorFilterDouble.cxx index 88370e2..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,8 +68,6 @@ void VectorFilterDouble::Process() pLstVecOut.push_back( &Out7 ); pLstVecOut.push_back( &Out8 ); pLstVecOut.push_back( &Out9 ); - - if (bbGetInputType()==0) // Erase duplicate lines { if (bbGetInputIn0().size()!=0) // At least one element @@ -111,14 +104,12 @@ void VectorFilterDouble::Process() } // if okSizeVec } // bbGetInputIn0() size } // Type==0 - - if (bbGetInputType()==1) // Resize vector { int ipLstvec2; double iLine; int sizeLines = (*pLstVec[0]).size(); - double step = (double)sizeLines/((double)bbGetInputk1()-1); + double step = (double)sizeLines/((double)bbGetInputk1()[0]-1); for (iLine=0 ; iLine=2 } // for pLstVec } // Type==2 - - - if (bbGetInputType()==3) // Addition k1 + if (bbGetInputType()==3) // Addition k1[0] { int ipLstvec; int i; @@ -169,13 +155,12 @@ void VectorFilterDouble::Process() size=(*pLstVec[ipLstvec]).size(); for (i=0;i 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