OTB  9.0.0
Orfeo Toolbox
otbMultiToMonoChannelExtractROI.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2022 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 ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, itk::ThreadIdType threadId) override;
116 
117 private:
118  MultiToMonoChannelExtractROI(const Self&) = delete;
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
otb::VectorImage< TInputPixelType, 2 >::RegionType
Superclass::RegionType RegionType
Definition: otbVectorImage.h:113
otb::MultiToMonoChannelExtractROI::OutputImageType
Superclass::OutputImageType OutputImageType
Definition: otbMultiToMonoChannelExtractROI.h:66
otbVectorImage.h
otb::MultiToMonoChannelExtractROI::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbMultiToMonoChannelExtractROI.h:55
otbImage.h
otb::VectorImage< TInputPixelType, 2 >::SizeType
Superclass::SizeType SizeType
Definition: otbVectorImage.h:107
otb::MultiToMonoChannelExtractROI::OutputImagePixelType
OutputImageType::PixelType OutputImagePixelType
Definition: otbMultiToMonoChannelExtractROI.h:76
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::Image< TOutputPixelType, 2 >
otb::MultiToMonoChannelExtractROI::InputImageRegionType
InputImageType::RegionType InputImageRegionType
Definition: otbMultiToMonoChannelExtractROI.h:73
otb::MultiToMonoChannelExtractROI::OutputImageSizeType
OutputImageType::SizeType OutputImageSizeType
Definition: otbMultiToMonoChannelExtractROI.h:82
otb::MultiToMonoChannelExtractROI::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbMultiToMonoChannelExtractROI.h:56
otb::ExtractROIBase
Base class to extract area of images.
Definition: otbExtractROIBase.h:48
otb::MultiToMonoChannelExtractROI::m_Channel
unsigned int m_Channel
Definition: otbMultiToMonoChannelExtractROI.h:122
otb::MultiToMonoChannelExtractROI::OutputImageIndexType
OutputImageType::IndexType OutputImageIndexType
Definition: otbMultiToMonoChannelExtractROI.h:80
otb::MultiToMonoChannelExtractROI::InputImageSizeType
InputImageType::SizeType InputImageSizeType
Definition: otbMultiToMonoChannelExtractROI.h:83
otb::MultiToMonoChannelExtractROI
Extract a mono channel part of a multi-channel image.
Definition: otbMultiToMonoChannelExtractROI.h:46
otb::MultiToMonoChannelExtractROI::InputImagePixelType
InputImageType::PixelType InputImagePixelType
Definition: otbMultiToMonoChannelExtractROI.h:77
otb::MultiToMonoChannelExtractROI::~MultiToMonoChannelExtractROI
~MultiToMonoChannelExtractROI() override
Definition: otbMultiToMonoChannelExtractROI.h:97
otb::MultiToMonoChannelExtractROI::Self
MultiToMonoChannelExtractROI Self
Definition: otbMultiToMonoChannelExtractROI.h:52
otb::MultiToMonoChannelExtractROI::Superclass
ExtractROIBase< VectorImage< TInputPixelType, 2 >, Image< TOutputPixelType, 2 > > Superclass
Definition: otbMultiToMonoChannelExtractROI.h:54
otb::MultiToMonoChannelExtractROI::OutputValueType
OutputImageType::ValueType OutputValueType
Definition: otbMultiToMonoChannelExtractROI.h:69
otb::VectorImage< TInputPixelType, 2 >::PixelType
Superclass::PixelType PixelType
Definition: otbVectorImage.h:63
otb::MultiToMonoChannelExtractROI::InputImageIndexType
InputImageType::IndexType InputImageIndexType
Definition: otbMultiToMonoChannelExtractROI.h:81
otb::VectorImage< TInputPixelType, 2 >::IndexType
Superclass::IndexType IndexType
Definition: otbVectorImage.h:101
otb::MultiToMonoChannelExtractROI::InputImageType
Superclass::InputImageType InputImageType
Definition: otbMultiToMonoChannelExtractROI.h:62
otbExtractROIBase.h
otbMultiToMonoChannelExtractROI.hxx
otb::VectorImage< TInputPixelType, 2 >
otb::MultiToMonoChannelExtractROI::OutputImageRegionType
OutputImageType::RegionType OutputImageRegionType
Definition: otbMultiToMonoChannelExtractROI.h:72