OTB  6.7.0
Orfeo Toolbox
otbImageOfVectorsToMonoChannelExtractROI.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 otbImageOfVectorsToMonoChannelExtractROI_h
22 #define otbImageOfVectorsToMonoChannelExtractROI_h
23 
24 #include "otbExtractROIBase.h"
25 #include "otbImage.h"
26 #include "otbVectorImage.h"
27 #include "OTBImageBaseExport.h"
28 
29 #include "itkMacro.h"
30 
31 namespace otb
32 {
33 
40 template <class TInputImage, class TOutputImage>
41 class OTBImageBase_EXPORT_TEMPLATE ImageOfVectorsToMonoChannelExtractROI :
42  public ExtractROIBase<TInputImage, TOutputImage>
43 {
44 public:
50 
52  itkNewMacro(Self);
53 
56 
58  typedef typename Superclass::InputImageType InputImageType;
59  typedef typename Superclass::OutputImageType OutputImageType;
60 
62  typedef typename OutputImageType::ValueType OutputValueType;
63 
65  typedef typename OutputImageType::RegionType OutputImageRegionType;
66  typedef typename InputImageType::RegionType InputImageRegionType;
67 
69  typedef typename OutputImageType::PixelType OutputImagePixelType;
70  typedef typename InputImageType::PixelType InputImagePixelType;
71 
77 
79  itkSetMacro(Channel, unsigned int);
80  itkGetConstMacro(Channel, unsigned int);
82 
84  itkStaticConstMacro(InputImageDimension, unsigned int,
85  InputImageType::ImageDimension);
86  itkStaticConstMacro(OutputImageDimension, unsigned int,
87  OutputImageType::ImageDimension);
89 
90 protected:
93  void PrintSelf(std::ostream& os, itk::Indent indent) const override;
94 
103  void GenerateOutputInformation() override;
104 
108  void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
109  itk::ThreadIdType threadId) override;
110 
111 private:
112  ImageOfVectorsToMonoChannelExtractROI(const Self &) = delete;
113  void operator =(const Self&) = delete;
114 
116  unsigned int m_Channel;
117 };
118 
119 } // end namespace otb
120 
121 #ifndef OTB_MANUAL_INSTANTIATION
123 #endif
124 
125 #endif
itk::Size< Monteverdi_DIMENSION > SizeType
Definition: mvdTypes.h:137
ExtractROIBase< TInputImage, TOutputImage > Superclass
itk::Index< Monteverdi_DIMENSION > IndexType
Definition: mvdTypes.h:133
unsigned int ThreadIdType
Base class to extract area of images.