• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ Pt2di函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中Pt2di函数的典型用法代码示例。如果您正苦于以下问题:C++ Pt2di函数的具体用法?C++ Pt2di怎么用?C++ Pt2di使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: ZIC

	void 	Scale_Im_Compr<TObj,TLut,TInd>::DoItZoom()
{
    ElTimer aTimer;
	Zoom_Im_Compr<TObj,TLut,TInd>  ZIC(this->_u2wX,this->_l0,_lut);

	for (INT wy0=this->_pW0.y; wy0<this->_pW1.y; )
	{
		INT yU0 = round_ni(this->y_to_user(wy0));
		INT wy1 = wy0+1;

		while ( (wy1<this->_pW1.y) && (yU0==round_ni(this->y_to_user(wy1))))
			wy1++;

                yU0 = std::max(0,std::min(yU0,this->_SzU.y-1));
		DeCompr
                (
		     _dim->lpckb(yU0),
                     ZIC,this->_xU0,this->_xU1,_dim->per()
                );
        mTimeUnCompr += aTimer.uval();
		RasterUseLine
		(
			Pt2di(this->_pW0.x,wy0),
			Pt2di(this->_pW1.x,wy1),
			this->_line
		);
        aTimer.reinit();

		wy0 = wy1;
	}
}
开发者ID:jakexie,项目名称:micmac,代码行数:31,代码来源:scale_im_compr.cpp


示例2: bug_10

void bug_10()
{
    INT res;
    Im2D_U_INT1 b(300,300);
    cout << "should be :  out of reading in integer mode\n";
    copy(select(rectangle(Pt2di(-10,-13),Pt2di(103,105)),1),b.in(),sigma(res));
}
开发者ID:jakexie,项目名称:micmac,代码行数:7,代码来源:bug_0_all.c


示例3: bench_algo_dist_32

void  bench_algo_dist_32()
{
	 bench_algo_dist_32(Pt2di(10,10));
     bench_algo_dist_32(Pt2di(100,100));
     bench_algo_dist_32(Pt2di(150,100));
     bench_algo_dist_32(Pt2di(100,150));
}
开发者ID:jakexie,项目名称:micmac,代码行数:7,代码来源:b_0_38.cpp


示例4: ELISE_COPY

Box2di cWindowXmlEditor::TopDraw()
{
    ELISE_COPY(mW.all_pts(),mGrayFond,mW.ogray());

    int aTx = mW.sz().x;
    // int aXMil = aTx/2;

    if (mFirstDraw)
    {
       mCaseQuit = cCaseX11Xml::Alloc(mW,Box2di(Pt2di(10,10),Pt2di(200,40)),P8COL::magenta);
       mCaseWarn = cCaseX11Xml::Alloc(mW,Box2di(Pt2di(10,2),Pt2di(aTx-2,48)),P8COL::red);
       mVCase.push_back(mCaseQuit);
       mVInfoCase.push_back(cWXXInfoCase(0,0));
    }

    Box2di aRes =  Draw(Pt2di(50,50),mTreeGlob,0,mFilterGlob);
    mFirstDraw = false;
    for (int aKC=0 ; aKC<int(mVCase.size()) ; aKC++)
    {
        cCaseX11Xml * aCX   = mVCase[aKC];
        aCX->Efface();
        cWXXInfoCase & anIC = mVInfoCase[aKC];
        cElXMLTree * aTree = anIC.mTree;
        if (aTree)
           aCX->string(-10,anIC.mTree->GetUniqueVal());
    }

    ShowQuit();
    return aRes;
   
}
开发者ID:jakexie,项目名称:micmac-archeos,代码行数:31,代码来源:Extern_XmlX11.cpp


示例5: Box2di

