OTB  6.1.0
Orfeo Toolbox
otbRAndNIRIndexImageFilter.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2017 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 otbRAndNIRIndexImageFilter_h
22 #define otbRAndNIRIndexImageFilter_h
23 
26 
27 namespace otb
28 {
29 
38 template <class TInputImageR, class TInputImageNIR, class TOutputImage,
39  class TFunction = Functor::NDVI<typename TInputImageR::PixelType,
40  typename TInputImageNIR::PixelType,
41  typename TOutputImage::PixelType> >
42 class ITK_EXPORT RAndNIRIndexImageFilter : public itk::BinaryFunctorImageFilter<TInputImageR, TInputImageNIR,
43  TOutputImage, TFunction>
44 {
45 public:
46 
52 
54  itkNewMacro(Self);
55 
57  itkTypeMacro(RAndNIRIndexImageFilter, BinaryFunctorImageFilter);
58 
59  void SetInputR(const TInputImageR * image1);
60  void SetInputNIR(const TInputImageNIR * image2);
61 
63  typedef typename Superclass::Input1ImageType RInputImageType;
64  typedef typename Superclass::Input1ImagePointer RInputImagePointer;
65  typedef typename Superclass::Input2ImageType NIRInputImageType;
66  typedef typename Superclass::Input2ImagePointer NIRInputImagePointer;
67  typedef typename Superclass::OutputImageType OutputImageType;
68  typedef typename Superclass::OutputImagePointer OutputImagePointer;
69  typedef typename Superclass::FunctorType FunctorType;
70  typedef typename Superclass::OutputImageRegionType OutputImageRegionType;
71 
72 protected:
74  ~RAndNIRIndexImageFilter() ITK_OVERRIDE {}
75 
76  void PrintSelf(std::ostream& os, itk::Indent indent) const ITK_OVERRIDE;
77 
78  /* void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
79  itk::ThreadIdType threadId );
80  */
81 private:
82  RAndNIRIndexImageFilter(const Self &); //purposely not implemented
83  void operator =(const Self&); //purposely not implemented
84 
85 };
86 
87 } // end namespace otb
88 
89 #ifndef OTB_MANUAL_INSTANTIATION
91 #endif
92 
93 #endif
Superclass::Input1ImageType RInputImageType
itk::BinaryFunctorImageFilter< TInputImageR, TInputImageNIR, TOutputImage, TFunction > Superclass
Superclass::Input1ImagePointer RInputImagePointer
Superclass::OutputImagePointer OutputImagePointer
Superclass::OutputImageRegionType OutputImageRegionType
Superclass::Input2ImageType NIRInputImageType
Superclass::OutputImageType OutputImageType
Superclass::Input2ImagePointer NIRInputImagePointer
itk::SmartPointer< const Self > ConstPointer