ImageMonitorStatisticsWidget.cpp
Go to the documentation of this file.
1 /*
2 * This file is part of ArmarX.
3 *
4 * ArmarX is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 *
8 * ArmarX is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * @package ArmarX::
17 * @author Kai Welke ( welke at kit dot edu)
18 * @date 2012
19 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20 * GNU General Public License
21 */
22 
25 
26 using namespace armarx;
27 
28 namespace visionx
29 {
30  ImageMonitorStatisticsWidget::ImageMonitorStatisticsWidget()
31  {
32  ui.setupUi(this);
33  }
34 
35  ImageMonitorStatisticsWidget::~ImageMonitorStatisticsWidget()
36  {
37 
38  }
39 
40  void ImageMonitorStatisticsWidget::update(std::string providerName, ImageProviderInfo providerInfo, ImageTransferStats transferStats)
41  {
42  // provider info
43  ui.providerNameLabel->setText(QString(providerName.c_str()));
44  QString numberImages = QString("%1").arg(providerInfo.numberImages);
45  ui.numberImagesLabel->setText(numberImages);
46  QString imageSize = QString("%1x%2").arg(providerInfo.imageFormat.dimension.width).arg(providerInfo.imageFormat.dimension.height);
47  ui.imageSizeLabel->setText(imageSize);
48 
49  std::string imageTypeName = visionx::tools::imageTypeToTypeName(providerInfo.imageFormat.type);
50  ui.imageFormatLabel->setText(QString(imageTypeName.c_str()));
51 
52  // broadcast statistics
53  ui.bcFpsLabel->setText(QString("%1").arg(transferStats.imageProviderFPS.getFPS()));
54  ui.bcCycleMeanLabel->setText(QString("%1").arg(transferStats.imageProviderFPS.getMeanCycleTimeMS()));
55  ui.bcCycleMinLabel->setText(QString("%1").arg(transferStats.imageProviderFPS.getMinCycleTimeMS()));
56  ui.bcCycleMaxLabel->setText(QString("%1").arg(transferStats.imageProviderFPS.getMaxCycleTimeMS()));
57 
58  // polling statistics
59  ui.plFpsLabel->setText(QString("%1").arg(transferStats.pollingFPS.getFPS()));
60  ui.plCycleMeanLabel->setText(QString("%1").arg(transferStats.pollingFPS.getMeanCycleTimeMS()));
61  ui.plCycleMinLabel->setText(QString("%1").arg(transferStats.pollingFPS.getMinCycleTimeMS()));
62  ui.plCycleMaxLabel->setText(QString("%1").arg(transferStats.pollingFPS.getMaxCycleTimeMS()));
63  }
64 }
visionx::FPSCounter::getMinCycleTimeMS
float getMinCycleTimeMS()
Get minimum cycle time since start.
Definition: FPSCounter.cpp:154
visionx::ImageProviderInfo::numberImages
int numberImages
Number of images.
Definition: ImageProcessor.h:506
visionx
ArmarX headers.
Definition: OpenPoseStressTest.h:38
visionx::ImageTransferStats
The ImageTransferStats class provides information on the connection between ImageProvider and ImagePr...
Definition: ImageProcessor.h:441
visionx::FPSCounter::getFPS
float getFPS()
Get frames per second.
Definition: FPSCounter.cpp:127
ImageMonitorStatisticsWidget.h
visionx::ImageTransferStats::pollingFPS
FPSCounter pollingFPS
Statistics for the images polled by the ImageProcessor.
Definition: ImageProcessor.h:458
visionx::ImageTransferStats::imageProviderFPS
FPSCounter imageProviderFPS
Statistics for the images announced by the ImageProvider.
Definition: ImageProcessor.h:453
visionx::ImageProviderInfo::imageFormat
ImageFormatInfo imageFormat
Image format struct that contains all necessary image information.
Definition: ImageProcessor.h:496
visionx::FPSCounter::getMeanCycleTimeMS
float getMeanCycleTimeMS()
Get mean cycle time over last 10 frames.
Definition: FPSCounter.cpp:137
visionx::ImageProviderInfo
Definition: ImageProcessor.h:466
visionx::tools::imageTypeToTypeName
std::string imageTypeToTypeName(const ImageType imageType)
Converts an image type into a string integer.
Definition: TypeMapping.cpp:70
visionx::FPSCounter::getMaxCycleTimeMS
float getMaxCycleTimeMS()
Get maximum cycle time since start.
Definition: FPSCounter.cpp:164
armarx::armem::server::ltm::util::mongodb::detail::update
bool update(mongocxx::collection &coll, const nlohmann::json &query, const nlohmann::json &update)
Definition: mongodb.cpp:67
TypeMapping.h
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28