Box2di  cWindowXmlEditor::PrintTag(Pt2di aP0,cElXMLTree * aTree,int aMode,int aLevel,cElXMLTree * aFilter) 
{
    if ((!mXmlMode) && (aMode!=0)) 
       return Box2di(aP0-Pt2di(0,1),aP0-Pt2di(0,1));


    std::string aTag =  ((aMode == -1) ? "</" : "<") + aTree->ValTag() + ((aMode==0) ? "/>" : ">");
    if (!mXmlMode) aTag = " " + aTree->ValTag() + " :  ";
    Pt2di aSz = mW.SizeFixedString(aTag);

    Pt2di aP1 = aP0 + aSz;

    mW.fill_rect(Pt2dr(aP0)-Pt2dr(1,1),Pt2dr(aP1)+Pt2dr(1,1),mW.pgray()(mGrayTag));
    if (aMode!=0)
        mW.draw_rect(Pt2dr(aP0)-Pt2dr(2,2),Pt2dr(aP1)+Pt2dr(2,2),Line_St(mW.pdisc()(P8COL::blue),2));
    mW.fixed_string(Pt2dr(aP0)+Pt2dr(0,aSz.y), aTag.c_str(),mW.pdisc()(P8COL::black),false);

    Box2di aRes  (aP0-mPRab,aP1+ mPRab);
    if ((aMode ==0) && mFirstDraw)
    {
         Pt2di aQ0 (aP0.x+aSz.x+5,aP0.y-4);
         Pt2di aQ1 (EndXOfLevel(aLevel)-5,aP0.y+aSz.y+4);
         mVCase.push_back(cCaseX11Xml::Alloc(mW,Box2di(aQ0,aQ1),P8COL::yellow));
         mVInfoCase.push_back(cWXXInfoCase(aTree,aFilter));
    }

    return aRes;
}
开发者ID:jakexie,项目名称:micmac-archeos,代码行数:28,代码来源:Extern_XmlX11.cpp


示例6: bench_im_reech

void bench_im_reech()
{
    bench_im_reech
    (
        FX+FY,
        Pt2di(50,50),
        FX , 
        FY , 
        4,
        epsilon
    );
    bench_im_reech
    (
        FX*3+FY*2+1,
        Pt2di(50,50),
        FX/2.0+FY/4.0 +3.0,
        FX/4.0+FY/2.0 +4.5,
        4,
        epsilon
     );

    bench_im_reech
    (
        FX*3+FY*2+1,
        Pt2di(50,50),
        FX/2.1+FY/4.8 +8.1,
        FX/4.0+FY/2.0 +4.5,
        9,
        1/10.0
     );
}
开发者ID:jakexie,项目名称:micmac,代码行数:31,代码来源:b_0_38.cpp


示例7: TestKL

void TestKL()
{
   Pt2di aSZ(200,200);
   Im2D_Bits<1> aImMasqF(aSZ.x,aSZ.y,1);

   Im2D_Bits<1> aImMasqDef(aSZ.x,aSZ.y,1);
   ELISE_COPY(rectangle(Pt2di(70,0),Pt2di(130,200)),0,aImMasqDef.out());

   Im2D<U_INT2,INT> aImVal(aSZ.x,aSZ.y);
   ELISE_COPY(aImVal.all_pts(),FX,aImVal.out());

   Video_Win aW=Video_Win::WStd(aSZ,3.0);
   ELISE_COPY(aW.all_pts(),aImVal.in(),aW.ogray());
   ELISE_COPY(aW.all_pts(),aImMasqDef.in(),aW.odisc());
   getchar();


   aImVal = ImpaintL2(aImMasqDef,aImMasqF,aImVal);

   // NComplKLipsParLBas(aImMasqDef,aImMasqF,aImVal,1.0);

   ELISE_COPY(aW.all_pts(),aImVal.in(),aW.ogray());

   Tiff_Im::Create8BFromFonc("toto.tif",aSZ,aImVal.in());
   getchar();
}
开发者ID:xialang2012,项目名称:micmac-archeos,代码行数:26,代码来源:CPP_MPDtest.cpp


示例8: Pt2di

void TestScroller::GUR_query_pointer(Clik cl,bool)
{
	if (_mode_tr)
	{
		INT v = 1;
		if (cl.shifted()) 
			v *= 2;
		if (cl.controled()) 
			v *= 4;

    	        scrol.SetDTrW((_p0grab-Pt2di(cl._pt)) *v);
		//_p0grab = cl._pt;
		_p0grab = Pt2di( cl._pt ); // __NEW
	}
	else
	{
		  REAL scy = _p0grab.y- cl._pt.y;
		  scy /= -100.0;
		  scy = _sc0grab *pow(2.0,scy);
		  scy = std::min(std::max(scy,0.00),10.0);

      	  //scrol.SetScArroundPW(_p0grab,scy,true);
      	  scrol.SetScArroundPW( Pt2dr(_p0grab),scy,true); // __NEW
	}
}
开发者ID:jakexie,项目名称:micmac,代码行数:25,代码来源:b_0_49.cpp


示例9: mStepGr

