Orfeo Toolbox  4.0
otbHarrisImageToPointSetFilter.txx
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 __otbHarrisImageToPointSetFilter_txx
19 #define __otbHarrisImageToPointSetFilter_txx
20 
22 
23 namespace otb
24 {
25 
29 template <class TInputImage, class TOutputPointSet>
32 {
33  m_SigmaD = 1.0;
34  m_SigmaI = 1.0;
35  m_Alpha = 1.0;
36 
38  m_UpperThreshold = itk::NumericTraits<InputPixelType>::max();
39 
40  m_HarrisFilter = HarrisImageFilterType::New();
41  m_ThresholdFilter = ThresholdImageToPointSetType::New();
42 }
43 
44 template <class TInputImage, class TOutputPointSet>
45 void
48 {
49 
50  typename OutputPointSetType::Pointer pointList = this->GetOutput();
51 
52  m_HarrisFilter->SetInput(0, this->GetInput(0));
53  m_HarrisFilter->SetSigmaD(m_SigmaD);
54  m_HarrisFilter->SetSigmaI(m_SigmaI);
55  m_HarrisFilter->SetAlpha(m_Alpha);
56 
57  m_ThresholdFilter->SetInput(0, m_HarrisFilter->GetOutput());
58  m_ThresholdFilter->SetLowerThreshold(m_LowerThreshold);
59  m_ThresholdFilter->SetUpperThreshold(m_UpperThreshold);
60 
61  m_ThresholdFilter->SetOutput(pointList);
62  m_ThresholdFilter->Update();
63 
64 }
65 
69 template <class TInputImage, class TOutputPointSet>
70 void
72 ::PrintSelf(std::ostream& os, itk::Indent indent) const
73 {
74  Superclass::PrintSelf(os, indent);
75  os << indent << "Sigma_D : " << this->m_SigmaD << std::endl;
76  os << indent << "Sigma_I : " << this->m_SigmaI << std::endl;
77  os << indent << "Alpha : " << this->m_Alpha << std::endl;
78  os << indent << "LowerThreshold : " << this->m_LowerThreshold << std::endl;
79  os << indent << "UpperThreshold : " << this->m_UpperThreshold << std::endl;
80 }
81 
82 } // end namespace otb
83 
84 #endif

Generated at Sat Mar 8 2014 15:57:46 for Orfeo Toolbox with doxygen 1.8.3.1