Skip to content

Commit

Permalink
OK V2 W/o V1 ?
Browse files Browse the repository at this point in the history
  • Loading branch information
deseilligny committed Jan 12, 2025
1 parent ad42356 commit e849f96
Show file tree
Hide file tree
Showing 11 changed files with 34 additions and 68 deletions.
4 changes: 3 additions & 1 deletion MMVII/include/V1VII.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#ifndef _V1V2_H_
#define _V1V2_H_

#define MMVII_KEEP_LIBRARY_MMV1 true
#ifndef MMVII_KEEP_LIBRARY_MMV1
#define MMVII_KEEP_LIBRARY_MMV1 false
#endif

#if (MMVII_KEEP_LIBRARY_MMV1)

Expand Down
11 changes: 3 additions & 8 deletions MMVII/src/Exports/MMV2_MesIm_2_MMV1.cpp
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
#define WITH_MMV1_FUNCTION false

#include "cMMVII_Appli.h"
#include "MMVII_PCSens.h"


#if (WITH_MMV1_FUNCTION)
#include "V1VII.h"
#endif


namespace MMVII
Expand Down Expand Up @@ -61,7 +56,7 @@ int cAppli_MMV2_MesIm_2_MMV1::Exe()
//read the image pattern
std::vector<std::string> aVecIm = VectMainSet(0);//interface to MainSet

#if (WITH_MMV1_FUNCTION)
#if (MMVII_KEEP_LIBRARY_MMV1)
//MicMac v1
cSetOfMesureAppuisFlottants aDico;

Expand Down Expand Up @@ -122,13 +117,13 @@ int cAppli_MMV2_MesIm_2_MMV1::Exe()

//write image measure in MicMac v1 .xml format
MakeFileXML(aDico,mNameFile);
#else // (WITH_MMV1_FUNCTION)
#else // (MMVII_KEEP_LIBRARY_MMV1)
StdOut() << " \n\n";
StdOut() << " ********************************************************************************************************\n";
StdOut() << " * Use of MMV1 Library is deprecated in this distrib, see with MicMac's administrator how to install it *\n";
StdOut() << " ********************************************************************************************************\n";
MMVII_INTERNAL_ERROR("Deprecated use of MMV1's library");
#endif // (WITH_MMV1_FUNCTION)
#endif // (MMVII_KEEP_LIBRARY_MMV1)

return EXIT_SUCCESS;
}
Expand Down
1 change: 1 addition & 0 deletions MMVII/src/ImagesBase/FileImages.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include "MMVII_Ptxd.h"
#include "cGdalApi.h"

#define MMVII_KEEP_LIBRARY_MMV1 true
#ifdef MMVII_KEEP_MMV1_IMAGE
# include "V1VII.h"
#endif
Expand Down
10 changes: 3 additions & 7 deletions MMVII/src/MMV1/ExportHomMMV1.cpp
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
#define WITH_MMV1_FUNCTION false

#if (WITH_MMV1_FUNCTION)
#include "V1VII.h"
#endif

#include "MMVII_util.h"
#include "MMVII_MeasuresIm.h"

