Ejemplo n.º 1
0
int MMAllAuto_main(int argc,char ** argv)
{
    MMD_InitArgcArgv(argc,argv);

    std::string  aDir,aPat,aFullDir;
    std::string  AeroIn;
    int          aZoomF = 2;


    ElInitArgMain
    (
    argc,argv,
    LArgMain()  << EAMC(aFullDir,"Dir + Pattern", eSAM_IsPatFile)
                    << EAMC(AeroIn,"Orientation", eSAM_IsExistDirOri),
    LArgMain()
                    << EAM(aZoomF,"ZoomF",true,"Zoom Final, def=2",eSAM_IsPowerOf2)
    );

#if (ELISE_windows)
    replace( aFullDir.begin(), aFullDir.end(), '\\', '/' );
#endif
    SplitDirAndFile(aDir,aPat,aFullDir);
    StdCorrecNameOrient(AeroIn,aDir);

    cInterfChantierNameManipulateur * aICNM =  cInterfChantierNameManipulateur::BasicAlloc(aDir);

    // Genere les pyramides pour que le paral ne s'ecrase pas les 1 les autres

    const cInterfChantierNameManipulateur::tSet * aSetIm = aICNM->Get(aPat);


    for (int aKIm=0 ; aKIm<int(aSetIm->size()) ; aKIm++)
    {
        std::string aCom =   MM3dBinFile("MICMAC")
                              + XML_MM_File("MM-AllAuto.xml")
                              + std::string(" WorkDir=") +aDir +  std::string(" ")
                              + std::string(" +Im1=") + QUOTE((*aSetIm)[aKIm]) + std::string(" ")
                              + std::string(" +Ori=-") + AeroIn
                              + std::string(" +ZoomF=") + ToString(aZoomF)
                    ;



        system_call(aCom.c_str());
  }

 // int aRes = system_call(aCom.c_str());


   return 0;
}
Ejemplo n.º 2
0
int ChgSysCo_main(int argc,char ** argv)
{
    MMD_InitArgcArgv(argc,argv);

    std::string aFullDir= "";
    std::string AeroIn= "";
    std::string aStrChSys="";
    std::string AeroOut="";
    bool        ForceRot = false;


    ElInitArgMain
    (
        argc,argv,
        LArgMain()  << EAMC(aFullDir,"Full Directory (Dir+Pattern)", eSAM_IsPatFile)
                    << EAMC(AeroIn,"Input Orientation", eSAM_IsExistDirOri)
                    << EAMC(aStrChSys,"Change coordinate file", eSAM_IsExistFile)
                    << EAMC(AeroOut,"Output Orientation", eSAM_IsOutputDirOri),
        LArgMain()  << EAM(ForceRot,"FR",true,"Force orientation matrix to be pure rotation (Def = true)", eSAM_IsBool)
    );

    if (!MMVisualMode)
    {
        std::string aDir,aPat;
    #if (ELISE_windows)
        replace( aFullDir.begin(), aFullDir.end(), '\\', '/' );
    #endif
        SplitDirAndFile(aDir,aPat,aFullDir);
        StdCorrecNameOrient(AeroIn,aDir);

        std::cout << "DPPPP= " << aDir << " " << aPat << "\n";



        std::string aCom =       MM3dBinFile( "Apero" )
                              +  XML_MM_File("Apero-ChCo.xml")
                              +  std::string(" DirectoryChantier=") + aDir + " "
                              +  std::string(" +SetIm=") + aPat + " "
                              +  std::string(" +AeroIn=-") + AeroIn + " "
                              +  std::string(" +AeroOut=-") + AeroOut + " "
                              +  std::string(" +ChC=") + aStrChSys + " "
                              +  std::string(" +ChCFR=") + ToString(ForceRot)
                           ;


       std::cout << "COM = " << aCom << "\n";
       int aRes = system_call(aCom.c_str());
       return aRes;
    }
    else return EXIT_SUCCESS;
}
Ejemplo n.º 3
0
int CASA_main(int argc,char ** argv)
{
    std::string aNameN1;
    std::string aNameN2;
    std::string aNameN3;
    std::string aNameN4;
    std::string Out="TheCyl.xml";
    std::vector<std::string> aVPts;

    ElInitArgMain
    (
        argc,argv,
        LArgMain()  << EAMC(aNameN1,"Name of Cloud", eSAM_IsExistFile),
        LArgMain()  << EAM(Out,"Out",true,"Name of result (Def=TheCyl.xml)")
                    <<  EAM(aNameN2,"N2",true,"Name of optional second cloud", eSAM_IsExistFile)
                    <<  EAM(aNameN3,"N3",true,"Name of optional third cloud", eSAM_IsExistFile)
                    <<  EAM(aNameN4,"N4",true,"Name of optional fourth cloud", eSAM_IsExistFile)
                    <<  EAM(aVPts,"PtsOri",true,"[Pts2D.xml,Ori], points and Orientation (used for seizing) to specify surface")
     );

     if (MMVisualMode) return EXIT_SUCCESS;

     std::string aCom =   MM3dBinFile(" TestLib CASALL ")
                       + XML_MM_File("ParamCasa.xml")
                       + " +Out=" + Out
                       + " +N1=" + aNameN1;

     if (EAMIsInit(&aNameN2))
        aCom = aCom + " +UseN2=true +N2=" + aNameN2;

     if (EAMIsInit(&aNameN3))
        aCom = aCom + " +UseN3=true +N3=" + aNameN3;

     if (EAMIsInit(&aNameN4))
        aCom = aCom + " +UseN4=true +N4=" + aNameN4;

     if (EAMIsInit(&aVPts))
     {
         ELISE_ASSERT(aVPts.size()==2,"Require 2 args for PtsOri");
         aCom = aCom + " +Pts=" + aVPts[0] + " +PtsOri=" + aVPts[1] + " +UsePts=true" ;
     }

     System(aCom);

     Casa_Banniere();

     return 1;
}
Ejemplo n.º 4
0
void cAppli_MPI2Mnt::DoOrtho()
{
    std::string aCom =       MM3dBinFile("MICMAC ")
                             +    XML_MM_File("MM-PIMs2Ortho.xml") + BLANK
                             +    " +Pat=" +  mCFPI->mStrPat       + BLANK
                             +    " +Ori=" +  mCFPI->mOri                 + BLANK
                             +    " +DeZoom=" +ToString(mDeZoom)   + BLANK
                             +    " WorkDir=" + mDirApp
                             ;
    if (EAMIsInit(&mMasqImGlob)) aCom +=  " +UseGlobMasqPerIm=1  +GlobMasqPerIm="+mMasqImGlob;

    if (EAMIsInit(&mRep))
    {
        aCom +=  " +Repere="+mRep;
        if (mRepIsAnam)
            aCom += " +RepereIsAnam=true";
        else
            aCom += " +RepereIsCart=true";
    }

    ExeCom(aCom);

}