OTB  9.0.0
Orfeo Toolbox
otbExtractROI.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 otbExtractROI_h
22 #define otbExtractROI_h
23 
24 #include "otbExtractROIBase.h"
25 #include "otbImage.h"
26 #include "itkMacro.h"
27 #include "OTBImageBaseExport.h"
28 
29 namespace otb
30 {
31 
42 template <class TInputPixel, class TOutputPixel>
43 class OTBImageBase_EXPORT_TEMPLATE ExtractROI : public ExtractROIBase<Image<TInputPixel, 2>, Image<TOutputPixel, 2>>
44 {
45 public:
47  typedef ExtractROI Self;
49  typedef itk::SmartPointer<Self> Pointer;
50  typedef itk::SmartPointer<const Self> ConstPointer;
51 
53  itkNewMacro(Self);
54 
56  itkTypeMacro(ExtractROI, ExtractROIBase);
57 
60  typedef typename Superclass::OutputImageType OutputImageType;
61 
63  typedef typename OutputImageType::RegionType OutputImageRegionType;
65 
67  typedef typename OutputImageType::PixelType OutputImagePixelType;
69 
71  typedef typename OutputImageType::IndexType OutputImageIndexType;
73  typedef typename OutputImageType::SizeType OutputImageSizeType;
75 
77  itkStaticConstMacro(InputImageDimension, unsigned int, InputImageType::ImageDimension);
78  itkStaticConstMacro(OutputImageDimension, unsigned int, OutputImageType::ImageDimension);
80 
81  void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, itk::ThreadIdType threadId) override;
82 
83 protected:
84  ExtractROI();
85  ~ExtractROI() override
86  {
87  }
88  void PrintSelf(std::ostream& os, itk::Indent indent) const override;
89 
93  void GenerateOutputInformation() override;
94 
95 private:
96  ExtractROI(const Self&) = delete;
97  void operator=(const Self&) = delete;
98 };
99 
100 } // end namespace otb
101 
102 #ifndef OTB_MANUAL_INSTANTIATION
103 #include "otbExtractROI.hxx"
104 #endif
105 
106 #endif
otb::ExtractROI::OutputImagePixelType
OutputImageType::PixelType OutputImagePixelType
Definition: otbExtractROI.h:67
otbImage.h
otb::ExtractROI::Self
ExtractROI Self
Definition: otbExtractROI.h:47
otb::ExtractROI::InputImageIndexType
InputImageType::IndexType InputImageIndexType
Definition: otbExtractROI.h:72
otb::Image< TInputPixel, 2 >::IndexType
Superclass::IndexType IndexType
Definition: otbImage.h:142
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::Image< TOutputPixel, 2 >
otb::ExtractROI::OutputImageSizeType
OutputImageType::SizeType OutputImageSizeType
Definition: otbExtractROI.h:73
otb::ExtractROI::~ExtractROI
~ExtractROI() override
Definition: otbExtractROI.h:85
otb::ExtractROI::InputImageSizeType
InputImageType::SizeType InputImageSizeType
Definition: otbExtractROI.h:74
otb::ExtractROIBase
Base class to extract area of images.
Definition: otbExtractROIBase.h:48
otb::ExtractROI::Superclass
ExtractROIBase< Image< TInputPixel, 2 >, Image< TOutputPixel, 2 > > Superclass
Definition: otbExtractROI.h:48
otb::ExtractROI::OutputImageRegionType
OutputImageType::RegionType OutputImageRegionType
Definition: otbExtractROI.h:63
otbExtractROI.hxx
otb::ExtractROI::OutputImageIndexType
OutputImageType::IndexType OutputImageIndexType
Definition: otbExtractROI.h:71
otbExtractROIBase.h
otb::Image< TInputPixel, 2 >::PixelType
Superclass::PixelType PixelType
Definition: otbImage.h:107
otb::ExtractROI::InputImagePixelType
InputImageType::PixelType InputImagePixelType
Definition: otbExtractROI.h:68
otb::ExtractROI
Extract a subset of a mono-channel image.
Definition: otbExtractROI.h:43
otb::ExtractROI::InputImageRegionType
InputImageType::RegionType InputImageRegionType
Definition: otbExtractROI.h:64
otb::ExtractROI::InputImageType
Superclass::InputImageType InputImageType
Definition: otbExtractROI.h:56
otb::Image< TInputPixel, 2 >::RegionType
Superclass::RegionType RegionType
Definition: otbImage.h:154
otb::ExtractROI::OutputImageType
Superclass::OutputImageType OutputImageType
Definition: otbExtractROI.h:60
otb::ExtractROI::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbExtractROI.h:50
otb::Image< TInputPixel, 2 >::SizeType
Superclass::SizeType SizeType
Definition: otbImage.h:148
otb::ExtractROI::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbExtractROI.h:49