RImGrid::RImGrid
(
     bool AdaptStep,
     Pt2dr aP0,
     Pt2dr aP1,
     Pt2dr  aStepGr,
     const std::string & aName,
     Pt2di aSz
) :
  mP0     (Inf(aP0,aP1)),
  mP1     (Sup(aP0,aP1)),
  mStepGr (AdaptStep ? AdaptPas(aStepGr,mP1-mP0) : aStepGr),
  mSzGrid ( (aSz!=Pt2di(0,0)) ? 
            aSz               :
            (
                AdaptStep                                        ?
	        (round_ni((aP1-aP0).dcbyc(mStepGr))+Pt2di(1,1))  :
                (round_up((aP1-aP0).dcbyc(mStepGr))+Pt2di(1,1))
            )
          ),
  mDef    (-1e20),
  mGrid   (mSzGrid.x,mSzGrid.y,mDef),
  mTim    (new TIm2D<REAL,REAL>(mGrid)),
  mName   (aName),
  mStepAdapted (AdaptStep)
{
}
开发者ID:xialang2012,项目名称:micmac-archeos,代码行数:27,代码来源:im2d_reech_grid.cpp


示例10: compute

          Fonc_Num_Computed * compute(const Arg_Fonc_Num_Comp & arg)
          {
                if (arg.flux()->is_line_map_rect())
                   return _f.compute(arg);
                
                Box2di b(Pt2di(0,0),Pt2di(0,0));;
                Tjs_El_User.ElAssert
                (
                    arg.flux()->is_rect_2d(b),
                   EEM0 
                      << "incompatible flux for function : \"" 
                      << _name << "\"\n" 
                      << "|    (it  is a \"linear operator\","
                      << "it requires a flux pts of kind\n"
                      << "|   \"rectangle \" or \"line_map_rect\")\n"
                );



                Flux_Pts_Computed * flxi = 
                          RLE_Flux_Pts_Computed::rect_2d_interface
                          (
                              b._p0,b._p1,b._p1.x-b._p0.x
                          );
                Fonc_Num_Computed * fc = _f.compute(Arg_Fonc_Num_Comp(flxi));

                if (fc->integral())
                   return new Linear_Gen_Comp<INT>(arg,b,flxi,fc);
                else
                   return new Linear_Gen_Comp<REAL>(arg,b,flxi,fc);
          }
开发者ID:archeos,项目名称:micmac-archeos,代码行数:31,代码来源:linear_filter.cpp


示例11: TheFirstScrAct

void BiScroller::LoadXImage(Pt2di p0W,Pt2di p1W,bool quick)
{

     mScrGray->SetSameGeom(*this);
     if (mScrCol)
         mScrCol->SetGeomTranslated(*this,mTr);

     if (quick)
     {
        TheFirstScrAct().LoadXImageInVisu(mVideoVisu,p0W,p1W,quick);
        return;
     }

     if (Im1Act())
        Scr1().LoadXImageInVisu(mMemGray,p0W,p1W,false);
     if (Im2Act())
        Scr2().LoadXImageInVisu(mMemCol,p0W,p1W,false);

     for (INT y=p0W.y; y<p1W.y ; y++)
     {
         MakeOneLine
         (
             mDataImR,mDataImG,mDataImB,
             y,p0W.x,p1W.x,
             mDataGray[y],mDataCol[y]
         );
          mVideoVisu.XIm_write_image_brute
          (
              Pt2di(p0W.x,0),Pt2di(p0W.x,y),Pt2di(p1W.x-p0W.x,1),
              mImR, mImG, mImB
          );
     }

}
开发者ID:xialang2012,项目名称:micmac-archeos,代码行数:34,代码来源:bi_scroller.cpp


示例12: bug_11

void bug_11()
{
    Fonc_Num f;
    INT res;
    cout << "should be :  Fonc_Num non initialized\n";
    copy(rectangle(Pt2di(-10,-13),Pt2di(103,105)),f,sigma(res));
}
开发者ID:jakexie,项目名称:micmac,代码行数:7,代码来源:bug_0_all.c


示例13: lpts_square_L1

ElList<Pt2di> lpts_square_L1(INT nb)
{
    return   NewLPt2di(Pt2di( nb,  0))
           +      Pt2di(  0, nb)
           +      Pt2di(-nb,  0)
           +      Pt2di(  0,-nb);
}
开发者ID:jakexie,项目名称:micmac,代码行数:7,代码来源:b_0_36.cpp


示例14: bug_5

