OTB  6.7.0
Orfeo Toolbox
otbAngularProjectionBinaryImageFilter.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2019 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 {
39 template < class TInputImage, class TOutputImage, class TPrecision >
41  : public itk::ImageToImageFilter< TInputImage, TOutputImage >
42 {
43 public:
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;
62  typedef typename InputImageType::PixelType InputPixelType;
63 
64  typedef TOutputImage OutputImageType;
65  typedef typename OutputImageType::Pointer OutputImagePointerType;
66  typedef typename OutputImageType::RegionType OutputImageRegionType;
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  void GenerateOutputInformation() override;
97  void ThreadedGenerateData( const OutputImageRegionType & outputRegionForThread, itk::ThreadIdType threadID ) override;
98 
99 private:
100  AngularProjectionBinaryImageFilter(const Self&); // not implemented
101  void operator=(const Self&); // not implemented
102 
103  std::vector<PrecisionType> m_AngleSet;
104 
105 }; // end of class
106 
107 } // end of namespace otb
108 
109 #ifndef OTB_MANUAL_INSTANTIATION
111 #endif
112 
113 
114 #endif
115 
itk::Size< Monteverdi_DIMENSION > SizeType
Definition: mvdTypes.h:137
itk::ImageToImageFilter< TInputImage, TOutputImage > Superclass
itk::Index< Monteverdi_DIMENSION > IndexType
Definition: mvdTypes.h:133
unsigned int ThreadIdType