OTB  5.0.0
Orfeo Toolbox
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 {
43 template <class TInputImage, class TOutputImage>
44 class ITK_EXPORT PersistentImageFilter
45  : public itk::ImageToImageFilter<TInputImage, TOutputImage>
46 {
47 public:
53 
55  itkTypeMacro(PersistentImageFilter, ImageToImageFilter);
56 
58  typedef TInputImage InputImageType;
59  typedef TOutputImage OutputImageType;
60 
64  virtual void Reset(void) = 0;
65 
69  virtual void Synthetize(void) = 0;
70 
71 protected:
74 
77 
79  virtual void PrintSelf(std::ostream& os, itk::Indent indent) const
80  {
81  Superclass::PrintSelf(os, indent);
82  }
83 
84 private:
85  PersistentImageFilter(const Self &); //purposely not implemented
86  void operator =(const Self&); //purposely not implemented
87 };
88 } // End namespace otb
89 
90 #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.