diff --git a/CodeGenere/File2String/Str_SuperposImage.cpp b/CodeGenere/File2String/Str_SuperposImage.cpp index 82e06f8b0b..c61252bc48 100644 --- a/CodeGenere/File2String/Str_SuperposImage.cpp +++ b/CodeGenere/File2String/Str_SuperposImage.cpp @@ -1,5 +1,5 @@ #include "StdAfx.h" -const char * (theNameVar_SuperposImage[1993]) = { +const char * (theNameVar_SuperposImage[1994]) = { "\n", "\n", "\n", @@ -1653,6 +1653,7 @@ const char * (theNameVar_SuperposImage[1993]) = { " \n", " \n", " \n", +" \n", "\n", "\n", "\n", diff --git a/include/XML_GEN/SuperposImage.h b/include/XML_GEN/SuperposImage.h index f734eb66d2..f33c629c2c 100644 --- a/include/XML_GEN/SuperposImage.h +++ b/include/XML_GEN/SuperposImage.h @@ -7403,10 +7403,14 @@ class cXml_SLSRay Pt3dr & P2(); const Pt3dr & P2()const ; + + std::list< Pt3dr > & P3(); + const std::list< Pt3dr > & P3()const ; private: double mIndCol; Pt3dr mP1; Pt3dr mP2; + std::list< Pt3dr > mP3; }; cElXMLTree * ToXMLTree(const cXml_SLSRay &); diff --git a/include/XML_GEN/SuperposImage.xml b/include/XML_GEN/SuperposImage.xml index bcf51be930..fa70e35302 100644 --- a/include/XML_GEN/SuperposImage.xml +++ b/include/XML_GEN/SuperposImage.xml @@ -1651,6 +1651,7 @@ + diff --git a/src/SamplesLibElise/CPP_TestER.cpp b/src/SamplesLibElise/CPP_TestER.cpp index 29af123f33..1703ab266b 100644 --- a/src/SamplesLibElise/CPP_TestER.cpp +++ b/src/SamplesLibElise/CPP_TestER.cpp @@ -40,7 +40,7 @@ Header-MicMac-eLiSe-25/06/2007*/ #include "StdAfx.h" #include "../uti_phgrm/Apero/cCameraRPC.h" #include "general/ptxd.h" - +#include "../../include/im_tpl/cPtOfCorrel.h" void CheckBounds(Pt2dr & aPmin, Pt2dr & aPmax, const Pt2dr & aP, bool & IS_INI); @@ -1150,7 +1150,6 @@ int anAppli_PFM2Tiff::DoTif() ReadPFMHeader(aFO); - std::cout << "EEEEEEEEEE Sz=" << mSz << "\n"; SkipSpace(aFO); @@ -1188,8 +1187,10 @@ int anAppli_PFM2Tiff::DoTif() ELISE_ASSERT(false,"anAppli_PFM2Tiff::DoTif(): File is too short "); for (int aK1=0; aK1 mDirs; private : const std::string mName; ElSeg3D mOC; + Pt2dr mPP; }; cImDir::cImDir(const std::string &aName) : @@ -1294,6 +1299,12 @@ ElSeg3D & cImDir::OC() const ElSeg3D & cImDir::OC()const { return mOC; } +Pt2dr & cImDir::PP() +{ return mPP; } + +const Pt2dr & cImDir::PP()const +{ return mPP; } + class Appli_ImPts2Dir { public : @@ -1325,14 +1336,14 @@ Appli_ImPts2Dir::Appli_ImPts2Dir(int argc,char ** argv) : mSetIm (0) { std::string aPattern; - std::vector aCirc;//not implemented for now + std::vector aCircV = {"100","500"};//not implemented for now ElInitArgMain ( argc, argv, LArgMain() << EAMC(aPattern,"Pattern of images") << EAMC(mOri,"Orientation directory"), - LArgMain() << EAM (aCirc,"Circ",true,"Vector of circle radii") + LArgMain() << EAM (aCircV,"Circ",true,"Vector of circle radii, Def=[100,500] px") << EAM (mOut,"Out",true,"Output file name") ); @@ -1346,9 +1357,22 @@ Appli_ImPts2Dir::Appli_ImPts2Dir(int argc,char ** argv) : mSetIm = mICNM->Get(mIms); mNbIm = (int)mSetIm->size(); - mListPt2d.push_back(Pt2dr(100,100)); - mListPt2d.push_back(Pt2dr(200,200)); + //circles wrt to "0" + for ( auto aCircRad : aCircV ) + { + double aRadCur = RequireFromString(aCircRad,"Radius i"); + + cFastCriterCompute * aCircRI = cFastCriterCompute::Circle(aRadCur); + const std::vector & aVPt = aCircRI->VPt(); + + for ( auto aFlux : aVPt ) + mListPt2d.push_back(Pt2dr(aFlux.x,aFlux.y)); + + } mNbPts = int(mListPt2d.size()); + + + } int Appli_ImPts2Dir::DoCalc() @@ -1364,11 +1388,13 @@ int Appli_ImPts2Dir::DoCalc() //optical center CamStenope * aCam = aCG->DownCastCS(); mMapImDirs[aNameIm]->OC() = aCam->Capteur2RayTer(aCam->PP()); + mMapImDirs[aNameIm]->PP() = aCam->PP(); - + for (auto aKP : mListPt2d) { - ElSeg3D aDir = aCG->Capteur2RayTer(aKP); + // std::cout << aKP + mMapImDirs[aNameIm]->PP() << " 0.0 " << "\n"; + ElSeg3D aDir = aCG->Capteur2RayTer(aKP + mMapImDirs[aNameIm]->PP()); mMapImDirs[aNameIm]->mDirs.push_back(aDir); } @@ -1402,7 +1428,7 @@ int Appli_ImPts2Dir::Save() for (int aP=0; aPPP(); aXmlDir.P1() = mMapImDirs[aNameIm]->mDirs.at(aP).P0(); aXmlDir.P2() = mMapImDirs[aNameIm]->mDirs.at(aP).P1(); diff --git a/src/XML_GEN/SuperposImage.cpp b/src/XML_GEN/SuperposImage.cpp index 868611c334..a773e25a0f 100644 --- a/src/XML_GEN/SuperposImage.cpp +++ b/src/XML_GEN/SuperposImage.cpp @@ -24040,11 +24040,31 @@ const Pt3dr & cXml_SLSRay::P2()const return mP2; } + +std::list< Pt3dr > & cXml_SLSRay::P3() +{ + return mP3; +} + +const std::list< Pt3dr > & cXml_SLSRay::P3()const +{ + return mP3; +} + void BinaryUnDumpFromFile(cXml_SLSRay & anObj,ELISE_fp & aFp) { BinaryUnDumpFromFile(anObj.IndCol(),aFp); BinaryUnDumpFromFile(anObj.P1(),aFp); BinaryUnDumpFromFile(anObj.P2(),aFp); + { int aNb; + BinaryUnDumpFromFile(aNb,aFp); + for( int aK=0 ; aK::const_iterator iT=anObj.P3().begin(); + iT!=anObj.P3().end(); + iT++ + ) + BinaryDumpInFile(aFp,*iT); } cElXMLTree * ToXMLTree(const cXml_SLSRay & anObj) @@ -24061,6 +24087,12 @@ cElXMLTree * ToXMLTree(const cXml_SLSRay & anObj) aRes->AddFils(::ToXMLTree(std::string("IndCol"),anObj.IndCol())->ReTagThis("IndCol")); aRes->AddFils(::ToXMLTree(std::string("P1"),anObj.P1())->ReTagThis("P1")); aRes->AddFils(::ToXMLTree(std::string("P2"),anObj.P2())->ReTagThis("P2")); + for + ( std::list< Pt3dr >::const_iterator it=anObj.P3().begin(); + it !=anObj.P3().end(); + it++ + ) + aRes->AddFils(::ToXMLTree(std::string("P3"),(*it))->ReTagThis("P3")); aRes->mGXml = anObj.mGXml; XMLPopContext(anObj.mGXml); return aRes; @@ -24076,9 +24108,11 @@ void xml_init(cXml_SLSRay & anObj,cElXMLTree * aTree) xml_init(anObj.P1(),aTree->Get("P1",1)); //tototo xml_init(anObj.P2(),aTree->Get("P2",1)); //tototo + + xml_init(anObj.P3(),aTree->GetAll("P3",false,1)); } -std::string Mangling( cXml_SLSRay *) {return "004804A8DCBF1BA1FBBF";}; +std::string Mangling( cXml_SLSRay *) {return "C65F5A5A245D11C2FD3F";}; double & cXml_OneLineSLS::IndLine() @@ -24153,7 +24187,7 @@ void xml_init(cXml_OneLineSLS & anObj,cElXMLTree * aTree) xml_init(anObj.Rays(),aTree->GetAll("Rays",false,1)); } -std::string Mangling( cXml_OneLineSLS *) {return "400084BE18ADACC5FA3F";}; +std::string Mangling( cXml_OneLineSLS *) {return "AC21AFDE433F75E2FD3F";}; cTplValGesInit< bool > & cXml_ScanLineSensor::LineImIsScanLine() @@ -24351,7 +24385,7 @@ void xml_init(cXml_ScanLineSensor & anObj,cElXMLTree * aTree) xml_init(anObj.Lines(),aTree->GetAll("Lines",false,1)); } -std::string Mangling( cXml_ScanLineSensor *) {return "B848536DE6351DA5FB3F";}; +std::string Mangling( cXml_ScanLineSensor *) {return "024C201F20E752A4FDBF";}; std::vector< cMonomXY > & cXml_PolynXY::Monomes() diff --git a/src/uti_phgrm/CPP_Malt.cpp b/src/uti_phgrm/CPP_Malt.cpp index 67dccf039a..8a46da8b6f 100644 --- a/src/uti_phgrm/CPP_Malt.cpp +++ b/src/uti_phgrm/CPP_Malt.cpp @@ -956,7 +956,6 @@ cAppliMalt::cAppliMalt(int argc,char ** argv) : double aPCStd = 0.0; std::string aMCorPoncCal = "xml"; - // Proposition de reecriture MPD pour limiter duplication de code if (EAMIsInit(&a12PixParam)) { // Je pensei pas de pb pour admettre de de 0 a 5 arg, puisque tous ont une val def raisonnable ? @@ -974,33 +973,7 @@ cAppliMalt::cAppliMalt(int argc,char ** argv) : aMCorPoncCal = a12PixParam[4]; } -/* - if (int(a12PixParam.size())==3) - { - aZoomInitMCPonc = RequireFromString(a12PixParam[0],"One-Two Pixel Matching : ZoomInit"); - aPdsAttPix = RequireFromString(a12PixParam[1],"One-Two Pixel Matching : PdsAttPix"); - aPCCroise = RequireFromString(a12PixParam[2],"One-Two Pixel Matching : aPCCroise"); - - } - else if (int(a12PixParam.size())==4) - { - aZoomInitMCPonc = RequireFromString(a12PixParam[0],"One-Two Pixel Matching : ZoomInit"); - aPdsAttPix = RequireFromString(a12PixParam[1],"One-Two Pixel Matching : PdsAttPix"); - aPCCroise = RequireFromString(a12PixParam[2],"One-Two Pixel Matching : PCCroise"); - aPCStd = RequireFromString(a12PixParam[3],"One-Two Pixel Matching : PCStd"); - } - else if (int(a12PixParam.size())==5) - { - aZoomInitMCPonc = RequireFromString(a12PixParam[0],"One-Two Pixel Matching : ZoomInit"); - aPdsAttPix = RequireFromString(a12PixParam[1],"One-Two Pixel Matching : PdsAttPix"); - aPCCroise = RequireFromString(a12PixParam[2],"One-Two Pixel Matching : PCCroise"); - aPCStd = RequireFromString(a12PixParam[3],"One-Two Pixel Matching : PCStd"); - aMCorPoncCal = a12PixParam[4]; - } - else - ELISE_ASSERT( !((a12PixParam.size()==2) || (a12PixParam.size()>5)) ,"if 12PixP option used must be of size at least three"); -*/ if (EAMIsInit(&mDoOrtho) && mDoOrtho) {