OTB  7.2.0
Orfeo Toolbox
otbPersistentFilterStreamingDecorator.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2020 Centre National d'Etudes Spatiales (CNES)
3  *
4  * This file is part of Orfeo Toolbox
5  *
6  * https://www.orfeo-toolbox.org/
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  */
20 
21 #ifndef otbPersistentFilterStreamingDecorator_h
22 #define otbPersistentFilterStreamingDecorator_h
23 
25 #include "itkProcessObject.h"
26 
27 namespace otb
28 {
46 template <class TFilter>
47 class ITK_EXPORT PersistentFilterStreamingDecorator : public itk::ProcessObject
48 {
49 public:
52  typedef itk::ProcessObject Superclass;
53  typedef itk::SmartPointer<Self> Pointer;
54  typedef itk::SmartPointer<const Self> ConstPointer;
55 
57  itkNewMacro(Self);
58 
60  itkTypeMacro(PersistentFilterStreamingDecorator, ProcessObject);
61 
63  typedef TFilter FilterType;
64  typedef typename FilterType::Pointer FilterPointerType;
66 
68  typedef typename StreamerType::Pointer StreamerPointerType;
69 
70  itkSetObjectMacro(Filter, FilterType);
71  itkGetObjectMacro(Filter, FilterType);
72  itkGetConstObjectMacro(Filter, FilterType);
73  itkGetObjectMacro(Streamer, StreamerType);
74 
75  void Update(void) override;
76 
77 protected:
80 
83  {
84  }
85 
87  void PrintSelf(std::ostream& os, itk::Indent indent) const override;
88 
89  void GenerateData(void) override;
90 
92  StreamerPointerType m_Streamer;
93 
95  FilterPointerType m_Filter;
96 
97 private:
98  PersistentFilterStreamingDecorator(const Self&) = delete;
99  void operator=(const Self&) = delete;
100 };
101 } // End namespace otb
102 #ifndef OTB_MANUAL_INSTANTIATION
104 #endif
105 
106 #endif
StreamerPointerType m_Streamer
Object responsible for streaming.
FilterPointerType m_Filter
Object responsible for computation.
static const std::string Filter
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
This class acts like a StreamingImageFileWriter, but without actually writing data to the disk...
StreamingImageVirtualWriter< ImageType > StreamerType
This filter link a persistent filter with a StreamingImageVirtualWriter.