source: trunk/zoo-project/zoo-kernel/otbZooWatcher.cxx @ 937

Last change on this file since 937 was 937, checked in by djay, 6 years ago

Remove undefined m_TimeProbe.

  • Property svn:keywords set to Id
File size: 1.6 KB
Line 
1/*=========================================================================
2
3  Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
4  See OTBCopyright.txt for details.
5
6  Some parts of this code are derived from ITK. See ITKCopyright.txt
7  for details.
8
9
10     This software is distributed WITHOUT ANY WARRANTY; without even
11     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12     PURPOSE.  See the above copyright notices for more information.
13
14  See Ref: http://hg.orfeo-toolbox.org/OTB/ Copyright
15
16=========================================================================*/
17#include "otbZooWatcher.h"
18#include "otbConfigure.h"
19#include "service_internal.h"
20
21ZooWatcher
22::ZooWatcher()
23{
24}
25
26ZooWatcher
27::ZooWatcher(itk::ProcessObject* process,
28             const char *comment)
29  : otb::FilterWatcherBase(process, comment)
30{
31}
32
33ZooWatcher
34::ZooWatcher(itk::ProcessObject* process,
35             const std::string& comment)
36  : otb::FilterWatcherBase(process, comment.c_str())
37{
38}
39
40void
41ZooWatcher
42::ShowProgress()
43{
44  if (m_Process)
45    {
46      int progressPercent = static_cast<int>(m_Process->GetProgress() * 100);
47      updateStatus(m_Conf,progressPercent,m_Comment.c_str());
48    }
49}
50
51void
52ZooWatcher
53::StartFilter()
54{
55#if OTB_VERSION_MAJOR < 6
56  m_TimeProbe.Start();
57#endif
58}
59
60void
61ZooWatcher
62::EndFilter()
63{
64#if OTB_VERSION_MAJOR < 6
65  m_TimeProbe.Stop();
66  std::ostringstream elapsedTime;
67  elapsedTime.precision(1);
68  elapsedTime << m_TimeProbe.GetMean();
69
70  std::cerr << " (OTB Execution: "
71            << elapsedTime.str()
72            << " seconds)"
73            << std::endl;
74#endif
75}
Note: See TracBrowser for help on using the repository browser.

Search

ZOO Sponsors

http://www.zoo-project.org/trac/chrome/site/img/geolabs-logo.pnghttp://www.zoo-project.org/trac/chrome/site/img/neogeo-logo.png http://www.zoo-project.org/trac/chrome/site/img/apptech-logo.png http://www.zoo-project.org/trac/chrome/site/img/3liz-logo.png http://www.zoo-project.org/trac/chrome/site/img/gateway-logo.png

Become a sponsor !

Knowledge partners

http://www.zoo-project.org/trac/chrome/site/img/ocu-logo.png http://www.zoo-project.org/trac/chrome/site/img/gucas-logo.png http://www.zoo-project.org/trac/chrome/site/img/polimi-logo.png http://www.zoo-project.org/trac/chrome/site/img/fem-logo.png http://www.zoo-project.org/trac/chrome/site/img/supsi-logo.png http://www.zoo-project.org/trac/chrome/site/img/cumtb-logo.png

Become a knowledge partner

Related links

http://zoo-project.org/img/ogclogo.png http://zoo-project.org/img/osgeologo.png