OTB  10.0.0
Orfeo Toolbox
otbMultiToMonoChannelExtractROI.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 otbMultiToMonoChannelExtractROI_h
22 #define otbMultiToMonoChannelExtractROI_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 
45 template <class TInputPixelType, class TOutputPixelType>
46 class OTBImageBase_EXPORT_TEMPLATE MultiToMonoChannelExtractROI :
47  // public ExtractROIBase< itk::VectorImage<TInputPixelType, 2> , itk::Image<TOutputPixelType, 2> >
48  public ExtractROIBase<VectorImage<TInputPixelType, 2>, Image<TOutputPixelType, 2>>
49 {
50 public:
53  // typedef ExtractROIBase< itk::VectorImage<TInputPixelType, 2> , itk::Image<TOutputPixelType, 2> > Superclass;
55  typedef itk::SmartPointer<Self> Pointer;
56  typedef itk::SmartPointer<const Self> ConstPointer;
57 
59  itkNewMacro(Self);
60 
63 
66  typedef typename Superclass::OutputImageType OutputImageType;
67 
69  typedef typename OutputImageType::ValueType OutputValueType;
70 
72  typedef typename OutputImageType::RegionType OutputImageRegionType;
74 
76  typedef typename OutputImageType::PixelType OutputImagePixelType;
78 
80  typedef typename OutputImageType::IndexType OutputImageIndexType;
82  typedef typename OutputImageType::SizeType OutputImageSizeType;
84 
86  itkSetMacro(Channel, unsigned int);
87  itkGetConstMacro(Channel, unsigned int);
89 
91  itkStaticConstMacro(InputImageDimension, unsigned int, InputImageType::ImageDimension);
92  itkStaticConstMacro(OutputImageDimension, unsigned int, OutputImageType::ImageDimension);
94 
95 protected:
98  {
99  }
100  void PrintSelf(std::ostream& os, itk::Indent indent) const override;
101 
110  void GenerateOutputInformation() override;
111 
115  void DynamicThreadedGenerateData(const OutputImageRegionType& outputRegionForThread) override;
116 
117 private:
119  void operator=(const Self&) = delete;
120 
122  unsigned int m_Channel;
123 };
124 
125 } // end namespace otb
126 
127 #ifndef OTB_MANUAL_INSTANTIATION
129 #endif
130 
131 #endif
Base class to extract area of images.
Creation of an "otb" image which contains metadata.
Definition: otbImage.h:92
Extract a mono channel part of a multi-channel image.
itk::SmartPointer< const Self > ConstPointer
ExtractROIBase< VectorImage< TInputPixelType, 2 >, Image< TOutputPixelType, 2 > > Superclass
MultiToMonoChannelExtractROI(const Self &)=delete
void operator=(const Self &)=delete
Creation of an "otb" vector image which contains metadata.
Superclass::PixelType PixelType
Superclass::IndexType IndexType
Superclass::SizeType SizeType
Superclass::RegionType RegionType
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.