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

Last change on this file since 962 was 962, checked in by djay, 3 years ago

Update OGC API - Processes documentation and implementation, providing a browsable User Interface to Processes.

  • Property svn:keywords set to Id
File size: 1.7 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      if(progressPercent>iCounter){
48        updateStatus(m_Conf,progressPercent,m_Comment.c_str());
49        iCounter=progressPercent;
50      }
51    }
52}
53
54void
55ZooWatcher
56::StartFilter()
57{
58#if OTB_VERSION_MAJOR < 6
59  m_TimeProbe.Start();
60#endif
61  iCounter=-1;
62}
63
64void
65ZooWatcher
66::EndFilter()
67{
68#if OTB_VERSION_MAJOR < 6
69  m_TimeProbe.Stop();
70  std::ostringstream elapsedTime;
71  elapsedTime.precision(1);
72  elapsedTime << m_TimeProbe.GetMean();
73
74  std::cerr << " (OTB Execution: "
75            << elapsedTime.str()
76            << " seconds)"
77            << std::endl;
78#endif
79}
Note: See TracBrowser for help on using the repository browser.

Search

Context Navigation

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