Orfeo ToolBox  4.2
Orfeo ToolBox is not a black box
otbPersistentImageFilter.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 __otbPersistentImageFilter_h
19 #define __otbPersistentImageFilter_h
20 
21 #include "itkImageToImageFilter.h"
22 
23 namespace otb
24 {
41 template <class TInputImage, class TOutputImage>
42 class ITK_EXPORT PersistentImageFilter
43  : public itk::ImageToImageFilter<TInputImage, TOutputImage>
44 {
45 public:
51 
53  itkTypeMacro(PersistentImageFilter, ImageToImageFilter);
54 
56  typedef TInputImage InputImageType;
57  typedef TOutputImage OutputImageType;
61  virtual void Reset(void) = 0;
65  virtual void Synthetize(void) = 0;
66 
67 protected:
73  virtual void PrintSelf(std::ostream& os, itk::Indent indent) const
74  {
75  Superclass::PrintSelf(os, indent);
76  }
77 
78 private:
79  PersistentImageFilter(const Self &); //purposely not implemented
80  void operator =(const Self&); //purposely not implemented
81 };
82 } // End namespace otb
83 
84 #endif
virtual void PrintSelf(std::ostream &os, itk::Indent indent) const
itk::SmartPointer< const Self > ConstPointer
itk::ImageToImageFilter< TInputImage, TOutputImage > Superclass
itk::SmartPointer< Self > Pointer
This filter is the base class for all filter persisting data through multiple update. For instance, a filter computing global statistics on an image with streaming capabilities will have to keep the temporary results for each streamed piece of the image in order to synthesize the global statistics at the end. This filter is an itk::ImageToImageFilter, providing two additional methods. The first one, Synthetize(), allows the user to synthesize temporary data produced by the multiple updates on different pieces of the image to the global result. The second one, Reset(), allows the user to reset the temporary data for a new input image for instance.