本文整理汇总了C++中Video_Win::pdisc方法的典型用法代码示例。如果您正苦于以下问题:C++ Video_Win::pdisc方法的具体用法?C++ Video_Win::pdisc怎么用?C++ Video_Win::pdisc使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Video_Win
的用法示例。
在下文中一共展示了Video_Win::pdisc方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ToLoc
void cICL_Courbe::AddSeg
(
Pt2dr P0,
bool isP0OnCerle,
Pt2dr P1,
bool isP1OnCerle
)
{
if (pW)
{
pW->draw_arrow
(
ToLoc(P0),
ToLoc(P1),
Line_St(pW->pdisc()(P8COL::blue),2),
Line_St(pW->pdisc()(P8COL::blue),2),
10.0
);
pW->draw_circle_loc
(
ToLoc(P0),
5.0,
pW->pdisc()(isP0OnCerle?P8COL::yellow : P8COL::green)
);
pW->draw_circle_loc
(
ToLoc(P1),
5.0,
pW->pdisc()(isP1OnCerle?P8COL::yellow : P8COL::green)
);
}
mVArcs.push_back(cICL_Arc(P0,isP0OnCerle,P1,isP1OnCerle));
}
示例2: Show
void cElHJaFacette::Show(REAL aDirH,INT aCoul,bool WithBox)
{
Video_Win aW = *(mPlan->W());
aW.hach(mVPt,Pt2dr::FromPolar(1.0,aDirH),3.0,aW.pdisc()(aCoul));
if (WithBox)
{
aW.draw_rect(mBox._p0,mBox._p1,aW.pdisc()(aCoul));
}
}
示例3: ShowPoint
void cAppliOptimTriplet::ShowPoint(cImOfTriplet * aIm,Pt2df aP,int aCoul,int aRay)
{
Video_Win * aW = aIm->W();
if (aW)
{
Pt2dr aPr(aP.x,aP.y);
aPr = aIm->Im()->CS()->R3toF2(PZ1(aPr));
aW->draw_circle_abs(aPr,aRay,Line_St(aW->pdisc()(aCoul)));
}
}
示例4: TestVisuFTM
void cEtalonnage::TestVisuFTM()
{
INT aSzPh = 4100;
INT aSz = 800;
REAL aZ = aSz / REAL(aSzPh);
Video_Win aW = Video_Win::WStd(Pt2di(aSzPh,aSzPh),aZ);
std::vector<std::string> mVNames = mParam.AllImagesCibles();
for
(
std::vector<string>::const_iterator iTN = mVNames.begin();
iTN != mVNames.end();
iTN++
)
{
std::string aName = NamePointeResult(*iTN,false,true);
cout << aName << "\n";
ELISE_fp aFile(aName.c_str(),ELISE_fp::READ);
string buf;
bool GotEOF = false;
while (! GotEOF)
{
//aFile.fgets(buf,NbBuf,GotEOF,false);
aFile.fgets(buf,GotEOF);
if (GotEOF)
{
}
if ((!GotEOF) && (buf[0] != '#'))
{
INT anId;
REAL anX,anY,aL;
sscanf(buf.c_str(),"%d %lf %lf %lf",&anId,&anX,&anY,&aL);
if (anId>=0)
{
INT aCoul = P8COL::red;
if (aL > 1.0) aCoul = P8COL::blue;
if (aL > 1.5) aCoul = P8COL::green;
aW.draw_circle_abs
(
Pt2dr(anX,anY),
aL*10.0,
aW.pdisc()(aCoul)
);
}
}
}
}
getchar();
}
示例5: PutFileText
void PutFileText(Video_Win aW,const std::string & aName)
{
ELISE_fp aFile (aName.c_str(),ELISE_fp::READ);
int aCpt=0;
char * aCstr = 0;
while ((aCstr = aFile.std_fgets()))
{
aW.fixed_string(Pt2dr(10,15*aCpt +20),aCstr,aW.pdisc()(P8COL::black),true);
aCpt++;
}
aFile.close();
}
示例6:
void cX11_Interface::DrawZoom(const Pt2dr & aPGlob)
{
double aZoom = 10.0;
Pt2dr aPIm = aPGlob- Pt2dr(mAppli->DecRech());
Pt2dr aPMil = Pt2dr(mWZ->sz())/(2.0*aZoom);
Video_Win aWC = mWZ->chc(aPIm-aPMil,Pt2dr(aZoom,aZoom));
ELISE_COPY
(
aWC.all_pts(),
mAppli->ImRechVisu().in(0),
aWC.ogray()
);
aWC.draw_circle_abs(aPIm,4.0,Line_St(aWC.pdisc()(P8COL::blue),3.0));
}
示例7: FiltreRemoveBorderHeter
void FiltreRemoveBorderHeter(Im2D_REAL4 anIm,Im2D_U_INT1 aImMasq,double aCostRegul,double aCostTrans)
{
Pt2di aSz = anIm.sz();
double aVMax,aVMin;
ELISE_COPY(aImMasq.border(1),0,aImMasq.out());
ELISE_COPY(aImMasq.all_pts(),aImMasq.in()!=0,aImMasq.out());
ELISE_COPY(anIm.all_pts(),anIm.in(),VMax(aVMax)|VMin(aVMin));
Video_Win * aW = Video_Win::PtrWStd(aSz);
ELISE_COPY(anIm.all_pts(),(anIm.in()-aVMin) * (255.0/(aVMax-aVMin)),aW->ogray());
std::cout << "VMAX " << aVMax << "\n";
//ELISE_COPY(aW->all_pts(),aImMasq.in(),aW->odisc());
//aW->clik_in();
ELISE_COPY
(
aW->all_pts(),
nflag_close_sym(flag_front8(aImMasq.in_proj()!=0)),
aW->out_graph(Line_St(aW->pdisc()(P8COL::red)))
);
cParamFiltreDepthByPrgDyn aParam = StdGetFromSI(Basic_XML_MM_File("DefFiltrPrgDyn.xml"),ParamFiltreDepthByPrgDyn);
aParam.CostTrans() = aCostTrans;
aParam.CostRegul() = aCostRegul;
Im2D_Bits<1> aNewMasq = FiltrageDepthByProgDyn(anIm,aImMasq,aParam);
ELISE_COPY
(
select(aNewMasq.all_pts(),aNewMasq.in()),
2,
aImMasq.out()
);
TIm2D<U_INT1,INT> aTMasq(aImMasq);
FiltrageCardCC(false,aTMasq,2,0,100);
Neighbourhood aNV4=Neighbourhood::v4();
Neigh_Rel aNrV4 (aNV4);
ELISE_COPY
(
conc
(
select(select(aImMasq.all_pts(),aImMasq.in()==1),aNrV4.red_sum(aImMasq.in()==0)),
aImMasq.neigh_test_and_set(aNV4,1,0,256)
),
3,
Output::onul()
);
ELISE_COPY
(
aNewMasq.all_pts(),
aImMasq.in(),
aW->odisc()
);
/*
ELISE_COPY
(
aW->all_pts(),
nflag_close_sym(flag_front8(aNewMasq.in_proj())),
aW->out_graph(Line_St(aW->pdisc()(P8COL::green)))
);
*/
aW->clik_in();
}
示例8: ComputeSubset
void cASAMG::ComputeSubset(int aNbPts,cResumNuage & aRN)
{
Video_Win * aW = mAppli->Param().VisuLowPts().Val() ? TheWinIm() : 0;
double aSzCel = sqrt(double(mSz.x*mSz.y)/aNbPts);
Pt2di aNb2C = round_up(Pt2dr(mSz)/aSzCel);
Pt2di aPK;
Im2D_U_INT1 anImDist(mSz.x,mSz.y);
TIm2D<U_INT1,INT> aTDist(anImDist);
ELISE_COPY(mMasqN.all_pts(),mMasqN.in(),anImDist.out());
Chamfer::d32.im_dist(anImDist);
if (aW)
{
ELISE_COPY(anImDist.all_pts(),mStdN->ImDef().in()!=0,aW->odisc());
ELISE_COPY(select(anImDist.all_pts(),anImDist.in()>0),P8COL::blue,aW->odisc());
ELISE_COPY(select(anImDist.all_pts(),anImDist.in()>10),P8COL::yellow,aW->odisc());
}
int aNbSomTot = 0;
std::vector<Pt2di> aVPts;
std::vector<int> aVNb;
for (aPK.x=0 ; aPK.x<aNb2C.x ; aPK.x++)
{
Pt2di aP0,aP1;
aP0.x = (aPK.x*mSz.x) / aNb2C.x;
aP1.x = ((aPK.x+1)*mSz.x) / aNb2C.x;
for (aPK.y=0 ; aPK.y<aNb2C.y ; aPK.y++)
{
aP0.y = (aPK.y*mSz.y) / aNb2C.y;
aP1.y = ((aPK.y+1)*mSz.y) / aNb2C.y;
Pt2di aP;
Pt2dr aPMoy(0,0);
int aNbSom=0;
if (aW)
{
aW->draw_rect(Pt2dr(aP0),Pt2dr(aP1),Line_St(aW->pdisc()(P8COL::green)));
}
for (aP.x=aP0.x; aP.x<aP1.x ; aP.x++)
{
for (aP.y=aP0.y; aP.y<aP1.y ; aP.y++)
{
if (mTMasqN.get(aP))
{
aPMoy = aPMoy + Pt2dr(aP);
aNbSom++;
}
}
}
if (aNbSom>0)
{
aPMoy = aPMoy/double(aNbSom);
double aDBest = 1e10;
Pt2di aPBest(0,0);
for (aP.x=aP0.x; aP.x<aP1.x ; aP.x++)
{
for (aP.y=aP0.y; aP.y<aP1.y ; aP.y++)
{
if (mTMasqN.get(aP))
{
double aDist = euclid(Pt2dr(aP),aPMoy) - std::min(6,aTDist.get(aP))/1.8;
if (aDist<aDBest)
{
aDBest = aDist;
aPBest = aP;
}
}
}
}
aVPts.push_back(aPBest);
aVNb.push_back(aNbSom);
/*
cLinkPtFuNu aPF(aPBest.x,aPBest.y,aNbSom);
aVPTR.push_back(aPF);
*/
aNbSomTot += aNbSom;
if (aW)
{
aW->draw_circle_abs(Pt2dr(aPBest),3.0,aW->pdisc()(P8COL::red));
}
}
}
}
aRN.Reset(aVPts.size());
aRN.mNbSom = aNbSomTot;
for (int aK=0 ; aK<int(aVPts.size()); aK++)
{
aRN.mVX.push_back(aVPts[aK].x);
aRN.mVY.push_back(aVPts[aK].y);
aRN.mVNb.push_back(aVNb[aK]);
}
if (aW)
//.........这里部分代码省略.........
示例9: ShowCont
void cElHJaFacette::ShowCont(INT aCoul,Video_Win aW)
{
INT aNb = (int) mVPt.size();
for (INT aK=0 ; aK<aNb ; aK++)
aW.draw_seg(mVPt[aK],mVPt[(aK+1)%aNb],aW.pdisc()(aCoul));
}
示例10: aBoxW
void cElHJaPlan3D::Show
(
Video_Win aW,
INT aCoul,
bool ShowDroite,
bool ShowInterEmpr
)
{
if (aCoul >=0)
ELISE_COPY(aW.all_pts(),aCoul,aW.ogray());
Box2dr aBoxW(Pt2dr(0,0),Pt2dr(aW.sz()));
for (INT aK=0; aK<INT(mVInters.size()) ; aK++)
{
cElHJaDroite * aDr =mVInters[aK];
if (aDr)
{
ElSeg3D aSeg = aDr->Droite();
Pt3dr aQ0 = aSeg.P0();
Pt3dr aQ1 = aSeg.P1();
Pt2dr aP0(aQ0.x,aQ0.y);
Pt2dr aP1(aQ1.x,aQ1.y);
Seg2d aS(aP0,aP1);
Seg2d aSC = aS.clipDroite(aBoxW);
if (ShowDroite && (! aSC.empty()))
{
aW.draw_seg(aSC.p0(),aSC.p1(),aW.pdisc()(P8COL::magenta));
}
}
}
tFullSubGrPl aSGrFul;
if (ShowInterEmpr)
{
for (tItSomGrPl itS=mGr->begin(aSGrFul) ; itS.go_on() ; itS++)
{
aW.draw_circle_loc
(
(*itS).attr().Pt(),
4.0,
aW.pdisc()(P8COL::blue)
);
for (tItArcGrPl itA=(*itS).begin(aSGrFul) ; itA.go_on() ; itA++)
{
tSomGrPl &s1 = (*itA).s1();
tSomGrPl &s2 = (*itA).s2();
if (&s1 < &s2)
{
aW.draw_seg
(
s1.attr().Pt(),
s2.attr().Pt(),
aW.pdisc()(P8COL::black)
);
}
}
}
}
// for (INT aK=0 ; aK<INT(mFacOblig.size()) ; aK++)
// mFacOblig[aK]->Show(PI/2.0,P8COL::cyan,false);
}