Skip to content

Commit b750549

Browse files
committed
2 parents e89af12 + c660a5c commit b750549

File tree

6 files changed

+80
-41
lines changed

6 files changed

+80
-41
lines changed

Diff for: CodeGenere/File2String/Str_SuperposImage.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#include "StdAfx.h"
2-
const char * (theNameVar_SuperposImage[1993]) = {
2+
const char * (theNameVar_SuperposImage[1994]) = {
33
"<GenCpp>\n",
44
"\n",
55
"\n",
@@ -1653,6 +1653,7 @@ const char * (theNameVar_SuperposImage[1993]) = {
16531653
" <IndCol Nb=\"1\" Type=\"double\"> </IndCol>\n",
16541654
" <P1 Nb=\"1\" Type=\"Pt3dr\"> </P1>\n",
16551655
" <P2 Nb=\"1\" Type=\"Pt3dr\"> </P2>\n",
1656+
" <P3 Nb=\"*\" Type=\"Pt3dr\"> </P3>\n",
16561657
"</Xml_SLSRay>\n",
16571658
"\n",
16581659
"<Xml_OneLineSLS Nb=\"1\" Class=\"true\" ToReference=\"true\">\n",

Diff for: include/XML_GEN/SuperposImage.h

+4
Original file line numberDiff line numberDiff line change
@@ -7403,10 +7403,14 @@ class cXml_SLSRay
74037403

74047404
Pt3dr & P2();
74057405
const Pt3dr & P2()const ;
7406+
7407+
std::list< Pt3dr > & P3();
7408+
const std::list< Pt3dr > & P3()const ;
74067409
private:
74077410
double mIndCol;
74087411
Pt3dr mP1;
74097412
Pt3dr mP2;
7413+
std::list< Pt3dr > mP3;
74107414
};
74117415
cElXMLTree * ToXMLTree(const cXml_SLSRay &);
74127416

Diff for: include/XML_GEN/SuperposImage.xml

+1
Original file line numberDiff line numberDiff line change
@@ -1651,6 +1651,7 @@
16511651
<IndCol Nb="1" Type="double"> </IndCol>
16521652
<P1 Nb="1" Type="Pt3dr"> </P1>
16531653
<P2 Nb="1" Type="Pt3dr"> </P2>
1654+
<P3 Nb="*" Type="Pt3dr"> </P3>
16541655
</Xml_SLSRay>
16551656

16561657
<Xml_OneLineSLS Nb="1" Class="true" ToReference="true">

Diff for: src/SamplesLibElise/CPP_TestER.cpp

+36-10
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Header-MicMac-eLiSe-25/06/2007*/
4040
#include "StdAfx.h"
4141
#include "../uti_phgrm/Apero/cCameraRPC.h"
4242
#include "general/ptxd.h"
43-
43+
#include "../../include/im_tpl/cPtOfCorrel.h"
4444

4545
void CheckBounds(Pt2dr & aPmin, Pt2dr & aPmax, const Pt2dr & aP, bool & IS_INI);
4646

@@ -1150,7 +1150,6 @@ int anAppli_PFM2Tiff::DoTif()
11501150

11511151
ReadPFMHeader(aFO);
11521152

1153-
std::cout << "EEEEEEEEEE Sz=" << mSz << "\n";
11541153

11551154
SkipSpace(aFO);
11561155

@@ -1188,8 +1187,10 @@ int anAppli_PFM2Tiff::DoTif()
11881187
ELISE_ASSERT(false,"anAppli_PFM2Tiff::DoTif(): File is too short ");
11891188

11901189
for (int aK1=0; aK1<mSz.x; aK1++)
1190+
{
1191+
//std::cout << aLine[aK1] << " " << "\n";
11911192
aRes.SetR(Pt2di(aK1,aK2),aLine[aK1]);
1192-
1193+
}
11931194

11941195
delete[] aLine;
11951196

@@ -1276,11 +1277,15 @@ class cImDir
12761277
ElSeg3D & OC();
12771278
const ElSeg3D & OC()const;
12781279

1280+
Pt2dr & PP();
1281+
const Pt2dr & PP()const;
1282+
12791283
std::vector<ElSeg3D> mDirs;
12801284

12811285
private :
12821286
const std::string mName;
12831287
ElSeg3D mOC;
1288+
Pt2dr mPP;
12841289
};
12851290

12861291
cImDir::cImDir(const std::string &aName) :
@@ -1294,6 +1299,12 @@ ElSeg3D & cImDir::OC()
12941299
const ElSeg3D & cImDir::OC()const
12951300
{ return mOC; }
12961301

1302+
Pt2dr & cImDir::PP()
1303+
{ return mPP; }
1304+
1305+
const Pt2dr & cImDir::PP()const
1306+
{ return mPP; }
1307+
12971308
class Appli_ImPts2Dir
12981309
{
12991310
public :
@@ -1325,14 +1336,14 @@ Appli_ImPts2Dir::Appli_ImPts2Dir(int argc,char ** argv) :
13251336
mSetIm (0)
13261337
{
13271338
std::string aPattern;
1328-
std::vector<std::string> aCirc;//not implemented for now
1339+
std::vector<std::string> aCircV = {"100","500"};//not implemented for now
13291340

13301341
ElInitArgMain
13311342
(
13321343
argc, argv,
13331344
LArgMain() << EAMC(aPattern,"Pattern of images")
13341345
<< EAMC(mOri,"Orientation directory"),
1335-
LArgMain() << EAM (aCirc,"Circ",true,"Vector of circle radii")
1346+
LArgMain() << EAM (aCircV,"Circ",true,"Vector of circle radii, Def=[100,500] px")
13361347
<< EAM (mOut,"Out",true,"Output file name")
13371348
);
13381349

@@ -1346,9 +1357,22 @@ Appli_ImPts2Dir::Appli_ImPts2Dir(int argc,char ** argv) :
13461357
mSetIm = mICNM->Get(mIms);
13471358
mNbIm = (int)mSetIm->size();
13481359

1349-
mListPt2d.push_back(Pt2dr(100,100));
1350-
mListPt2d.push_back(Pt2dr(200,200));
1360+
//circles wrt to "0"
1361+
for ( auto aCircRad : aCircV )
1362+
{
1363+
double aRadCur = RequireFromString<double>(aCircRad,"Radius i");
1364+
1365+
cFastCriterCompute * aCircRI = cFastCriterCompute::Circle(aRadCur);
1366+
const std::vector<Pt2di> & aVPt = aCircRI->VPt();
1367+
1368+
for ( auto aFlux : aVPt )
1369+
mListPt2d.push_back(Pt2dr(aFlux.x,aFlux.y));
1370+
1371+
}
13511372
mNbPts = int(mListPt2d.size());
1373+
1374+
1375+
13521376
}
13531377

13541378
int Appli_ImPts2Dir::DoCalc()
@@ -1364,11 +1388,13 @@ int Appli_ImPts2Dir::DoCalc()
13641388
//optical center
13651389
CamStenope * aCam = aCG->DownCastCS();
13661390
mMapImDirs[aNameIm]->OC() = aCam->Capteur2RayTer(aCam->PP());
1391+
mMapImDirs[aNameIm]->PP() = aCam->PP();
13671392

1368-
1393+
13691394
for (auto aKP : mListPt2d)
13701395
{
1371-
ElSeg3D aDir = aCG->Capteur2RayTer(aKP);
1396+
// std::cout << aKP + mMapImDirs[aNameIm]->PP() << " 0.0 " << "\n";
1397+
ElSeg3D aDir = aCG->Capteur2RayTer(aKP + mMapImDirs[aNameIm]->PP());
13721398

13731399
mMapImDirs[aNameIm]->mDirs.push_back(aDir);
13741400
}
@@ -1402,7 +1428,7 @@ int Appli_ImPts2Dir::Save()
14021428
for (int aP=0; aP<mNbPts; aP++)
14031429
{
14041430
cXml_SingleDir aXmlDir;
1405-
aXmlDir.PIm() = mListPt2d.at(aP);
1431+
aXmlDir.PIm() = mListPt2d.at(aP) + mMapImDirs[aNameIm]->PP();
14061432
aXmlDir.P1() = mMapImDirs[aNameIm]->mDirs.at(aP).P0();
14071433
aXmlDir.P2() = mMapImDirs[aNameIm]->mDirs.at(aP).P1();
14081434

Diff for: src/XML_GEN/SuperposImage.cpp

+37-3
Original file line numberDiff line numberDiff line change
@@ -24040,18 +24040,44 @@ const Pt3dr & cXml_SLSRay::P2()const
2404024040
return mP2;
2404124041
}
2404224042

24043+
24044+
std::list< Pt3dr > & cXml_SLSRay::P3()
24045+
{
24046+
return mP3;
24047+
}
24048+
24049+
const std::list< Pt3dr > & cXml_SLSRay::P3()const
24050+
{
24051+
return mP3;
24052+
}
24053+
2404324054
void BinaryUnDumpFromFile(cXml_SLSRay & anObj,ELISE_fp & aFp)
2404424055
{
2404524056
BinaryUnDumpFromFile(anObj.IndCol(),aFp);
2404624057
BinaryUnDumpFromFile(anObj.P1(),aFp);
2404724058
BinaryUnDumpFromFile(anObj.P2(),aFp);
24059+
{ int aNb;
24060+
BinaryUnDumpFromFile(aNb,aFp);
24061+
for( int aK=0 ; aK<aNb ; aK++)
24062+
{
24063+
Pt3dr aVal;
24064+
BinaryUnDumpFromFile(aVal,aFp);
24065+
anObj.P3().push_back(aVal);
24066+
}
24067+
} ;
2404824068
}
2404924069

2405024070
void BinaryDumpInFile(ELISE_fp & aFp,const cXml_SLSRay & anObj)
2405124071
{
2405224072
BinaryDumpInFile(aFp,anObj.IndCol());
2405324073
BinaryDumpInFile(aFp,anObj.P1());
2405424074
BinaryDumpInFile(aFp,anObj.P2());
24075+
BinaryDumpInFile(aFp,(int)anObj.P3().size());
24076+
for( std::list< Pt3dr >::const_iterator iT=anObj.P3().begin();
24077+
iT!=anObj.P3().end();
24078+
iT++
24079+
)
24080+
BinaryDumpInFile(aFp,*iT);
2405524081
}
2405624082

2405724083
cElXMLTree * ToXMLTree(const cXml_SLSRay & anObj)
@@ -24061,6 +24087,12 @@ cElXMLTree * ToXMLTree(const cXml_SLSRay & anObj)
2406124087
aRes->AddFils(::ToXMLTree(std::string("IndCol"),anObj.IndCol())->ReTagThis("IndCol"));
2406224088
aRes->AddFils(::ToXMLTree(std::string("P1"),anObj.P1())->ReTagThis("P1"));
2406324089
aRes->AddFils(::ToXMLTree(std::string("P2"),anObj.P2())->ReTagThis("P2"));
24090+
for
24091+
( std::list< Pt3dr >::const_iterator it=anObj.P3().begin();
24092+
it !=anObj.P3().end();
24093+
it++
24094+
)
24095+
aRes->AddFils(::ToXMLTree(std::string("P3"),(*it))->ReTagThis("P3"));
2406424096
aRes->mGXml = anObj.mGXml;
2406524097
XMLPopContext(anObj.mGXml);
2406624098
return aRes;
@@ -24076,9 +24108,11 @@ void xml_init(cXml_SLSRay & anObj,cElXMLTree * aTree)
2407624108
xml_init(anObj.P1(),aTree->Get("P1",1)); //tototo
2407724109

2407824110
xml_init(anObj.P2(),aTree->Get("P2",1)); //tototo
24111+
24112+
xml_init(anObj.P3(),aTree->GetAll("P3",false,1));
2407924113
}
2408024114

24081-
std::string Mangling( cXml_SLSRay *) {return "004804A8DCBF1BA1FBBF";};
24115+
std::string Mangling( cXml_SLSRay *) {return "C65F5A5A245D11C2FD3F";};
2408224116

2408324117

2408424118
double & cXml_OneLineSLS::IndLine()
@@ -24153,7 +24187,7 @@ void xml_init(cXml_OneLineSLS & anObj,cElXMLTree * aTree)
2415324187
xml_init(anObj.Rays(),aTree->GetAll("Rays",false,1));
2415424188
}
2415524189