namespace MMVII
{

#if (WITH_MMV1_FUNCTION)
#if (MMVII_KEEP_LIBRARY_MMV1)
cHomogCpleIm ToMMVII(const cNupletPtsHomologues & aNUp)
{

Expand Down Expand Up @@ -86,7 +82,7 @@ cInterfImportHom * cInterfImportHom::CreateImportV1(const std::string&aDir,const
{
return new cImportHomV1(aDir,aSubDir,aExt);
}
#else
#else // MMVII_KEEP_LIBRARY_MMV1

cInterfImportHom * cInterfImportHom::CreateImportV1(const std::string&aDir,const std::string&aSubDir,const std::string&aExt)
{
Expand All @@ -97,7 +93,7 @@ cInterfImportHom::~cInterfImportHom()
{
}

#endif
#endif // MMVII_KEEP_LIBRARY_MMV1



Expand Down
10 changes: 3 additions & 7 deletions MMVII/src/MMV1/ExportMeasuresImGCPMMV1.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
#define WITH_MMV1_FUNCTION false

#if (WITH_MMV1_FUNCTION)
#include "V1VII.h"
#endif

#include "MMVII_util.h"
#include "MMVII_MeasuresIm.h"
Expand All @@ -15,7 +11,7 @@ namespace MMVII
/* */
/* ************************************************* */

#if (WITH_MMV1_FUNCTION)
#if (MMVII_KEEP_LIBRARY_MMV1)

void ImportMesImV1(std::list<cSetMesPtOf1Im> & aResult,const std::string & aNameFileMesImV1)
{
Expand Down Expand Up @@ -50,7 +46,7 @@ cSetMesGCP ImportMesGCPV1(const std::string & aNameFileMesGCPV1,const std::strin
return aResult;
}

#else
#else // MMVII_KEEP_LIBRARY_MMV1
void ImportMesImV1(std::list<cSetMesPtOf1Im> & aResult,const std::string & aNameFileMesImV1)
{
MMVII_INTERNAL_ERROR("No ImportMesImV1 ");
Expand All @@ -60,7 +56,7 @@ cSetMesGCP ImportMesGCPV1(const std::string & aNameFileMesGCPV1,const std::strin
MMVII_INTERNAL_ERROR("No ImportMesGCPV1");
return cSetMesGCP (aNameSet);
}
#endif
#endif // MMVII_KEEP_LIBRARY_MMV1



Expand Down
10 changes: 3 additions & 7 deletions MMVII/src/MMV1/ExportSensorMMV1.cpp
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
#define WITH_MMV1_FUNCTION false

#if (WITH_MMV1_FUNCTION)
#include "V1VII.h"
#endif

#include "MMVII_MMV1Compat.h"

namespace MMVII
{

#if (WITH_MMV1_FUNCTION)
#if (MMVII_KEEP_LIBRARY_MMV1)
/* ************************************************* */
/* */
/* cExportV1StenopeCalInterne */
Expand Down Expand Up @@ -160,7 +156,7 @@ cExportV1StenopeCalInterne::cExportV1StenopeCalInterne
if ((aNbLayer>0) && (aNbPointPerDim>0))
DoCorresp(mCorresp,aCamV1,aNbPointPerDim,aNbLayer,aDS);
}
#else
#else // MMVII_KEEP_LIBRARY_MMV1
cExportV1StenopeCalInterne::cExportV1StenopeCalInterne
(
bool isForCalib,
Expand All @@ -174,6 +170,6 @@ cExportV1StenopeCalInterne::cExportV1StenopeCalInterne
{
MMVII_INTERNAL_ERROR("Reading of MMV1 Camera is deprecated");
}
#endif
#endif // MMVII_KEEP_LIBRARY_MMV1

};
10 changes: 3 additions & 7 deletions MMVII/src/MMV1/FluxPtsMMV1.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
#define WITH_MMV1_FUNCTION false

#if (WITH_MMV1_FUNCTION)
#include "V1VII.h"
#endif

#include "MMVII_Geom2D.h"

Expand Down Expand Up @@ -650,7 +646,7 @@ void BenchCurveDigit(cParamExeBench & aParam)

/*************************************************/

#if (WITH_MMV1_FUNCTION)
#if (MMVII_KEEP_LIBRARY_MMV1)
Neighbourhood DiscNeich(const tREAL8 & aRay)
{
std::vector<Pt2di> aVPts;
Expand Down Expand Up @@ -726,7 +722,7 @@ void GetPts_Line(tResFlux & aRes,const cPt2dr & aP1,const cPt2dr &aP2)
{
GetPts_Line(aRes,aP1,aP2,-1.0);
}
#else // (WITH_MMV1_FUNCTION)
#else // (MMVII_KEEP_LIBRARY_MMV1)
void GetPts_Line(tResFlux & aResLine,const cPt2dr & aP1,const cPt2dr &aP2)
{
cLine_CurveBySet aLCS(ToI(aP1),ToI(aP2));
Expand Down Expand Up @@ -754,7 +750,7 @@ tResFlux GetPts_Circle(const cPt2dr & aC,double aRay,bool with8Neigh)
return aCCS.Compute();
}

#endif // (WITH_MMV1_FUNCTION)
#endif // (MMVII_KEEP_LIBRARY_MMV1)



Expand Down
12 changes: 4 additions & 8 deletions MMVII/src/MMV1/ImageFilterMMV1.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
#define WITH_MMV1_FUNCTION false

#if (WITH_MMV1_FUNCTION)
#include "V1VII.h"
#endif

#include "MMVII_Matrix.h"
#include "MMVII_Linear2DFiltering.h"
Expand Down Expand Up @@ -61,7 +57,7 @@ void Bench_LabMaj()
}


#if (WITH_MMV1_FUNCTION)
#if (MMVII_KEEP_LIBRARY_MMV1)

/* ************************************************* */
/* */
Expand Down Expand Up @@ -111,7 +107,7 @@ void ExportHomMMV1(const std::string & aIm1,const std::string & aIm2,const std::
/* ************************************************* */

// implemantation of methods that used to do be done unsing MMV1
// Activated with WITH_MMV1_FUNCTION , to check correctness
// Activated with MMVII_KEEP_LIBRARY_MMV1 , to check correctness

//================= Curvature of tangent line -> Courb Tgt ==================

Expand Down Expand Up @@ -306,12 +302,12 @@ void BenchImFilterV1V2()
Tpl_BenchDericheV1V2<tREAL4>(cPt2di(240,220),2.0);
}

#else
#else // MMVII_KEEP_LIBRARY_MMV1
void BenchImFilterV1V2()
{
Bench_LabMaj();
}
#endif
#endif // MMVII_KEEP_LIBRARY_MMV1


//==============================
Expand Down
10 changes: 4 additions & 6 deletions MMVII/src/MMV1/Numerics.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#define WITH_MMV1_FUNCTION false

#if (WITH_MMV1_FUNCTION)
#include "V1VII.h"
#if (MMVII_KEEP_LIBRARY_MMV1)
#include "ext_stl/numeric.h"
#endif

Expand Down Expand Up @@ -188,7 +186,7 @@ void BenchKTHVal(cParamExeBench & aParam)

/* ***************************************** */

#if (WITH_MMV1_FUNCTION)
#if (MMVII_KEEP_LIBRARY_MMV1)
template <class Type>
std::vector<Type> V1RealRoots(const std::vector<Type> & aVCoef, Type aTol,int aNbMaxIter)
{
Expand All @@ -201,14 +199,14 @@ template <class Type>

return aVRoots;
}
#else
#else // MMVII_KEEP_LIBRARY_MMV1
template <class Type>
std::vector<Type> V1RealRoots(const std::vector<Type> & aVCoef, Type aTol,int aNbMaxIter)
{
MMVII_INTERNAL_ERROR("No V1RealRoots");
return std::vector<Type>();
}
#endif
#endif // MMVII_KEEP_LIBRARY_MMV1

#define INST_V1ROOTS(TYPE)\
template std::vector<TYPE> V1RealRoots(const std::vector<TYPE> & aVCoef, TYPE aTol,int aNbMaxIter);
Expand Down
18 changes: 7 additions & 11 deletions MMVII/src/MMV1/XmlMMV1.cpp
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
#define WITH_MMV1_FUNCTION false

#if (WITH_MMV1_FUNCTION)
#include "V1VII.h"
#endif

#include "MMVII_Mappings.h"
#include "MMVII_AimeTieP.h"


#if (WITH_MMV1_FUNCTION)
#if (MMVII_KEEP_LIBRARY_MMV1)
#include "../src/uti_image/NewRechPH/cParamNewRechPH.h"
#include "im_tpl/cPtOfCorrel.h"
#include "algo_geom/qdt.h"
Expand All @@ -27,7 +23,7 @@ namespace MMVII
/* */
/* *********************************** */

#if (WITH_MMV1_FUNCTION)
#if (MMVII_KEEP_LIBRARY_MMV1)
/*
This class is an interface to use in MMV2, the 3d masq produce by SaisieMasqQT of MMV1,
using the MMV1 library
Expand Down Expand Up @@ -63,18 +59,18 @@ cDataBoundedSet<tREAL8,3> * MMV1_Masq(const cBox3dr &aBox,const std::string & a
{
return new cMasq_MMV1asBoundeSet(aBox,aNameFile);
}
#else
#else // MMVII_KEEP_LIBRARY_MMV1
cDataBoundedSet<tREAL8,3> * MMV1_Masq(const cBox3dr &aBox,const std::string & aNameFile)
{
MMVII_INTERNAL_ERROR("Handling MMV1 3d-Masq is deprecated");
return nullptr;
}
#endif
#endif // MMVII_KEEP_LIBRARY_MMV1



//============= tNameRel ====================
#if (WITH_MMV1_FUNCTION)
#if (MMVII_KEEP_LIBRARY_MMV1)

void TestTimeV1V2()
{
Expand Down Expand Up @@ -614,7 +610,7 @@ template <class Type> void cImplem_ExportAimeTiep<Type>::FiltrageSpatialPts()

template class cImplem_ExportAimeTiep<tREAL4>;
template class cImplem_ExportAimeTiep<tINT2>;
#else
#else // MMVII_KEEP_LIBRARY_MMV1
template <class Type> cInterf_ExportAimeTiep<Type>::~cInterf_ExportAimeTiep()
{
}
Expand Down Expand Up @@ -645,7 +641,7 @@ tNameRel MMV1InitRel(const std::string & aName)
MMVII_INTERNAL_ERROR("Handling reaing of MMV1 Rels is deprecated");
return tNameRel();
}
#endif
#endif // MMVII_KEEP_LIBRARY_MMV1

// ============ INSTANTIATION ======================

Expand Down
6 changes: 0 additions & 6 deletions MMVII/src/UtiMaths/Polynoms.cpp
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
#define WITH_MMV1_FUNCTION false

#include "MMVII_Matrix.h"
#include "MMVII_Ptxd.h"
#include "MMVII_Stringifier.h"
#include "MMVII_Geom2D.h"


#if (WITH_MMV1_FUNCTION)
#include "V1VII.h"
#endif


namespace MMVII
{
Expand Down Expand Up @@ -61,7 +56,6 @@ template <class Type> cEigenPolynRoots<Type>::cEigenPolynRoots(const cPolynom<Ty
mSzMat (std::max((size_t)1,mDeg)),
mCompM (mSzMat,mSzMat,eModeInitImage::eMIA_Null)
{

if (mDeg==0)
return;

Expand Down

0 comments on commit e849f96

Please sign in to comment.