OTB  9.0.0
Orfeo Toolbox
otbAsymmetricFusionOfLineDetectorImageFilter.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 otbAsymmetricFusionOfLineDetectorImageFilter_hxx
22 #define otbAsymmetricFusionOfLineDetectorImageFilter_hxx
23 
25 
26 namespace otb
27 {
28 
32 template <class TInputImage, class TOutputImage, class TOutputImageDirection, class TInterpolator>
34 {
35  this->m_Radius.Fill(1);
36  this->m_LengthLine = 1;
37  this->m_WidthLine = 0;
38  this->m_NumberOfDirections = 8;
40 
41  m_LineRatio = LineRatioType::New();
42  m_LineCorrelation = LineCorrelationType::New();
43  m_AssSymSum = AssSymSumType::New();
44 }
45 
46 template <class TInputImage, class TOutputImage, class TOutputImageDirection, class TInterpolator>
48 {
49  m_LineRatio->SetInput(this->GetInput());
50  m_LineRatio->SetLengthLine(this->m_LengthLine);
51  m_LineRatio->SetWidthLine(this->m_WidthLine);
52  m_LineRatio->SetNumberOfDirections(this->m_NumberOfDirections);
53 
54  m_LineCorrelation->SetInput(this->GetInput());
55  m_LineCorrelation->SetLengthLine(this->m_LengthLine);
56  m_LineCorrelation->SetWidthLine(this->m_WidthLine);
57  m_LineCorrelation->SetNumberOfDirections(this->m_NumberOfDirections);
58 
59  m_AssSymSum->SetInput1(m_LineRatio->GetOutput());
60  m_AssSymSum->SetInput2(m_LineCorrelation->GetOutput());
61 
62  m_AssSymSum->GraftOutput(this->GetOutput());
63  m_AssSymSum->Update();
64  this->GraftOutput(m_AssSymSum->GetOutput());
65 }
66 
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::AsymmetricFusionOfLineDetectorImageFilter::GenerateData
void GenerateData() override
otbAsymmetricFusionOfLineDetectorImageFilter.h
otb::AsymmetricFusionOfLineDetectorImageFilter::AsymmetricFusionOfLineDetectorImageFilter
AsymmetricFusionOfLineDetectorImageFilter()