OTB  10.0.0
Orfeo Toolbox
otbAngularProjectionBinaryImageFilter.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2024 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 otbAngularProjectionBinaryImageFilter_h
22 #define otbAngularProjectionBinaryImageFilter_h
23 
24 #include <vector>
25 
26 #include "itkImageToImageFilter.h"
27 
28 
29 namespace otb
30 {
40 template <class TInputImage, class TOutputImage, class TPrecision>
41 class ITK_EXPORT AngularProjectionBinaryImageFilter : public itk::ImageToImageFilter<TInputImage, TOutputImage>
42 {
43 public:
46  typedef itk::ImageToImageFilter<TInputImage, TOutputImage> Superclass;
47  typedef itk::SmartPointer<Self> Pointer;
48  typedef itk::SmartPointer<const Self> ConstPointer;
49 
51  itkNewMacro(Self);
52 
54  itkTypeMacro(AngularProjectionBinaryImageFilter, ImageToImageFilter);
55 
57  typedef TInputImage InputImageType;
58  typedef typename InputImageType::Pointer InputImagePointerType;
59  typedef typename InputImageType::RegionType InputImageRegionType;
60  typedef typename InputImageType::SizeType InputSizeType;
61  typedef typename InputImageType::IndexType InputIndexType;
62  typedef typename InputImageType::PixelType InputPixelType;
63 
64  typedef TOutputImage OutputImageType;
65  typedef typename OutputImageType::Pointer OutputImagePointerType;
66  typedef typename OutputImageType::RegionType OutputImageRegionType;
67  typedef typename OutputImageType::SizeType OutputSizeType;
68  typedef typename OutputImageType::IndexType OutputIndexType;
69  typedef typename OutputImageType::PixelType OutputPixelType;
70 
71  typedef TPrecision PrecisionType;
72 
74  itkStaticConstMacro(InputImageDimension, unsigned int, TInputImage::ImageDimension);
75  itkStaticConstMacro(OutputImageDimension, unsigned int, TOutputImage::ImageDimension);
77 
79  std::vector<PrecisionType> GetAngleSet() const
80  {
81  return m_AngleSet;
82  }
83  void SetAngleSet(std::vector<PrecisionType>& angle);
85 
86  void SetInput1(const InputImageType*);
87  const InputImageType* GetInput1() const;
88 
89  void SetInput2(const InputImageType*);
90  const InputImageType* GetInput2() const;
91 
92 protected:
95  {
96  }
97 
98  void GenerateOutputInformation() override;
99  void DynamicThreadedGenerateData(const OutputImageRegionType& outputRegionForThread) override;
100 
101 private:
102  AngularProjectionBinaryImageFilter(const Self&); // not implemented
103  void operator=(const Self&); // not implemented
104 
105  std::vector<PrecisionType> m_AngleSet;
106 
107 }; // end of class
108 
109 } // end of namespace otb
110 
111 #ifndef OTB_MANUAL_INSTANTIATION
113 #endif
114 
115 
116 #endif
itk::ImageToImageFilter< TInputImage, TOutputImage > Superclass
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.