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

Last change on this file since 633 was 560, checked in by djay, 10 years ago

Small fix in copyright location.

  • Property svn:keywords set to Id
File size: 1.5 KB
RevLine 
[558]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
[560]14  See Ref: http://hg.orfeo-toolbox.org/OTB/ Copyright
[558]15
16=========================================================================*/
17#include "otbZooWatcher.h"
18#include "service_internal.h"
19
20ZooWatcher
21::ZooWatcher()
22{
23}
24
25ZooWatcher
26::ZooWatcher(itk::ProcessObject* process,
27             const char *comment)
28  : otb::FilterWatcherBase(process, comment)
29{
30}
31
32ZooWatcher
33::ZooWatcher(itk::ProcessObject* process,
34             const std::string& comment)
35  : otb::FilterWatcherBase(process, comment.c_str())
36{
37}
38
39void
40ZooWatcher
41::ShowProgress()
42{
43  if (m_Process)
44    {
45      int progressPercent = static_cast<int>(m_Process->GetProgress() * 100);
46      updateStatus(m_Conf,progressPercent,m_Comment.c_str());
47    }
48}
49
50void
51ZooWatcher
52::StartFilter()
53{
54  m_TimeProbe.Start();
55}
56
57void
58ZooWatcher
59::EndFilter()
60{
61  m_TimeProbe.Stop();
62  std::ostringstream elapsedTime;
63  elapsedTime.precision(1);
64  elapsedTime << m_TimeProbe.GetMean();
65
66  std::cerr << " (OTB Execution: "
67            << elapsedTime.str()
68            << " seconds)"
69            << std::endl;
70}
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