OTB  9.0.0
Orfeo Toolbox
otbPersistentFilterStreamingDecorator.hxx
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2022 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_hxx
22 #define otbPersistentFilterStreamingDecorator_hxx
23 
25 
26 namespace otb
27 {
31 template <class TFilter>
33 {
34  m_Filter = FilterType::New();
35  m_Streamer = StreamerType::New();
36 }
38 
39 template <class TFilter>
41 {
42  // Reset the filter before the generation.
43  this->GetFilter()->Reset();
44 
45  /*
46  for (unsigned int idx = 0; idx < this->GetFilter()->GetNumberOfOutputs(); ++idx)
47  {
48  this->GetStreamer()->SetNthInput(idx, this->GetFilter()->GetOutput(idx));
49  }
50  */
51 
52  this->GetStreamer()->SetInput(this->GetFilter()->GetOutput());
53  this->GetStreamer()->Update();
54 
55  // Synthetize data after the streaming of the whole image.
56  this->GetFilter()->Synthetize();
57 }
58 
59 template <class TFilter>
61 {
62  this->GenerateData();
63 }
64 
otb::PersistentFilterStreamingDecorator::GenerateData
void GenerateData(void) override
otbPersistentFilterStreamingDecorator.h
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::PersistentFilterStreamingDecorator::PersistentFilterStreamingDecorator
PersistentFilterStreamingDecorator()
otb::PersistentFilterStreamingDecorator::Update
void Update(void) override