24156-
std::string Mangling( cXml_OneLineSLS *) {return "400084BE18ADACC5FA3F";};
24190+
std::string Mangling( cXml_OneLineSLS *) {return "AC21AFDE433F75E2FD3F";};
2415724191

2415824192

2415924193
cTplValGesInit< bool > & cXml_ScanLineSensor::LineImIsScanLine()
@@ -24351,7 +24385,7 @@ void xml_init(cXml_ScanLineSensor & anObj,cElXMLTree * aTree)
2435124385
xml_init(anObj.Lines(),aTree->GetAll("Lines",false,1));
2435224386
}
2435324387

24354-
std::string Mangling( cXml_ScanLineSensor *) {return "B848536DE6351DA5FB3F";};
24388+
std::string Mangling( cXml_ScanLineSensor *) {return "024C201F20E752A4FDBF";};
2435524389

2435624390

2435724391
std::vector< cMonomXY > & cXml_PolynXY::Monomes()

Diff for: src/uti_phgrm/CPP_Malt.cpp

-27
Original file line numberDiff line numberDiff line change
@@ -956,7 +956,6 @@ cAppliMalt::cAppliMalt(int argc,char ** argv) :
956956
double aPCStd = 0.0;
957957
std::string aMCorPoncCal = "xml";
958958

