X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=bbtk_creaVtk_PKG%2Fsrc%2FbbcreaVtkPointPickerNearest.cxx;h=12ea924ef258844f9a0b5fafc040904e1d87ab32;hb=11f8c0afac719608c751486ff9a5bedf960192ed;hp=fc2442a9977d9e9066fa24d9500a06ab067498d8;hpb=980386fede464fc81969cefaa099b2994d1d6ea0;p=creaVtk.git diff --git a/bbtk_creaVtk_PKG/src/bbcreaVtkPointPickerNearest.cxx b/bbtk_creaVtk_PKG/src/bbcreaVtkPointPickerNearest.cxx index fc2442a..12ea924 100644 --- a/bbtk_creaVtk_PKG/src/bbcreaVtkPointPickerNearest.cxx +++ b/bbtk_creaVtk_PKG/src/bbcreaVtkPointPickerNearest.cxx @@ -31,13 +31,9 @@ void PointPickerNearest::Process() // * TYPE is the C++ type of the input/output // (the one provided in the attribute 'type' of the tag 'input') - printf ("EED PointPickerNearest::Process Start\n"); - std::vector lstNormal; std::vector refPoint = bbGetInputPoint(); - printf ("EED PointPickerNearest::Process 1\n"); - if ((bbGetInputActive()==true) && ( bbGetInputMesh()!=NULL) && (refPoint.size()==3) ) { double p[3]; @@ -48,7 +44,6 @@ void PointPickerNearest::Process() vtkPoints *points = bbGetInputMesh()->GetPoints(); long size = points->GetNumberOfPoints(); double border = bbGetInputBorder() * bbGetInputBorder(); - printf ("EED PointPickerNearest::Process 2\n"); for ( i=0 ; iGetPoint(i,p); @@ -65,7 +60,6 @@ void PointPickerNearest::Process() } // if distMax } // for i - printf ("EED PointPickerNearest::Process 3\n"); if (iBack>=0) { vtkPointData *pointdata = bbGetInputMesh()->GetPointData(); @@ -79,12 +73,10 @@ void PointPickerNearest::Process() printf("EED creaVtkCallbackPointPicker::Execute dataarray=%s n=%ld p=%ld\n", dataarray->GetName(),dataarray->GetNumberOfValues() ,polydata->GetNumberOfPoints() ); } // for i */ - printf ("EED PointPickerNearest::Process 4\n"); dataarray = pointdata->GetNormals(); if (dataarray!=NULL) { pValue = dataarray->GetTuple3( iBack ); - printf ("EED PointPickerNearest::Process 5\n"); lstNormal.push_back(pValue[0]); lstNormal.push_back(pValue[1]); lstNormal.push_back(pValue[2]); @@ -92,16 +84,16 @@ void PointPickerNearest::Process() } // if iBack bbSetOutputPointId( iBack ); bbSetOutputNormal( lstNormal ); - printf ("EED PointPickerNearest::Process 6 %ld\n", iBack); std::vector lstPointOut; - if (iBack>=0){ + if (iBack>=0) + { points->GetPoint(iBack,p); lstPointOut.push_back(p[0]); lstPointOut.push_back(p[1]); lstPointOut.push_back(p[2]); - printf ("EED PointPickerNearest::Process 7 pointOut=%f %f %f\n", lstPointOut[0],lstPointOut[1],lstPointOut[2]); }// if iBack bbSetOutputPointOut( lstPointOut ); + bbSignalOutputModification(); } else { bbSetOutputPointId( -1 ); lstNormal.push_back(0); @@ -109,10 +101,8 @@ void PointPickerNearest::Process() lstNormal.push_back(2); bbSetOutputNormal( lstNormal ); bbSetOutputPointOut( bbGetInputPoint() ); + bbSignalOutputModification(); } - - printf ("EED PointPickerNearest::Process END\n"); - } //===== // 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)