21 #ifndef otbUnaryFunctorObjectListBooleanFilter_hxx
22 #define otbUnaryFunctorObjectListBooleanFilter_hxx
25 #include "itkProgressReporter.h"
33 template <
class TInputList,
class TOutputList,
class TFunction>
38 template <
class TInputList,
class TOutputList,
class TFunction>
40 itk::ThreadIdType threadId)
44 this->m_ObjectListPerThread[threadId] = OutputListType::New();
46 itk::ProgressReporter progress(
this, threadId, stopIndex - startIndex);
50 unsigned int count = 0;
51 while ((count < startIndex) && (it != inputPtr->End()))
57 while ((count < stopIndex) && (it != inputPtr->End()))
59 if (m_Functor(it.Get()))
61 this->m_ObjectListPerThread[threadId]->PushBack(it.Get());
64 progress.CompletedPixel();
70 template <
class TInputList,
class TOutputList,
class TFunction>
75 for (
unsigned int i = 0; i < this->m_ObjectListPerThread.size(); ++i)
77 if (this->m_ObjectListPerThread[i].IsNotNull())
79 for (
OutputListIterator it = this->m_ObjectListPerThread[i]->Begin(); it != this->m_ObjectListPerThread[i]->End(); ++it)
81 outputPtr->PushBack(it.Get());