Commit 4609c856 authored by Laurentiu Nicola's avatar Laurentiu Nicola

PERF: Replace itk::TimeProbe with otb::Stopwatch

parent 7afea3ff
...@@ -46,8 +46,6 @@ ...@@ -46,8 +46,6 @@
#include <otbImageFileReader.h> #include <otbImageFileReader.h>
#include "otbImageFileWriter.h" #include "otbImageFileWriter.h"
#include "itkTimeProbe.h"
int main(int itkNotUsed(argc), char * argv[]) int main(int itkNotUsed(argc), char * argv[])
{ {
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
#include "otbGeometriesToGeometriesFilter.h" #include "otbGeometriesToGeometriesFilter.h"
#include <cassert> #include <cassert>
#include "otbGeometriesSet.h" #include "otbGeometriesSet.h"
#include "itkTimeProbe.h" #include "otbStopwatch.h"
#include "otbMacro.h" #include "otbMacro.h"
/*===========================================================================*/ /*===========================================================================*/
...@@ -200,8 +200,7 @@ void otb::GeometriesToGeometriesFilter::GenerateData(void ) ...@@ -200,8 +200,7 @@ void otb::GeometriesToGeometriesFilter::GenerateData(void )
assert(output && "Cann't filter a nil geometries set"); assert(output && "Cann't filter a nil geometries set");
// Start recursive processing // Start recursive processing
itk::TimeProbe chrono; otb::Stopwatch chrono = otb::Stopwatch::StartNew();
chrono.Start();
if (input) if (input)
{ {
this->Process(*input, *output); this->Process(*input, *output);
...@@ -212,7 +211,7 @@ void otb::GeometriesToGeometriesFilter::GenerateData(void ) ...@@ -212,7 +211,7 @@ void otb::GeometriesToGeometriesFilter::GenerateData(void )
} }
chrono.Stop(); chrono.Stop();
otbMsgDevMacro(<< "GeometriesToGeometriesFilter: geometries processed in " << chrono.GetMean() << " seconds."); otbMsgDevMacro(<< "GeometriesToGeometriesFilter: geometries processed in " << chrono.GetElapsedMilliseconds() << " ms.");
} }
/*virtual*/ /*virtual*/
......
...@@ -29,7 +29,6 @@ ...@@ -29,7 +29,6 @@
// Statistic XML Reader // Statistic XML Reader
#include "otbStatisticsXMLFileReader.h" #include "otbStatisticsXMLFileReader.h"
#include "itkTimeProbe.h"
#include "otbStandardFilterWatcher.h" #include "otbStandardFilterWatcher.h"
// Normalize the samples // Normalize the samples
......
...@@ -18,6 +18,8 @@ ...@@ -18,6 +18,8 @@
* limitations under the License. * limitations under the License.
*/ */
#include <numeric>
#include "otbWrapperApplication.h" #include "otbWrapperApplication.h"
#include "otbWrapperApplicationFactory.h" #include "otbWrapperApplicationFactory.h"
...@@ -195,7 +197,7 @@ private: ...@@ -195,7 +197,7 @@ private:
if ( HasValue("in") ) if ( HasValue("in") )
{ {
typedef otb::ImageMetadataInterfaceBase ImageMetadataInterfaceType; typedef otb::ImageMetadataInterfaceBase ImageMetadataInterfaceType;
ImageMetadataInterfaceType::Pointer metadataInterface = ImageMetadataInterfaceType::Pointer metadataInterface =
ImageMetadataInterfaceFactory::CreateIMI(GetParameterImage("in")->GetMetaDataDictionary()); ImageMetadataInterfaceFactory::CreateIMI(GetParameterImage("in")->GetMetaDataDictionary());
int nbBand = GetParameterImage("in")->GetNumberOfComponentsPerPixel(); int nbBand = GetParameterImage("in")->GetNumberOfComponentsPerPixel();
...@@ -215,7 +217,7 @@ private: ...@@ -215,7 +217,7 @@ private:
SetDefaultParameterInt("channels.rgb.blue", bandBlue); SetDefaultParameterInt("channels.rgb.blue", bandBlue);
} }
} }
} }
......
...@@ -26,8 +26,6 @@ ...@@ -26,8 +26,6 @@
#include "otbMultiToMonoChannelExtractROI.h" #include "otbMultiToMonoChannelExtractROI.h"
#include "itkTimeProbe.h"
namespace otb namespace otb
{ {
namespace Wrapper namespace Wrapper
......
...@@ -34,8 +34,6 @@ ...@@ -34,8 +34,6 @@
#include "otbImageList.h" #include "otbImageList.h"
#include "otbImageListToVectorImageFilter.h" #include "otbImageListToVectorImageFilter.h"
#include "itkTimeProbe.h"
namespace otb namespace otb
{ {
namespace Wrapper namespace Wrapper
......
...@@ -34,8 +34,6 @@ ...@@ -34,8 +34,6 @@
#include "otbImageList.h" #include "otbImageList.h"
#include "otbImageListToVectorImageFilter.h" #include "otbImageListToVectorImageFilter.h"
#include "itkTimeProbe.h"
namespace otb namespace otb
{ {
namespace Wrapper namespace Wrapper
......
...@@ -35,7 +35,6 @@ ...@@ -35,7 +35,6 @@
#include "otbImageList.h" #include "otbImageList.h"
#include "otbImageListToVectorImageFilter.h" #include "otbImageListToVectorImageFilter.h"
#include "itkTimeProbe.h"
#include "otbConvexOrConcaveClassificationFilter.h" #include "otbConvexOrConcaveClassificationFilter.h"
#include "otbMorphologicalProfilesSegmentationFilter.h" #include "otbMorphologicalProfilesSegmentationFilter.h"
......
...@@ -35,7 +35,6 @@ ...@@ -35,7 +35,6 @@
#include "otbImageList.h" #include "otbImageList.h"
#include "otbImageListToVectorImageFilter.h" #include "otbImageListToVectorImageFilter.h"
#include "itkTimeProbe.h"
#include "otbConvexOrConcaveClassificationFilter.h" #include "otbConvexOrConcaveClassificationFilter.h"
#include "otbMorphologicalProfilesSegmentationFilter.h" #include "otbMorphologicalProfilesSegmentationFilter.h"
#include "otbGeodesicMorphologyIterativeDecompositionImageFilter.h" #include "otbGeodesicMorphologyIterativeDecompositionImageFilter.h"
......
...@@ -36,7 +36,6 @@ ...@@ -36,7 +36,6 @@
#include "otbImageList.h" #include "otbImageList.h"
#include "otbImageListToVectorImageFilter.h" #include "otbImageListToVectorImageFilter.h"
#include "itkTimeProbe.h"
#include "otbConvexOrConcaveClassificationFilter.h" #include "otbConvexOrConcaveClassificationFilter.h"
#include "otbMorphologicalProfilesSegmentationFilter.h" #include "otbMorphologicalProfilesSegmentationFilter.h"
#include "otbGeodesicMorphologyIterativeDecompositionImageFilter.h" #include "otbGeodesicMorphologyIterativeDecompositionImageFilter.h"
......
...@@ -28,8 +28,6 @@ ...@@ -28,8 +28,6 @@
#include "otbImageList.h" #include "otbImageList.h"
#include "otbImageListToVectorImageFilter.h" #include "otbImageListToVectorImageFilter.h"
#include "itkTimeProbe.h"
namespace otb namespace otb
{ {
namespace Wrapper namespace Wrapper
......
...@@ -22,9 +22,9 @@ ...@@ -22,9 +22,9 @@
#ifndef otbFilterWatcherBase_h #ifndef otbFilterWatcherBase_h
#define otbFilterWatcherBase_h #define otbFilterWatcherBase_h
#include "otbStopwatch.h"
#include "itkCommand.h" #include "itkCommand.h"
#include "itkProcessObject.h" #include "itkProcessObject.h"
#include "itkTimeProbe.h"
#include "OTBCommonExport.h" #include "OTBCommonExport.h"
...@@ -82,10 +82,10 @@ public: ...@@ -82,10 +82,10 @@ public:
return m_Comment; return m_Comment;
} }
/** Get a reference to the TimeProbe */ /** Get a reference to the Stopwatch */
itk::TimeProbe& GetTimeProbe() otb::Stopwatch& GetStopwatch()
{ {
return m_TimeProbe; return m_Stopwatch;
} }
protected: protected:
...@@ -126,7 +126,7 @@ protected: ...@@ -126,7 +126,7 @@ protected:
virtual void EndFilter() = 0; virtual void EndFilter() = 0;
/** Computing time */ /** Computing time */
itk::TimeProbe m_TimeProbe; otb::Stopwatch m_Stopwatch;
/** Associated comment */ /** Associated comment */
std::string m_Comment; std::string m_Comment;
......
...@@ -22,9 +22,10 @@ ...@@ -22,9 +22,10 @@
#ifndef otbWriterWatcherBase_h #ifndef otbWriterWatcherBase_h
#define otbWriterWatcherBase_h #define otbWriterWatcherBase_h
#include "otbStopwatch.h"
#include "itkCommand.h" #include "itkCommand.h"
#include "itkProcessObject.h" #include "itkProcessObject.h"
#include "itkTimeProbe.h"
#include "OTBCommonExport.h" #include "OTBCommonExport.h"
...@@ -89,10 +90,10 @@ public: ...@@ -89,10 +90,10 @@ public:
return m_Comment; return m_Comment;
} }
/** Get a reference to the TimeProbe */ /** Get a reference to the Stopwatch */
itk::TimeProbe& GetTimeProbe() otb::Stopwatch& GetStopwatch()
{ {
return m_TimeProbe; return m_Stopwatch;
} }
protected: protected:
...@@ -116,7 +117,7 @@ protected: ...@@ -116,7 +117,7 @@ protected:
virtual void EndFilter() = 0; virtual void EndFilter() = 0;
/** Computing time */ /** Computing time */
itk::TimeProbe m_TimeProbe; otb::Stopwatch m_Stopwatch;
/** Associated comment */ /** Associated comment */
std::string m_Comment; std::string m_Comment;
......
...@@ -81,7 +81,7 @@ FilterWatcherBase ...@@ -81,7 +81,7 @@ FilterWatcherBase
} }
// Initialize state // Initialize state
m_TimeProbe = watch.m_TimeProbe; m_Stopwatch = watch.m_Stopwatch;
m_Process = watch.m_Process; m_Process = watch.m_Process;
m_Comment = watch.m_Comment; m_Comment = watch.m_Comment;
...@@ -125,7 +125,7 @@ FilterWatcherBase ...@@ -125,7 +125,7 @@ FilterWatcherBase
} }
// Initialize state // Initialize state
m_TimeProbe = watch.m_TimeProbe; m_Stopwatch = watch.m_Stopwatch;
m_Process = watch.m_Process; m_Process = watch.m_Process;
m_Comment = watch.m_Comment; m_Comment = watch.m_Comment;
......
...@@ -100,7 +100,7 @@ void ...@@ -100,7 +100,7 @@ void
StandardFilterWatcher StandardFilterWatcher
::StartFilter() ::StartFilter()
{ {
m_TimeProbe.Start(); m_Stopwatch.Start();
std::cout << (m_Process.GetPointer() ? m_Process->GetNameOfClass() : "None") std::cout << (m_Process.GetPointer() ? m_Process->GetNameOfClass() : "None")
<< " \"" << m_Comment << "\" " << std::endl; << " \"" << m_Comment << "\" " << std::endl;
} }
...@@ -109,9 +109,9 @@ void ...@@ -109,9 +109,9 @@ void
StandardFilterWatcher StandardFilterWatcher
::EndFilter() ::EndFilter()
{ {
m_TimeProbe.Stop(); m_Stopwatch.Stop();
std::cout << std::endl << "Filter took " std::cout << std::endl << "Filter took "
<< m_TimeProbe.GetMean() << m_Stopwatch.GetElapsedMilliseconds() / 1000
<< " seconds." << std::endl; << " seconds." << std::endl;
} }
} // end namespace otb } // end namespace otb
...@@ -94,19 +94,19 @@ void ...@@ -94,19 +94,19 @@ void
StandardOneLineFilterWatcher StandardOneLineFilterWatcher
::StartFilter() ::StartFilter()
{ {
m_TimeProbe.Start(); m_Stopwatch.Start();
} }
void void
StandardOneLineFilterWatcher StandardOneLineFilterWatcher
::EndFilter() ::EndFilter()
{ {
m_TimeProbe.Stop(); m_Stopwatch.Stop();
// Ensure we don't depend on std::cout configuration // Ensure we don't depend on std::cout configuration
std::ostringstream elapsedTime; std::ostringstream elapsedTime;
elapsedTime.precision(1); elapsedTime.precision(1);
elapsedTime << m_TimeProbe.GetMean(); elapsedTime << m_Stopwatch.GetElapsedMilliseconds() / 1000;
std::cout << " (" std::cout << " ("
<< elapsedTime.str() << elapsedTime.str()
......
...@@ -147,7 +147,7 @@ void ...@@ -147,7 +147,7 @@ void
StandardWriterWatcher StandardWriterWatcher
::StartWriter() ::StartWriter()
{ {
m_TimeProbe.Start(); m_Stopwatch.Start();
std::cout << "Writing task: " << " \"" << m_Comment << "\" " << std::endl; std::cout << "Writing task: " << " \"" << m_Comment << "\" " << std::endl;
std::cout << "Writer type: " << (m_Process.GetPointer() ? m_Process->GetNameOfClass() : "None") << std::endl; std::cout << "Writer type: " << (m_Process.GetPointer() ? m_Process->GetNameOfClass() : "None") << std::endl;
std::cout << "Filter type: " << (m_SourceProcess.GetPointer() ? m_SourceProcess->GetNameOfClass() : "None") << std::cout << "Filter type: " << (m_SourceProcess.GetPointer() ? m_SourceProcess->GetNameOfClass() : "None") <<
...@@ -158,9 +158,9 @@ void ...@@ -158,9 +158,9 @@ void
StandardWriterWatcher StandardWriterWatcher
::EndWriter() ::EndWriter()
{ {
m_TimeProbe.Stop(); m_Stopwatch.Stop();
std::cout << std::endl << "Writing task took " std::cout << std::endl << "Writing task took "
<< m_TimeProbe.GetMean() << m_Stopwatch.GetElapsedMilliseconds() / 1000
<< " seconds." << std::endl; << " seconds." << std::endl;
} }
......
...@@ -188,7 +188,7 @@ WriterWatcherBase ...@@ -188,7 +188,7 @@ WriterWatcherBase
} }
// Initialize state // Initialize state
m_TimeProbe = watch.m_TimeProbe; m_Stopwatch = watch.m_Stopwatch;
m_Process = watch.m_Process; m_Process = watch.m_Process;
m_SourceProcess = watch.m_SourceProcess; m_SourceProcess = watch.m_SourceProcess;
m_Comment = watch.m_Comment; m_Comment = watch.m_Comment;
...@@ -281,7 +281,7 @@ WriterWatcherBase ...@@ -281,7 +281,7 @@ WriterWatcherBase
} }
// Initialize state // Initialize state
m_TimeProbe = watch.m_TimeProbe; m_Stopwatch = watch.m_Stopwatch;
m_Process = watch.m_Process; m_Process = watch.m_Process;
m_SourceProcess = watch.m_SourceProcess; m_SourceProcess = watch.m_SourceProcess;
m_Comment = watch.m_Comment; m_Comment = watch.m_Comment;
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
#include "otbImage.h" #include "otbImage.h"
#include "itkTimeProbe.h" #include "otbStopwatch.h"
template <typename InputPixelType /*= unsigned char */, typename OutputPixelType /*= unsigned char*/> template <typename InputPixelType /*= unsigned char */, typename OutputPixelType /*= unsigned char*/>
...@@ -130,20 +130,11 @@ int generic_otbMultiChannelExtractROI(int itkNotUsed(argc), char * argv[], const ...@@ -130,20 +130,11 @@ int generic_otbMultiChannelExtractROI(int itkNotUsed(argc), char * argv[], const
writer->SetInput(extractROIFilter->GetOutput()); writer->SetInput(extractROIFilter->GetOutput());
itk::TimeProbe chrono; otb::Stopwatch chrono = otb::Stopwatch::StartNew();
if (computeExtractTime)
{
chrono.Start();
}
writer->Update(); writer->Update();
if (computeExtractTime) if (computeExtractTime)
{ std::cout << " Time to compute the extracted image: " << chrono.GetElapsedMilliseconds() << " ms" << std::endl;
chrono.Stop();
std::cout << " Time to compute the extracted image: " << chrono.GetTotal() << " seconds" << std::endl;
}
std::cout << " Number of channels in the input image: " << reader->GetOutput()->GetNumberOfComponentsPerPixel() << std::cout << " Number of channels in the input image: " << reader->GetOutput()->GetNumberOfComponentsPerPixel() <<
std::endl; std::endl;
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
#include "otbVectorData.h" #include "otbVectorData.h"
#include "otbVectorDataProjectionFilter.h" #include "otbVectorDataProjectionFilter.h"
#include "otbVectorDataFileWriter.h" #include "otbVectorDataFileWriter.h"
#include "itkTimeProbe.h" #include "otbStopwatch.h"
#include "itkMinimumMaximumImageCalculator.h" #include "itkMinimumMaximumImageCalculator.h"
#include "otbCorrectPolygonFunctor.h" #include "otbCorrectPolygonFunctor.h"
...@@ -87,15 +87,13 @@ int otbLabelObjectMapVectorizer(int argc, char * argv[]) ...@@ -87,15 +87,13 @@ int otbLabelObjectMapVectorizer(int argc, char * argv[])
data->GetDataTree()->Add(folder1, document); data->GetDataTree()->Add(folder1, document);
data->SetProjectionRef(lreader->GetOutput()->GetProjectionRef()); data->SetProjectionRef(lreader->GetOutput()->GetProjectionRef());
itk::TimeProbe chrono; otb::Stopwatch chrono = otb::Stopwatch::StartNew();
// If a label is given, extract only this label // If a label is given, extract only this label
if (argc == 4) if (argc == 4)
{ {
std::cout << "Label is given; Vectorizing object " << atoi(argv[3]) << std::endl; std::cout << "Label is given; Vectorizing object " << atoi(argv[3]) << std::endl;
chrono.Start();
PolygonType::Pointer polygon = functor(labelMapFilter->GetOutput()->GetLabelObject(atoi(argv[3]))); PolygonType::Pointer polygon = functor(labelMapFilter->GetOutput()->GetLabelObject(atoi(argv[3])));
chrono.Stop();
//correct polygon //correct polygon
PolygonType::Pointer correct_polygon = correctPolygon(polygon); PolygonType::Pointer correct_polygon = correctPolygon(polygon);
...@@ -117,9 +115,7 @@ int otbLabelObjectMapVectorizer(int argc, char * argv[]) ...@@ -117,9 +115,7 @@ int otbLabelObjectMapVectorizer(int argc, char * argv[])
if (labelMapFilter->GetOutput()->HasLabel(label) && label != labelMapFilter->GetOutput()->GetBackgroundValue()) if (labelMapFilter->GetOutput()->HasLabel(label) && label != labelMapFilter->GetOutput()->GetBackgroundValue())
{ {
std::cout << "Vectorizing object " << label << std::endl; std::cout << "Vectorizing object " << label << std::endl;
chrono.Start();
PolygonType::Pointer polygon = functor(labelMapFilter->GetOutput()->GetLabelObject(label)); PolygonType::Pointer polygon = functor(labelMapFilter->GetOutput()->GetLabelObject(label));
chrono.Stop();
//correct polygon //correct polygon
PolygonType::Pointer correct_polygon = correctPolygon(polygon); PolygonType::Pointer correct_polygon = correctPolygon(polygon);
...@@ -131,7 +127,8 @@ int otbLabelObjectMapVectorizer(int argc, char * argv[]) ...@@ -131,7 +127,8 @@ int otbLabelObjectMapVectorizer(int argc, char * argv[])
} }
} }
} }
std::cout << "Average vectorization time: " << chrono.GetMean() << " s." << std::endl;
std::cout << "Total vectorization time: " << chrono.GetElapsedMilliseconds() << " ms." << std::endl;
VectorDataFilterType::Pointer vectorDataProjection = VectorDataFilterType::New(); VectorDataFilterType::Pointer vectorDataProjection = VectorDataFilterType::New();
vectorDataProjection->SetInputOrigin(lreader->GetOutput()->GetOrigin()); vectorDataProjection->SetInputOrigin(lreader->GetOutput()->GetOrigin());
......
...@@ -25,11 +25,11 @@ ...@@ -25,11 +25,11 @@
#include "otbImage.h" #include "otbImage.h"
#include "otbImageFileReader.h" #include "otbImageFileReader.h"
#include "otbImageFileWriter.h" #include "otbImageFileWriter.h"
#include "otbStopwatch.h"
#include "otbConvolutionImageFilter.h" #include "otbConvolutionImageFilter.h"
#include "otbOverlapSaveConvolutionImageFilter.h" #include "otbOverlapSaveConvolutionImageFilter.h"
#include "otbGaborFilterGenerator.h" #include "otbGaborFilterGenerator.h"
#include "itkConstantBoundaryCondition.h" #include "itkConstantBoundaryCondition.h"
#include "itkTimeProbe.h"
int otbCompareOverlapSaveAndClassicalConvolutionWithGaborFilter(int argc, char *argv[]) int otbCompareOverlapSaveAndClassicalConvolutionWithGaborFilter(int argc, char *argv[])
{ {
...@@ -82,8 +82,6 @@ int otbCompareOverlapSaveAndClassicalConvolutionWithGaborFilter(int argc, char * ...@@ -82,8 +82,6 @@ int otbCompareOverlapSaveAndClassicalConvolutionWithGaborFilter(int argc, char *
ReaderType::Pointer reader = ReaderType::New(); ReaderType::Pointer reader = ReaderType::New();
reader->SetFileName(infname); reader->SetFileName(infname);
itk::TimeProbe probe1, probe2;
ConvolutionFilterType::Pointer convolution = ConvolutionFilterType::New(); ConvolutionFilterType::Pointer convolution = ConvolutionFilterType::New();
convolution->SetRadius(radius); convolution->SetRadius(radius);
convolution->SetFilter(filter); convolution->SetFilter(filter);
...@@ -93,11 +91,10 @@ int otbCompareOverlapSaveAndClassicalConvolutionWithGaborFilter(int argc, char * ...@@ -93,11 +91,10 @@ int otbCompareOverlapSaveAndClassicalConvolutionWithGaborFilter(int argc, char *
writer1->SetInput(convolution->GetOutput()); writer1->SetInput(convolution->GetOutput());
writer1->SetFileName(outfname1); writer1->SetFileName(outfname1);
probe1.Start(); otb::Stopwatch chrono = otb::Stopwatch::StartNew();
writer1->Update(); writer1->Update();
probe1.Stop();
std::cout << "Classical convolution algorithm took " << probe1.GetMean() << " seconds." << std::endl; std::cout << "Classical convolution algorithm took " << chrono.GetElapsedMilliseconds() << " ms." << std::endl;
OSConvolutionFilterType::Pointer osconvolution = OSConvolutionFilterType::New(); OSConvolutionFilterType::Pointer osconvolution = OSConvolutionFilterType::New();
osconvolution->SetRadius(radius); osconvolution->SetRadius(radius);
...@@ -108,11 +105,10 @@ int otbCompareOverlapSaveAndClassicalConvolutionWithGaborFilter(int argc, char * ...@@ -108,11 +105,10 @@ int otbCompareOverlapSaveAndClassicalConvolutionWithGaborFilter(int argc, char *
writer2->SetInput(osconvolution->GetOutput()); writer2->SetInput(osconvolution->GetOutput());
writer2->SetFileName(outfname2); writer2->SetFileName(outfname2);
probe2.Start(); chrono.Restart();
writer2->Update(); writer2->Update();
probe2.Stop();
std::cout << "Overlap-save convolution algorithm took " << probe2.GetMean() << " seconds." << std::endl; std::cout << "Overlap-save convolution algorithm took " << chrono.GetElapsedMilliseconds() << " ms." << std::endl;
return EXIT_SUCCESS; return EXIT_SUCCESS;
} }
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
#include "itkProgressReporter.h" #include "itkProgressReporter.h"
#include "itkMetaDataObject.h" #include "itkMetaDataObject.h"
#include "otbMetaDataKey.h" #include "otbMetaDataKey.h"
#include "itkTimeProbe.h" #include "otbStopwatch.h"
namespace otb namespace otb
{ {
...@@ -358,11 +358,10 @@ VectorDataProjectionFilter<TInputVectorData, TOutputVectorData> ...@@ -358,11 +358,10 @@ VectorDataProjectionFilter<TInputVectorData, TOutputVectorData>
tree->SetRoot(outputRoot); tree->SetRoot(outputRoot);
// Start recursive processing // Start recursive processing
itk::TimeProbe chrono; otb::Stopwatch chrono = otb::Stopwatch::StartNew();
chrono.Start();
this->ProcessNode(inputRoot, outputRoot); this->ProcessNode(inputRoot, outputRoot);
chrono.Stop(); chrono.Stop();
otbMsgDevMacro(<< "VectoDataProjectionFilter: features Processed in " << chrono.GetMean() << " seconds."); otbMsgDevMacro(<< "VectoDataProjectionFilter: features processed in " << chrono.GetElapsedMilliseconds() << " ms.");
} }
} // end namespace otb } // end namespace otb
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
#include "otbVectorDataTransformFilter.h" #include "otbVectorDataTransformFilter.h"
#include "itkProgressReporter.h" #include "itkProgressReporter.h"
#include <itkContinuousIndex.h> #include <itkContinu