X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=bbtk_creaVtk_PKG%2Fsrc%2FbbcreaVtkPointPickerNearest.cxx;h=12ea924ef258844f9a0b5fafc040904e1d87ab32;hb=043ad5f6e44170fbd8e67868bdb6861e48a544b2;hp=e7534a069ab55cb9b223f1a665fa9e9c9556a7f5;hpb=c30d7fdcd46f34dd43b2ae4974e883494f2f64e7;p=creaVtk.git diff --git a/bbtk_creaVtk_PKG/src/bbcreaVtkPointPickerNearest.cxx b/bbtk_creaVtk_PKG/src/bbcreaVtkPointPickerNearest.cxx index e7534a0..12ea924 100644 --- a/bbtk_creaVtk_PKG/src/bbcreaVtkPointPickerNearest.cxx +++ b/bbtk_creaVtk_PKG/src/bbcreaVtkPointPickerNearest.cxx @@ -31,7 +31,6 @@ void PointPickerNearest::Process() // * TYPE is the C++ type of the input/output // (the one provided in the attribute 'type' of the tag 'input') - std::vector lstNormal; std::vector refPoint = bbGetInputPoint(); @@ -85,9 +84,24 @@ void PointPickerNearest::Process() } // if iBack bbSetOutputPointId( iBack ); bbSetOutputNormal( lstNormal ); + std::vector lstPointOut; + if (iBack>=0) + { + points->GetPoint(iBack,p); + lstPointOut.push_back(p[0]); + lstPointOut.push_back(p[1]); + lstPointOut.push_back(p[2]); + }// if iBack + bbSetOutputPointOut( lstPointOut ); + bbSignalOutputModification(); } else { bbSetOutputPointId( -1 ); + lstNormal.push_back(0); + lstNormal.push_back(1); + lstNormal.push_back(2); bbSetOutputNormal( lstNormal ); + bbSetOutputPointOut( bbGetInputPoint() ); + bbSignalOutputModification(); } } //===== @@ -100,7 +114,7 @@ void PointPickerNearest::bbUserSetDefaultValues() // Here we initialize the input 'In' to 0 bbSetInputActive(false); bbSetInputMesh(NULL); - bbSetInputBorder(10); + bbSetInputBorder(5); } //===== // 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)