OTB  5.0.0
Orfeo Toolbox
otbObjectListToObjectListFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ORFEO Toolbox
4  Language: C++
5  Date: $Date$
6  Version: $Revision$
7 
8 
9  Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
10  See OTBCopyright.txt for details.
11 
12 
13  This software is distributed WITHOUT ANY WARRANTY; without even
14  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15  PURPOSE. See the above copyright notices for more information.
16 
17 =========================================================================*/
18 #ifndef __otbObjectListToObjectListFilter_h
19 #define __otbObjectListToObjectListFilter_h
20 
21 #include "otbObjectListSource.h"
22 
23 namespace otb
24 {
25 
42 template <class TInputList, class TOutputList>
43 class ITK_EXPORT ObjectListToObjectListFilter : public otb::ObjectListSource<TOutputList>
44 {
45 public:
51 
53  itkNewMacro(Self);
54 
57 
59  typedef TInputList InputListType;
60  typedef TOutputList OutputListType;
61  typedef typename TInputList::ConstPointer InputListPointer;
62  typedef typename TOutputList::Pointer OutputListPointer;
63  typedef typename TInputList::ConstIterator InputListIterator;
66 
68 
69  using Superclass::SetInput;
70  virtual void SetInput(const InputListType *input);
71  const InputListType * GetInput(void);
72 
73 protected:
76 
79 
81  virtual void PrintSelf(std::ostream& os, itk::Indent indent) const;
82 
83  virtual void GenerateData(void);
84 
87  typedef std::vector<OutputListPointer> OutputListForThreadType;
88 
89  virtual void BeforeThreadedGenerateData();
90 
91  virtual void AfterThreadedGenerateData() {}
92 
93  virtual int SplitRequestedRegion(itk::ThreadIdType threadId, int threadCount, unsigned int requestedElements,
94  unsigned int& startIndex, unsigned int& stopIndex);
95 
98  virtual void ThreadedGenerateData(unsigned int startIndex, unsigned int stopIndex, itk::ThreadIdType threadId);
99 
103  static ITK_THREAD_RETURN_TYPE ThreaderCallback(void *arg);
104 
107  {
109  };
110 
112 
115 private:
116  ObjectListToObjectListFilter(const Self &); //purposely not implemented
117  void operator =(const Self&); //purposely not implemented
118 
119 };
120 
121 } // end namespace otb
122 
123 #ifndef OTB_MANUAL_INSTANTIATION
125 #endif
126 
127 #endif
itk::SmartPointer< const Self > ConstPointer
#define ITK_THREAD_RETURN_TYPE
otb::ObjectListSource< TOutputList > Superclass
Base class for all process objects that output ObjectList data.
TObject ObjectType
Definition: otbObjectList.h:49
This class is a generic all-purpose wrapping around an std::vector<itk::SmartPointer<ObjectType> >...
Definition: otbObjectList.h:36
std::vector< OutputListPointer > OutputListForThreadType
Base class for filters that take an ObjectList as input and produce an ObjectList as output...
unsigned int ThreadIdType