void bug_5()
{
    INT res;
    Im2D_U_INT1 b(300,300);
    cout << "should be :  out of reading rle \n";
    copy(rectangle(Pt2di(-10,-13),Pt2di(103,105)),b.in(),sigma(res));
}
开发者ID:jakexie,项目名称:micmac,代码行数:7,代码来源:bug_0_all.c


示例15: while

TestScroller::TestScroller
(
     Video_Win WIN,
     ElImScroller & SCROL
) :
	W			(WIN),
	scrol       (SCROL)
{


	scrol.set(Pt2dr(2000,2000),1);

/*
    	scrol.SetDTrW(Pt2di(323,300));
        for (INT k=0; k<10000; k++)
	{
	     cout << k << "\n";
    	     scrol.SetDTrW(Pt2di(1,1));
    }
*/

	while (true)
	{
	  Clik cl1   = W.disp().clik_press();
   	  // cout << "But " << cl1._b << "\n";
	  switch (cl1._b )
	  {

		   case 2 : 
    			scrol.SetDTrW(Pt2di(-10,0));
           break;
			case 1 :
		  		_mode_tr = FIVE_BOUT || (! cl1.shifted());
          		        //_p0grab = cl1._pt;
          		        _p0grab = Pt2di(cl1._pt); // __NEW
		  		_sc0grab = scrol.sc();
                if (_sc_evt)
                   //scrol.SetScArroundPW(_p0grab,scrol.sc(),false);
                   scrol.SetScArroundPW( Pt2dr(_p0grab),scrol.sc(),false); // __NEW
	      		W.grab(*this);
				_sc_evt = false;
           break;

		   case 4 : 
				SetScale(true);
				_sc_evt = true;
           break;

		   case 5 : 
				SetScale(false);
				_sc_evt = true;
           break;

    		case 3 :
			return;
      }
	}

}
开发者ID:jakexie,项目名称:micmac,代码行数:59,代码来源:b_0_49.cpp


示例16: CorrectRect

void CorrectRect(Pt2di &  aP0,Pt2di &  aP1,const Pt2di & aSz)
{
    aP0 = Inf(aSz,Sup(aP0,Pt2di(0,0)));
    aP1 = Inf(aSz,Sup(aP1,Pt2di(0,0)));

    CorrectNonEmpty(aP0.x,aP1.x,aSz.x);
    CorrectNonEmpty(aP0.y,aP1.y,aSz.y);
}
开发者ID:jakexie,项目名称:micmac-archeos,代码行数:8,代码来源:Extern_Vino.cpp


示例17: lpts_square_Linf

ElList<Pt2di> lpts_square_Linf(INT nb)
{
    nb /= 2;
    return   NewLPt2di(Pt2di( nb, nb))
           +      Pt2di(-nb, nb)
           +      Pt2di(-nb,-nb)
           +      Pt2di( nb,-nb);
}
开发者ID:jakexie,项目名称:micmac,代码行数:8,代码来源:b_0_36.cpp


示例18: DELETE_TAB_MATRICE

Skel_OPB_Comp::~Skel_OPB_Comp() 
{
    if (_skel)
    {
        DELETE_TAB_MATRICE(_skel,dim_in(),Pt2di(0,0),_sz);
        DELETE_MATRICE(_im_init,Pt2di(0,0),_sz);
    }
}
开发者ID:rpankka,项目名称:micmac,代码行数:8,代码来源:opb_skel.cpp


示例19: DELETE_VECTOR

         GenScaleIm<TObj>::~GenScaleIm()
{
	DELETE_VECTOR(_u2wX		,-RAB);
	DELETE_VECTOR(_u2wY		,-RAB);
	DELETE_VECTOR(_Cw2uX	,-RAB);
	DELETE_VECTOR(_Cw2uY	,-RAB);
	DELETE_MATRICE(_line,Pt2di(-RAB,0),Pt2di(std::max(_SzW.x,_SzU.x)+RAB,_nb_chan));
}
开发者ID:jakexie,项目名称:micmac,代码行数:8,代码来源:scale_im_compr.cpp


示例20: Pt2di

PS_Window Data_Mat_PS_Window::kthw(INT x,INT y)
{
    Tjs_El_User.ElAssert
    (
          Pt2di(x,y).in_box(Pt2di(0,0),_nb),
          EEM0 << "invalid request for windows of PS MAT WINDOW"
    );

    return _w[y][x];
}
开发者ID:jakexie,项目名称:micmac-archeos,代码行数:10,代码来源:prim_graph.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ Pthread_create函数代码示例发布时间:2022-05-30
下一篇:
C++ PsychRequireNumInputArgs函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap