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 
24 
26 
27 using namespace armarx;
28 
29 namespace visionx
30 {
31  ImageMonitorStatisticsWidget::ImageMonitorStatisticsWidget()
32  {
33  ui.setupUi(this);
34  }
35 
36  ImageMonitorStatisticsWidget::~ImageMonitorStatisticsWidget()
37  {
38  }
39 
40  void
41  ImageMonitorStatisticsWidget::update(std::string providerName,
42  ImageProviderInfo providerInfo,
43  ImageTransferStats transferStats)
44  {
45  // provider info
46  ui.providerNameLabel->setText(QString(providerName.c_str()));
47  QString numberImages = QString("%1").arg(providerInfo.numberImages);
48  ui.numberImagesLabel->setText(numberImages);
49  QString imageSize = QString("%1x%2")
50  .arg(providerInfo.imageFormat.dimension.width)
51  .arg(providerInfo.imageFormat.dimension.height);
52  ui.imageSizeLabel->setText(imageSize);
53 
54  std::string imageTypeName =
56  ui.imageFormatLabel->setText(QString(imageTypeName.c_str()));
57 
58  // broadcast statistics
59  ui.bcFpsLabel->setText(QString("%1").arg(transferStats.imageProviderFPS.getFPS()));
60  ui.bcCycleMeanLabel->setText(
61  QString("%1").arg(transferStats.imageProviderFPS.getMeanCycleTimeMS()));
62  ui.bcCycleMinLabel->setText(
63  QString("%1").arg(transferStats.imageProviderFPS.getMinCycleTimeMS()));
64  ui.bcCycleMaxLabel->setText(
65  QString("%1").arg(transferStats.imageProviderFPS.getMaxCycleTimeMS()));
66 
67  // polling statistics
68  ui.plFpsLabel->setText(QString("%1").arg(transferStats.pollingFPS.getFPS()));
69  ui.plCycleMeanLabel->setText(
70  QString("%1").arg(transferStats.pollingFPS.getMeanCycleTimeMS()));
71  ui.plCycleMinLabel->setText(
72  QString("%1").arg(transferStats.pollingFPS.getMinCycleTimeMS()));
73  ui.plCycleMaxLabel->setText(
74  QString("%1").arg(transferStats.pollingFPS.getMaxCycleTimeMS()));
75  }
76 } // namespace visionx
visionx::FPSCounter::getMinCycleTimeMS
float getMinCycleTimeMS()
Get minimum cycle time since start.
Definition: FPSCounter.cpp:163
visionx::ImageProviderInfo::numberImages
int numberImages
Number of images.
Definition: ImageProcessor.h:519
visionx
ArmarX headers.
Definition: OpenPoseStressTest.h:38
visionx::ImageTransferStats
The ImageTransferStats class provides information on the connection between ImageProvider and ImagePr...
Definition: ImageProcessor.h:455
visionx::FPSCounter::getFPS
float getFPS()
Get frames per second.
Definition: FPSCounter.cpp:134
ImageMonitorStatisticsWidget.h
visionx::ImageTransferStats::pollingFPS
FPSCounter pollingFPS
Statistics for the images polled by the ImageProcessor.
Definition: ImageProcessor.h:472
visionx::ImageTransferStats::imageProviderFPS
FPSCounter imageProviderFPS
Statistics for the images announced by the ImageProvider.
Definition: ImageProcessor.h:467
visionx::ImageProviderInfo::imageFormat
ImageFormatInfo imageFormat
Image format struct that contains all necessary image information.
Definition: ImageProcessor.h:509
visionx::FPSCounter::getMeanCycleTimeMS
float getMeanCycleTimeMS()
Get mean cycle time over last 10 frames.
Definition: FPSCounter.cpp:145
visionx::ImageProviderInfo
Definition: ImageProcessor.h:479
visionx::tools::imageTypeToTypeName
std::string imageTypeToTypeName(const ImageType imageType)
Converts an image type into a string integer.
Definition: TypeMapping.cpp:72
visionx::FPSCounter::getMaxCycleTimeMS
float getMaxCycleTimeMS()
Get maximum cycle time since start.
Definition: FPSCounter.cpp:174
armarx::armem::server::ltm::util::mongodb::detail::update
bool update(mongocxx::collection &coll, const nlohmann::json &query, const nlohmann::json &update)
Definition: mongodb.cpp:68
TypeMapping.h
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:27