21 #ifndef otbUnaryFunctorObjectListFilter_hxx
22 #define otbUnaryFunctorObjectListFilter_hxx
25 #include "itkProgressReporter.h"
34 template <
class TInputList,
class TOutputList,
class TFunction>
39 template <
class TInputList,
class TOutputList,
class TFunction>
41 itk::ThreadIdType threadId)
45 this->m_ObjectListPerThread[threadId] = OutputListType::New();
47 itk::ProgressReporter progress(
this, threadId, stopIndex - startIndex);
51 unsigned int count = 0;
52 while ((count < startIndex) && (it != inputPtr->End()))
58 while ((count < stopIndex) && (it != inputPtr->End()))
60 this->m_ObjectListPerThread[threadId]->PushBack(m_Functor(it.Get()));
62 progress.CompletedPixel();
68 template <
class TInputList,
class TOutputList,
class TFunction>
73 for (
unsigned int i = 0; i < this->m_ObjectListPerThread.size(); ++i)
75 if (this->m_ObjectListPerThread[i].IsNotNull())
77 for (
OutputListIterator it = this->m_ObjectListPerThread[i]->Begin(); it != this->m_ObjectListPerThread[i]->End(); ++it)
79 outputPtr->PushBack(it.Get());