当前位置: 首页>>代码示例>>C++>>正文


C++ Tiff_Im::in_proj方法代码示例

本文整理汇总了C++中Tiff_Im::in_proj方法的典型用法代码示例。如果您正苦于以下问题:C++ Tiff_Im::in_proj方法的具体用法?C++ Tiff_Im::in_proj怎么用?C++ Tiff_Im::in_proj使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Tiff_Im的用法示例。


在下文中一共展示了Tiff_Im::in_proj方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: GrShade_main


//.........这里部分代码省略.........
         if (aDequant)
         {
             ElImplemDequantifier aDeq(aSzIn);
             aDeq.SetTraitSpecialCuv(true);
             aDeq.DoDequantif(aSzIn, trans(aFIn,aP0In),true);
         REAL aVMax;
             ELISE_COPY
             (
                  rectangle(Pt2di(0,0),aSzIn),
                  aDeq.ImDeqReelle() * aFZ,
                  aMnt.out() | VMax(aVMax) |VMin(aVMin)
             );

         }
         else
     {
             ELISE_COPY
             (
                  rectangle(Pt2di(0,0),aSzIn),
                  trans(aFIn,aP0In)*aFZ,
                  aMnt.out()|VMin(aVMin)
             );
     }
         Im2D_Bits<1> aIMasq(aSzIn.x,aSzIn.y,1);

     if (aFileMasq!="")
     {
             if (ELISE_fp::exist_file(aDir+aFileMasq))
                aFileMasq = aDir+aFileMasq;
         double aDif=100;
         Tiff_Im aFM = Tiff_Im::StdConvGen(aFileMasq,1,true,false);
             ELISE_COPY
             (
                  select(rectangle(Pt2di(0,0),aSzIn),trans(!aFM.in_proj(),aP0In)),
          aVMin-aDif,
                     aMnt.out()
                  |  (aIMasq.out() << 0)
             );
         aVMin-= aDif;
     }

         if (aBrd>0)
         {
            cout << "VMin = " << aVMin <<endl;
            ELISE_COPY(aMnt.border(aBrd),aVMin-1000,aMnt.out());
         }

     // Im2D_REAL4 aShade(aSzGlob.x,aSzGlob.y);
         ELISE_COPY(aShade.all_pts(),0,aShade.out());

         if (pW)
            pW = pW->PtrChc(Pt2dr(aP0Glob-aP0In),Pt2dr(aRatio,aRatio));

         REAL SPds = 0;
         REAL aSTot = 0;
         REAL Dyn = 1.0;
         if (aTShade != "u_int1")
            Dyn = 100;

         bool Done = false;
         if (   (aModeOmbre=="CielVu")
             || ((aModeOmbre=="Mixte") && (aVPdsFiltre[0] > 0.0))
            )
     {
            std::cout << "BEGIN CIEL" << endl;
            Done = true;
开发者ID:xialang2012,项目名称:micmac-archeos,代码行数:67,代码来源:CPP_GrShade.cpp

示例2: ConvertIm_main


//.........这里部分代码省略.........
               aPhInterpOut = Tiff_Im::RGB;
            else if (aNamePITOut=="BW")
               aPhInterpOut = Tiff_Im::BlackIsZero;
            else
            {
               ELISE_ASSERT(aNamePITOut=="","Mode Couleur Inconnu");
            }
        }


        Tiff_Im::COMPR_TYPE aComprOut = Tiff_Im::No_Compr;


        L_Arg_Opt_Tiff aLArg = Tiff_Im::Empty_ARG;


        if (! aNoTile)
        {
           if (aSzTileInterne != Pt2di(-1,-1))
               aLArg = aLArg + Arg_Tiff(Tiff_Im::ATiles(aSzTileInterne));

           if (aSzTF != Pt2di(-1,-1))
               aLArg = aLArg + Arg_Tiff(Tiff_Im::AFileTiling(aSzTF));
        }
        else
        {
             aLArg = aLArg + Arg_Tiff(Tiff_Im::ANoStrip());
             aLArg = aLArg + Arg_Tiff(Tiff_Im::AFileTiling(Pt2di(-1,-1)));
        }


        Tiff_Im aTifOut
                (
                      aNameOut.c_str(),
                      aSzOut,
                      aTypeOut,
                      aComprOut,
                      aPhInterpOut,
                      aLArg
                );
        INT aNbChOut = aTifOut.nb_chan();

        Pt2di aSzROut = aSzOut;
        Output anOut = aTifOut.out();

        Fonc_Num aFin = aTifIn.in_proj();
        if (aF2!="")
        {
             Tiff_Im aT2 = Tiff_Im::BasicConvStd(DirOfFile(aNameIn)+aF2);
             aFin = Virgule(aFin,aT2.in(0));
        }

        if (aVPermut.size() != 0)
           aFin = aFin.permut(aVPermut);

        if (type_im_integral( aTypeOut))
        {
        }
        else
        {
            aFin = Rconv(aFin);
        }

        aFin = reduc_binaire_gen(aFin, aReducX != 0, aReducY != 0, 16, true, 0);
        anOut = Filtre_Out_RedBin_Gen(anOut, aReducX != 0, aReducY != 0);
        aSzROut = aSzOut.mcbyc(aCoefReduc);
        aFin = trans(aFin,aP0);

        if (aKCh!=-1)
           aFin = aFin.kth_proj(aKCh);
        else
        {

            if ((aNbChOut==1) && (aNbChIn==3))
                aFin = (aFin.v0() + aFin.v1() + aFin.v2()) / 3.0;

            if ((aNbChOut==3) && (aNbChIn==1))
               aFin = Virgule(aFin,aFin,aFin);
         }


        if (aVisu)
           anOut = anOut |  Video_Win::WiewAv(aSzROut);

        if (aDyn != 1.0)
           aFin = aFin * aDyn;

        if (type_im_integral(aTypeOut) && (aTypeOut!=GenIm::int4))
        {
            int aVMin,aVMax;
            min_max_type_num(aTypeOut,aVMin,aVMax);
            aFin = Max(aVMin,Min(aVMax-1,aFin));
        }

        ELISE_COPY(rectangle(Pt2di(0,0),aSzROut),aFin,anOut);

        return EXIT_SUCCESS;
    }
    else return EXIT_SUCCESS;
}
开发者ID:jakexie,项目名称:micmac-archeos,代码行数:101,代码来源:CPP_ConvertIm.cpp

