X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=bbtk%2Fsrc%2FbbcreaMaracasVisuChangeInformationPoint3Dto2D.cxx;h=3f66509cb76826c0430958d80016c047709567cf;hb=db86dba6381cc26c3fa1070608b2ac56abeb823c;hp=f60814bb826dcfb8921911b361fb34e55b0149a3;hpb=f2db891d132e926233f6a4d7f1b5a8e615cc7c4b;p=creaMaracasVisu.git diff --git a/bbtk/src/bbcreaMaracasVisuChangeInformationPoint3Dto2D.cxx b/bbtk/src/bbcreaMaracasVisuChangeInformationPoint3Dto2D.cxx index f60814b..3f66509 100644 --- a/bbtk/src/bbcreaMaracasVisuChangeInformationPoint3Dto2D.cxx +++ b/bbtk/src/bbcreaMaracasVisuChangeInformationPoint3Dto2D.cxx @@ -29,7 +29,51 @@ void ChangeInformationPoint3Dto2D::Process() // bbSetOutputOut( bbGetInputIn() ); // std::cout << "Output value = " < normal; + std::vector outpoint; + + if ( bbGetInputInPoint().size()==3 ) + { + + if (bbGetInputDirection() == 0) + { + normal.push_back(1); + normal.push_back(0); + normal.push_back(0); + bbSetOutputNormalVector(normal); + outpoint.push_back( bbGetInputInPoint()[1] ); + outpoint.push_back( bbGetInputInPoint()[2] ); + outpoint.push_back( bbGetInputInPoint()[0] ); + bbSetOutputOutPoint(outpoint); + } // if direction 0 + + if (bbGetInputDirection() == 1) + { + normal.push_back(0); + normal.push_back(1); + normal.push_back(0); + bbSetOutputNormalVector(normal); + outpoint.push_back( bbGetInputInPoint()[0] ); + outpoint.push_back( bbGetInputInPoint()[2] ); + outpoint.push_back( bbGetInputInPoint()[1] ); + bbSetOutputOutPoint(outpoint); + } // if direction 0 + + if (bbGetInputDirection() == 2) + { + normal.push_back(0); + normal.push_back(0); + normal.push_back(1); + bbSetOutputNormalVector(normal); + outpoint.push_back( bbGetInputInPoint()[0] ); + outpoint.push_back( bbGetInputInPoint()[1] ); + outpoint.push_back( bbGetInputInPoint()[2] ); + bbSetOutputOutPoint(outpoint); + } // if direction 0 + + } // if bbGetInputInPoint Size + } //===== // 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) @@ -40,7 +84,7 @@ void ChangeInformationPoint3Dto2D::bbUserSetDefaultValues() // SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX // Here we initialize the input 'In' to 0 -// bbSetInputIn(0); + bbSetInputDirection(2); } //=====