OTB  9.0.0
Orfeo Toolbox
otbSummingFilter.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1999-2011 Insight Software Consortium
3  * Copyright (C) 2005-2022 Centre National d'Etudes Spatiales (CNES)
4  * Copyright (C) 2016-2019 IRSTEA
5  *
6  * This file is part of Orfeo Toolbox
7  *
8  * https://www.orfeo-toolbox.org/
9  *
10  * Licensed under the Apache License, Version 2.0 (the "License");
11  * you may not use this file except in compliance with the License.
12  * You may obtain a copy of the License at
13  *
14  * http://www.apache.org/licenses/LICENSE-2.0
15  *
16  * Unless required by applicable law or agreed to in writing, software
17  * distributed under the License is distributed on an "AS IS" BASIS,
18  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19  * See the License for the specific language governing permissions and
20  * limitations under the License.
21  */
22 #ifndef __SummingFilter_H
23 #define __SummingFilter_H
24 
25 #include "itkImageToImageFilter.h"
26 #include "itkImageRegionIterator.h"
27 namespace otb
28 {
39 template <class TInputImage, class TOutputImage>
40 class ITK_EXPORT SummingFilter : public itk::ImageToImageFilter<TInputImage, TOutputImage>
41 {
42 public:
45  typedef itk::ImageToImageFilter<TInputImage, TOutputImage> Superclass;
46  typedef itk::SmartPointer<Self> Pointer;
47  typedef itk::SmartPointer<const Self> ConstPointer;
48 
50  itkNewMacro(Self);
51 
53  itkTypeMacro(SummingFilter, ImageToImageFilter);
54 
56  typedef TInputImage InputImageType;
57  typedef typename InputImageType::RegionType InputImageRegionType;
58  typedef typename InputImageType::PixelType InputImagePixelType;
59  typedef typename InputImageType::PointType InputImagePointType;
60  typedef typename InputImageType::IndexType InputImageIndexType;
61  typedef typename InputImageType::SizeType InputImageSizeType;
62  typedef typename InputImageType::SpacingType InputImageSpacingType;
63  typedef typename InputImageType::InternalPixelType InputImageInternalPixelType;
64 
66  typedef TOutputImage OutputImageType;
67  typedef typename OutputImageType::Pointer OutputImagePointer;
68  typedef typename OutputImageType::RegionType OutputImageRegionType;
69  typedef typename OutputImageType::IndexType OutputImageIndexType;
70  typedef typename OutputImageType::PointType OutputImagePointType;
71  typedef typename OutputImageType::SizeType OutputImageSizeType;
72  typedef typename OutputImageType::SpacingType OutputImageSpacingType;
73  typedef typename OutputImageType::PixelType OutputImagePixelType;
74  typedef typename OutputImageType::InternalPixelType OutputImageInternalPixelType;
75 
77  typedef itk::ImageRegionIterator<OutputImageType> OutputIteratorType;
78  typedef itk::ImageRegionConstIterator<InputImageType> InputIteratorType;
79 
80 protected:
82  {
83  }
84 
85  virtual ~SummingFilter()
86  {
87  }
88 
101  virtual void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, itk::ThreadIdType threadId);
102 
103  virtual void GenerateOutputInformation(void);
104 
105 private:
106  SummingFilter(const Self&); // purposely not implemented
107  void operator=(const Self&); // purposely not implemented
108 
109 }; // end of class
110 }
111 
112 #ifndef OTB_MANUAL_INSTANTIATION
113 #include "otbSummingFilter.hxx"
114 #endif
115 
116 #endif
otb::SummingFilter::OutputImageType
TOutputImage OutputImageType
Definition: otbSummingFilter.h:66
otb::SummingFilter::OutputImageSpacingType
OutputImageType::SpacingType OutputImageSpacingType
Definition: otbSummingFilter.h:72
otb::SummingFilter::OutputImageIndexType
OutputImageType::IndexType OutputImageIndexType
Definition: otbSummingFilter.h:69
otb::SummingFilter::Self
SummingFilter Self
Definition: otbSummingFilter.h:44
otb::SummingFilter::OutputImageRegionType
OutputImageType::RegionType OutputImageRegionType
Definition: otbSummingFilter.h:68
otb::SummingFilter::OutputImageSizeType
OutputImageType::SizeType OutputImageSizeType
Definition: otbSummingFilter.h:71
otb::SummingFilter::~SummingFilter
virtual ~SummingFilter()
Definition: otbSummingFilter.h:85
otb::SummingFilter::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbSummingFilter.h:47
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otbSummingFilter.hxx
otb::SummingFilter::InputImageType
TInputImage InputImageType
Definition: otbSummingFilter.h:53
otb::SummingFilter::InputImagePixelType
InputImageType::PixelType InputImagePixelType
Definition: otbSummingFilter.h:58
otb::SummingFilter
Computes the sum of the input images pixels.
Definition: otbSummingFilter.h:40
otb::SummingFilter::InputImagePointType
InputImageType::PointType InputImagePointType
Definition: otbSummingFilter.h:59
otb::SummingFilter::InputIteratorType
itk::ImageRegionConstIterator< InputImageType > InputIteratorType
Definition: otbSummingFilter.h:78
otb::SummingFilter::OutputImagePixelType
OutputImageType::PixelType OutputImagePixelType
Definition: otbSummingFilter.h:73
otb::SummingFilter::OutputImageInternalPixelType
OutputImageType::InternalPixelType OutputImageInternalPixelType
Definition: otbSummingFilter.h:74
otb::SummingFilter::SummingFilter
SummingFilter()
Definition: otbSummingFilter.h:81
otb::SummingFilter::InputImageSpacingType
InputImageType::SpacingType InputImageSpacingType
Definition: otbSummingFilter.h:62
otb::SummingFilter::InputImageIndexType
InputImageType::IndexType InputImageIndexType
Definition: otbSummingFilter.h:60
otb::SummingFilter::OutputImagePointer
OutputImageType::Pointer OutputImagePointer
Definition: otbSummingFilter.h:67
otb::SummingFilter::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbSummingFilter.h:46
otb::SummingFilter::InputImageInternalPixelType
InputImageType::InternalPixelType InputImageInternalPixelType
Definition: otbSummingFilter.h:63
otb::SummingFilter::InputImageSizeType
InputImageType::SizeType InputImageSizeType
Definition: otbSummingFilter.h:61
otb::SummingFilter::OutputIteratorType
itk::ImageRegionIterator< OutputImageType > OutputIteratorType
Definition: otbSummingFilter.h:77
otb::SummingFilter::OutputImagePointType
OutputImageType::PointType OutputImagePointType
Definition: otbSummingFilter.h:70
otb::SummingFilter::Superclass
itk::ImageToImageFilter< TInputImage, TOutputImage > Superclass
Definition: otbSummingFilter.h:45
otb::SummingFilter::InputImageRegionType
InputImageType::RegionType InputImageRegionType
Definition: otbSummingFilter.h:57