本文整理汇总了C++中spGframe_t::addRoi方法的典型用法代码示例。如果您正苦于以下问题:C++ spGframe_t::addRoi方法的具体用法?C++ spGframe_t::addRoi怎么用?C++ spGframe_t::addRoi使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类spGframe_t
的用法示例。
在下文中一共展示了spGframe_t::addRoi方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Roi
/*
* Constructor from data location.
* Assume gf is valid.
*/
Line::Line(spGframe_t gf, spCoordVector_t dpts, bool pixflag) :
Roi() {
created_type = ROI_LINE;
init(gf, 2);
if(pixflag) {
pntData = dpts;
setMagnetCoordsFromPixels(); // TODO: Should be set from data
} else {
magnetCoords = dpts;
setDataPntsFromMagnet();
}
setPixPntsFromData(); // Sets pntPix, npnts, min/max
gf->addRoi(this);
pntData->name = "Line";
magnetCoords->name="Line";
}
示例2: Roi
/*
* Constructor from data location.
* Assume gf is valid.
*/
Point::Point(spGframe_t gf, spCoordVector_t dpts, bool pixflag) :
Roi() {
init(gf, 1);
created_type = ROI_POINT;
myID = ++id; // Unique ID for this Point ROI
// note: dpts is in magnet frame
if(pixflag) {
pntData = dpts;
setMagnetCoordsFromPixels(); // TODO: Should be set from data
} else {
magnetCoords = dpts;
setDataPntsFromMagnet();
}
setPixPntsFromData(); // Sets pntPix, npnts, min/max
gf->addRoi(this);
pntData->name = "Point";
magnetCoords->name="Point";
}
示例3: Polygon
/*
* Constructor from data location.
* Assume gf is valid.
*/
Polyline::Polyline(spGframe_t gf, spCoordVector_t dpts, bool pixflag) :
Polygon() {
init(gf, dpts->coords.size());
created_type = ROI_POLYGON_OPEN;
closed = false;
initEdgelist();
if(pixflag) {
pntData = dpts;
setMagnetCoordsFromPixels(); // TODO: Should be set from data
} else {
magnetCoords = dpts;
setDataPntsFromMagnet();
}
setPixPntsFromData(); // Sets pntPix, npnts, min/max
gf->addRoi(this);
pntData->name = "Polyline";
magnetCoords->name="Polyline";
}