本文整理汇总了C++中GeoImage::filename方法的典型用法代码示例。如果您正苦于以下问题:C++ GeoImage::filename方法的具体用法?C++ GeoImage::filename怎么用?C++ GeoImage::filename使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GeoImage
的用法示例。
在下文中一共展示了GeoImage::filename方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: qDebug
/** return the maximum resolution in the list of images */
float
GeoImageList::maxResolution()
{
if (!minMaxResUptodate_) {
minRes_ = -1;
maxRes_ = 500;
qDebug("GeoImageList::maxResolution");
QDictIterator < GeoImage > it = QDictIterator < GeoImage > (*this);
for (; it.current(); ++it) {
GeoImage *img = it.current();
qDebug("%s: xres: %f yres: %f",
(img->filename()).latin1(),
img->resolutionX(), img->resolutionY());
float res = it.current()->resolutionX();
if (res > minRes_)
minRes_ = res;
if (res < maxRes_)
maxRes_ = res;
res = it.current()->resolutionY();
if (res > minRes_)
minRes_ = res;
if (res < maxRes_)
maxRes_ = res;
}
minMaxResUptodate_ = true;
}
return maxRes_;
}
示例2: qDebug
/** return the maximum resolution in the list of images */
float
GeoImageList::maxResolution()
{
if (!minMaxResUptodate_) {
minRes_ = -1;
maxRes_ = 500;
qDebug("GeoImageList::maxResolution");
Iterator it = begin();
for (; it!=end(); ++it) {
GeoImage *img = it.value();
qDebug("%s: xres: %f yres: %f",
img->filename().toLatin1().constData(),
img->resolutionX(),
img->resolutionY());
float res = img->resolutionX();
if (res > minRes_)
minRes_ = res;
if (res < maxRes_)
maxRes_ = res;
res = img->resolutionY();
if (res > minRes_)
minRes_ = res;
if (res < maxRes_)
maxRes_ = res;
}
minMaxResUptodate_ = true;
}
return maxRes_;
}
示例3: nodeTagTable
/** read a list of GeoImage and the attributes through parser */
void
GeoImageList::read(MLParser & parser)
{
minMaxResUptodate_ = false;
qDebug("GeoImageList::read(parser)");
list_.clear();
QString keywords[] = { "geoimage", "geoimagelist", "" };
const MLTagTable nodeTagTable(keywords);
const int TOK_GEOIMAGE = 1;
const int TOK_GEOIMAGE_LIST = 2;
int tag;
#ifdef WIN32
geoNorth_ = -1e38F;
geoSouth_ = 1e38F;
geoWest_ = 1e38F;
geoEast_ = -1e38F;
#else
geoNorth_ = -1e36;
geoSouth_ = +1e36;
geoWest_ = +1e36;
geoEast_ = -1e36;
#endif
do {
tag = parser.tag(nodeTagTable);
switch (tag) {
case TOK_GEOIMAGE:{
GeoImage *gi = new GeoImage(parser); //parse geoimage
#ifdef WIN32
if (gi == 0){
cout << "Out of Memory..6";
exit(1);
}
#endif
if (gi->geoNorth() > geoNorth_)
geoNorth_ = gi->geoNorth();
if (gi->geoSouth() < geoSouth_)
geoSouth_ = gi->geoSouth();
if (gi->geoEast() > geoEast_)
geoEast_ = gi->geoEast();
if (gi->geoWest() < geoWest_)
geoWest_ = gi->geoWest();
insert(*((*gi)["key"]), gi); //insert read geoimage
list_ += *((*gi)["key"]); //fill additional list of image names
break;
}
default:{
ArgDict *args = parser.args();
delete args;
break;
}
}
} while ((tag != MLParser::END_OF_FILE) && (tag != -TOK_GEOIMAGE_LIST));
//test images and create a structure for the images
QString key;
for (QStringList::Iterator it = list_.begin(); it != list_.end(); ++it) {
key = *it;
GeoImage *img = find(key);
qDebug("## GeoImageList::read(parser)" + img->filename());
img->load();
}
}