X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=bbtk_creaVtk_PKG%2Fsrc%2FbbcreaVtkMultipleOperations.cxx;h=b5b02b8816251afe10fc626e258a8a282513c652;hb=500bc2ff1c3fe51a9ce94324dee722fb2f7bfd36;hp=fe7b4fab56963e4c5a56b7a50b268c5500363205;hpb=8b897e95b16fec9d4da9e687b750101f6f16e173;p=creaVtk.git diff --git a/bbtk_creaVtk_PKG/src/bbcreaVtkMultipleOperations.cxx b/bbtk_creaVtk_PKG/src/bbcreaVtkMultipleOperations.cxx index fe7b4fa..b5b02b8 100644 --- a/bbtk_creaVtk_PKG/src/bbcreaVtkMultipleOperations.cxx +++ b/bbtk_creaVtk_PKG/src/bbcreaVtkMultipleOperations.cxx @@ -47,7 +47,7 @@ void MultipleOperations::Process() resultImage->AllocateScalars( bbGetInputInLst()[0]->GetScalarType(),1 ); long int index,size=dimXImage*dimYImage*dimZImage; DEF_POINTER_IMAGE_VTK_CREA(vOut,ssOut,pOut,stOut,resultImage ) - if (bbGetInputType()==20) + if ((bbGetInputType()==20) || (bbGetInputType()==21) ) { long int k1omp=(double)(size-1)*0.0; @@ -59,24 +59,35 @@ long int k6omp=(double)(size-1)*1.0; printf("EED MultipleOperations::Process (with openmp)\n"); #pragma omp parallel for - for (index=0;indexGetScalarPointer() ); GETVALUE2_VTK_CREA(vIn,pIn,stIn,index) if (iLst!=0) { - acumDiff = acumDiff+abs(vIn-vInBack); - } - vInBack=vIn; + if (bbGetInputType()==20) + { + acumDiff = acumDiff+abs(vIn-vInBack); + vInBack=vIn; + } // if 20 + if (bbGetInputType()==21) + { + acumDiff = acumDiff+vIn; + } // if 20 + } } // for iLst acumDiff = acumDiff/sizeLst; SETVALUE2_VTK_CREA(acumDiff,pOut,stOut,index)