Last change
on this file since 767 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
|
Rev | Line | |
---|
[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 | |
---|
| 20 | ZooWatcher |
---|
| 21 | ::ZooWatcher() |
---|
| 22 | { |
---|
| 23 | } |
---|
| 24 | |
---|
| 25 | ZooWatcher |
---|
| 26 | ::ZooWatcher(itk::ProcessObject* process, |
---|
| 27 | const char *comment) |
---|
| 28 | : otb::FilterWatcherBase(process, comment) |
---|
| 29 | { |
---|
| 30 | } |
---|
| 31 | |
---|
| 32 | ZooWatcher |
---|
| 33 | ::ZooWatcher(itk::ProcessObject* process, |
---|
| 34 | const std::string& comment) |
---|
| 35 | : otb::FilterWatcherBase(process, comment.c_str()) |
---|
| 36 | { |
---|
| 37 | } |
---|
| 38 | |
---|
| 39 | void |
---|
| 40 | ZooWatcher |
---|
| 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 | |
---|
| 50 | void |
---|
| 51 | ZooWatcher |
---|
| 52 | ::StartFilter() |
---|
| 53 | { |
---|
| 54 | m_TimeProbe.Start(); |
---|
| 55 | } |
---|
| 56 | |
---|
| 57 | void |
---|
| 58 | ZooWatcher |
---|
| 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.