959-
// Proposition de reecriture MPD pour limiter duplication de code
960959
if (EAMIsInit(&a12PixParam))
961960
{
962961
// 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) :
974973
aMCorPoncCal = a12PixParam[4];
975974
}
976975

977-
/*
978-
if (int(a12PixParam.size())==3)
979-
{
980-
aZoomInitMCPonc = RequireFromString<double>(a12PixParam[0],"One-Two Pixel Matching : ZoomInit");
981-
aPdsAttPix = RequireFromString<double>(a12PixParam[1],"One-Two Pixel Matching : PdsAttPix");
982-
aPCCroise = RequireFromString<double>(a12PixParam[2],"One-Two Pixel Matching : aPCCroise");
983-
984-
}
985-
else if (int(a12PixParam.size())==4)
986-
{
987-
aZoomInitMCPonc = RequireFromString<double>(a12PixParam[0],"One-Two Pixel Matching : ZoomInit");
988-
aPdsAttPix = RequireFromString<double>(a12PixParam[1],"One-Two Pixel Matching : PdsAttPix");
989-
aPCCroise = RequireFromString<double>(a12PixParam[2],"One-Two Pixel Matching : PCCroise");
990-
aPCStd = RequireFromString<double>(a12PixParam[3],"One-Two Pixel Matching : PCStd");
991976

992-
}
993-
else if (int(a12PixParam.size())==5)
994-
{
995-
aZoomInitMCPonc = RequireFromString<double>(a12PixParam[0],"One-Two Pixel Matching : ZoomInit");
996-
aPdsAttPix = RequireFromString<double>(a12PixParam[1],"One-Two Pixel Matching : PdsAttPix");
997-
aPCCroise = RequireFromString<double>(a12PixParam[2],"One-Two Pixel Matching : PCCroise");
998-
aPCStd = RequireFromString<double>(a12PixParam[3],"One-Two Pixel Matching : PCStd");
999-
aMCorPoncCal = a12PixParam[4];
1000-
}
1001-
else
1002-
ELISE_ASSERT( !((a12PixParam.size()==2) || (a12PixParam.size()>5)) ,"if 12PixP option used must be of size at least three");
1003-
*/
1004977

1005978
if (EAMIsInit(&mDoOrtho) && mDoOrtho)
1006979
{

0 commit comments

Comments
 (0)