Esempio n. 1
0
bool
wxFileType::GetPrintCommand(wxString *printCmd,
                            const wxFileType::MessageParameters& params) const
{
    wxCHECK_MSG( printCmd, false, _T("invalid parameter in GetPrintCommand") );

    if ( m_info )
    {
        *printCmd = ExpandCommand(m_info->GetPrintCommand(), params);

        return true;
    }

    return m_impl->GetPrintCommand(printCmd, params);
}
Esempio n. 2
0
bool
wxFileType::GetIcon(wxIconLocation *iconloc,
                    const MessageParameters& params) const
{
    if ( !GetIcon(iconloc) )
    {
        return false;
    }

    // we may have "%s" in the icon location string, at least under Windows, so
    // expand this
    if ( iconloc )
    {
        iconloc->SetFileName(ExpandCommand(iconloc->GetFileName(), params));
    }

    return true;
}
Esempio n. 3
0
cAppliOneReechMarqFid::cAppliOneReechMarqFid(int argc,char ** argv) :
     cAppliWithSetImage   (argc-1,argv+1,TheFlagNoOri),
     mAffPixIm2ChambreMm  (ElAffin2D::Id()),
     mBySingle            (true),
     mNumKer              (5),
     mPostMasq            ("NONE")
{
    ElInitArgMain
    (
          argc,argv,
          LArgMain()  << EAMC(mNamePat,"Pattern image", eSAM_IsExistFile)
                      << EAMC(mResol,"Resolution"),
          LArgMain()   <<  EAM(mBoxChambreMm,"BoxCh",true,"Box in Chambre (generally in mm)")
                       << EAM(mNumKer,"Kern",true,"Kernel of interpol,0 Bilin, 1 Bicub, other SinC (fix size of apodisation window), Def=5")
                       << EAM(mPostMasq,"AttrMasq",true,"Atribut for masq toto-> toto_AttrMasq.tif, NONE if unused, Def=NONE")
    );

    if (mPostMasq!="NONE") 
       mPostMasq = "_"+mPostMasq+"Masq";

    const cInterfChantierNameManipulateur::tSet * aSetIm = mEASF.SetIm();
    if (aSetIm->size()>1)
    {
         mBySingle = false;
         ExpandCommand(2,"",true);
         return;
    }

    mNameIm =(*aSetIm)[0];
 
    mDir = DirOfFile(mNameIm);
    mICNM = cInterfChantierNameManipulateur::BasicAlloc(mDir);

    std::pair<std::string,std::string> aPair = mICNM->Assoc2To1("Key-Assoc-STD-Orientation-Interne",mNameIm,true);


    mSzIm = Tiff_Im::StdConvGen(mNameIm,-1,true).sz();

    cMesureAppuiFlottant1Im aMesCam = StdGetFromPCP(mDir+aPair.first,MesureAppuiFlottant1Im);
    cMesureAppuiFlottant1Im aMesIm  = StdGetFromPCP(mDir+aPair.second,MesureAppuiFlottant1Im);

    mPack = PackFromCplAPF(aMesCam,aMesIm);
    if (! EAMIsInit(&mBoxChambreMm))
    {
          mBoxChambreMm._p0 = Pt2dr(1e20,1e20);
          mBoxChambreMm._p1 = Pt2dr(-1e20,-1e20);
          for (ElPackHomologue::const_iterator itC=mPack.begin() ; itC!=mPack.end() ; itC++)
          {
               mBoxChambreMm._p0  = Inf(mBoxChambreMm._p0,itC->P1());
               mBoxChambreMm._p1  = Sup(mBoxChambreMm._p1,itC->P1());
          }
    }
    mBoxChambrePix._p0 = ChambreMm2ChambrePixel(mBoxChambreMm._p0);
    mBoxChambrePix._p1 = ChambreMm2ChambrePixel(mBoxChambreMm._p1);

/*
    mAffChambreMm2PixIm = ElAffin2D::L2Fit(mPack,&mResidu);
    mAffPixIm2ChambreMm  = mAffChambreMm2PixIm.inv();
    std::cout << "FOR " << mNameIm << " RESIDU " << mResidu  << " \n";
*/
}