OTB  9.0.0
Orfeo Toolbox
otbImageOfVectorsToMonoChannelExtractROI.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 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 : public ExtractROIBase<TInputImage, TOutputImage>
42 {
43 public:
47  typedef itk::SmartPointer<Self> Pointer;
48  typedef itk::SmartPointer<const Self> ConstPointer;
49 
51  itkNewMacro(Self);
52 
55 
57  typedef typename Superclass::InputImageType InputImageType;
58  typedef typename Superclass::OutputImageType OutputImageType;
59 
61  typedef typename OutputImageType::ValueType OutputValueType;
62 
64  typedef typename OutputImageType::RegionType OutputImageRegionType;
65  typedef typename InputImageType::RegionType InputImageRegionType;
66 
68  typedef typename OutputImageType::PixelType OutputImagePixelType;
69  typedef typename InputImageType::PixelType InputImagePixelType;
70 
72  typedef typename OutputImageType::IndexType OutputImageIndexType;
73  typedef typename InputImageType::IndexType InputImageIndexType;
74  typedef typename OutputImageType::SizeType OutputImageSizeType;
75  typedef typename InputImageType::SizeType InputImageSizeType;
76 
78  itkSetMacro(Channel, unsigned int);
79  itkGetConstMacro(Channel, unsigned int);
81 
83  itkStaticConstMacro(InputImageDimension, unsigned int, InputImageType::ImageDimension);
84  itkStaticConstMacro(OutputImageDimension, unsigned int, OutputImageType::ImageDimension);
86 
87 protected:
90  {
91  }
92  void PrintSelf(std::ostream& os, itk::Indent indent) const override;
93 
102  void GenerateOutputInformation() override;
103 
107  void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, itk::ThreadIdType threadId) override;
108 
109 private:
110  ImageOfVectorsToMonoChannelExtractROI(const Self&) = delete;
111  void operator=(const Self&) = delete;
112 
114  unsigned int m_Channel;
115 };
116 
117 } // end namespace otb
118 
119 #ifndef OTB_MANUAL_INSTANTIATION
121 #endif
122 
123 #endif
otb::ImageOfVectorsToMonoChannelExtractROI::InputImageSizeType
InputImageType::SizeType InputImageSizeType
Definition: otbImageOfVectorsToMonoChannelExtractROI.h:75
otb::ImageOfVectorsToMonoChannelExtractROI::m_Channel
unsigned int m_Channel
Definition: otbImageOfVectorsToMonoChannelExtractROI.h:114
otb::ImageOfVectorsToMonoChannelExtractROI::OutputImagePixelType
OutputImageType::PixelType OutputImagePixelType
Definition: otbImageOfVectorsToMonoChannelExtractROI.h:68
otbVectorImage.h
otbImage.h
otb::ImageOfVectorsToMonoChannelExtractROI::InputImagePixelType
InputImageType::PixelType InputImagePixelType
Definition: otbImageOfVectorsToMonoChannelExtractROI.h:69
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::ImageOfVectorsToMonoChannelExtractROI::InputImageRegionType
InputImageType::RegionType InputImageRegionType
Definition: otbImageOfVectorsToMonoChannelExtractROI.h:65
otb::ImageOfVectorsToMonoChannelExtractROI::OutputImageIndexType
OutputImageType::IndexType OutputImageIndexType
Definition: otbImageOfVectorsToMonoChannelExtractROI.h:72
otb::ImageOfVectorsToMonoChannelExtractROI::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbImageOfVectorsToMonoChannelExtractROI.h:48
otb::ExtractROIBase
Base class to extract area of images.
Definition: otbExtractROIBase.h:48
otb::ImageOfVectorsToMonoChannelExtractROI::Superclass
ExtractROIBase< TInputImage, TOutputImage > Superclass
Definition: otbImageOfVectorsToMonoChannelExtractROI.h:46
otb::ImageOfVectorsToMonoChannelExtractROI
Definition: otbImageOfVectorsToMonoChannelExtractROI.h:41
otb::ImageOfVectorsToMonoChannelExtractROI::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbImageOfVectorsToMonoChannelExtractROI.h:47
otb::ImageOfVectorsToMonoChannelExtractROI::OutputImageSizeType
OutputImageType::SizeType OutputImageSizeType
Definition: otbImageOfVectorsToMonoChannelExtractROI.h:74
otbExtractROIBase.h
otbImageOfVectorsToMonoChannelExtractROI.hxx
otb::ImageOfVectorsToMonoChannelExtractROI::Self
ImageOfVectorsToMonoChannelExtractROI Self
Definition: otbImageOfVectorsToMonoChannelExtractROI.h:45
otb::ImageOfVectorsToMonoChannelExtractROI::~ImageOfVectorsToMonoChannelExtractROI
~ImageOfVectorsToMonoChannelExtractROI() override
Definition: otbImageOfVectorsToMonoChannelExtractROI.h:89
otb::ImageOfVectorsToMonoChannelExtractROI::OutputImageType
Superclass::OutputImageType OutputImageType
Definition: otbImageOfVectorsToMonoChannelExtractROI.h:58
otb::ImageOfVectorsToMonoChannelExtractROI::InputImageType
Superclass::InputImageType InputImageType
Definition: otbImageOfVectorsToMonoChannelExtractROI.h:54
otb::ImageOfVectorsToMonoChannelExtractROI::OutputImageRegionType
OutputImageType::RegionType OutputImageRegionType
Definition: otbImageOfVectorsToMonoChannelExtractROI.h:64
otb::ImageOfVectorsToMonoChannelExtractROI::OutputValueType
OutputImageType::ValueType OutputValueType
Definition: otbImageOfVectorsToMonoChannelExtractROI.h:61
otb::ImageOfVectorsToMonoChannelExtractROI::InputImageIndexType
InputImageType::IndexType InputImageIndexType
Definition: otbImageOfVectorsToMonoChannelExtractROI.h:73