示例3: aBox

cElNuage3DMaille * cElNuage3DMaille::FromParam
                   (
                       const cXML_ParamNuage3DMaille & aParamOri,
                       const std::string & aDir,
                       const std::string & aMasqSpec,
                       double ExagZ,
                       const cParamModifGeomMTDNuage * aPMG,
                       bool  WithEmptyData
                   )
{
  cXML_ParamNuage3DMaille aParam = aParamOri;
  Box2di aBox(Pt2di(0,0),aParam.NbPixel());
  bool Dequant = false;

  if (aPMG)
  {
       double aScale = aPMG->mScale;
       if (aScale != 1.0)
       {
           std::string aMes = "Scale=" + ToString(aScale);
           cElWarning::ScaleInNuageFromP.AddWarn(aMes,__LINE__,__FILE__);
       }
       Pt2di  aP0 = round_down(aPMG->mBox._p0/aScale);
       Pt2di  aP1 = round_up(aPMG->mBox._p1/aScale);

       aBox = Inf(aBox,Box2di(aP0,aP1));

       aParam.NbPixel() = aBox.sz();

       ElAffin2D aAfM2C = Xml2EL(aParam.Orientation().OrIntImaM2C());
       
        aAfM2C   =   ElAffin2D::trans(-Pt2dr(aBox._p0)) * aAfM2C;
       aParam.Orientation().OrIntImaM2C().SetVal(El2Xml(aAfM2C));
       Dequant = aPMG->mDequant;
  }


  std::string aMasq =  aDir+aParam.Image_Profondeur().Val().Masq();
  if (aMasqSpec!="")
         aMasq = aMasqSpec;

  GenIm::type_el aTypeEl = GenIm::real4;
  Fonc_Num aFMasq = 0;
  Fonc_Num aFProf = 1;
  if (! WithEmptyData)
  {
     aFMasq =   trans(Tiff_Im::BasicConvStd(aMasq).in(0),aBox._p0);
     Tiff_Im aTP = Tiff_Im::BasicConvStd(aDir+aParam.Image_Profondeur().Val().Image());
     aFProf =  trans(aTP.in_proj()*ExagZ,aBox._p0);
     aTypeEl = aTP.type_el();
  }


   if (aParam.Image_Profondeur().IsInit())
   {
      bool aFaiscClassik =  (   (aParam.Image_Profondeur().Val().GeomRestit()==eGeomMNTFaisceauIm1PrCh_Px1D)
                             || (aParam.Image_Profondeur().Val().GeomRestit()==eGeomMNTFaisceauIm1PrCh_Px2D)
                             || (aParam.Image_Profondeur().Val().GeomRestit()==eGeomMNTEuclid)
                             || (aParam.Image_Profondeur().Val().GeomRestit()==eGeomMNTFaisceauPrChSpherik)
                            );

      bool aProfIsZ =  (      (aParam.Image_Profondeur().Val().GeomRestit()==eGeomMNTFaisceauIm1ZTerrain_Px1D)
                             || (aParam.Image_Profondeur().Val().GeomRestit()==eGeomMNTFaisceauIm1ZTerrain_Px2D)
                         );


       if (aFaiscClassik || aProfIsZ)
       {
           switch (aTypeEl)
           {
               case GenIm::int2 :
                    if (Dequant) 
                        return new cElN3D_EpipGen<float,double>(aDir,aParam,aFMasq,aFProf,aProfIsZ,WithEmptyData,true);
                    else
                        return new cElN3D_EpipGen<INT2,INT>(aDir,aParam,aFMasq,aFProf,aProfIsZ,WithEmptyData,false);
               break;
               case GenIm::real4 :
                    return new cElN3D_EpipGen<float,double>(aDir,aParam,aFMasq,aFProf,aProfIsZ,WithEmptyData,false);
               break;

               default :
                   std::cout << "NAME " << aDir+aParam.Image_Profondeur().Val().Image() << "\n";
                   ELISE_ASSERT(false,"Type Image non gere dans cElNuage3DMaille::FromParam");
               break;
           }
       }
   }

   ELISE_ASSERT(false,"cElNuage3DMaille::FromParam");
   return 0;
}
开发者ID:xialang2012,项目名称:micmac-archeos,代码行数:91,代码来源:cImplemElNuage3DMaille.cpp


注:本文中的Tiff_Im::in_proj方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。