OTB  9.0.0
Orfeo Toolbox
otbPerBandVectorImageFilter.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 otbPerBandVectorImageFilter_h
22 #define otbPerBandVectorImageFilter_h
23 
27 #include "otbImageList.h"
28 #include "otbImage.h"
29 #include "itkImageToImageFilter.h"
30 
31 namespace otb
32 {
48 template <class TInputImage, class TOutputImage, class TFilter>
49 class ITK_EXPORT PerBandVectorImageFilter : public itk::ImageToImageFilter<TInputImage, TOutputImage>
50 {
51 public:
54  typedef itk::ImageToImageFilter<TInputImage, TOutputImage> Superclass;
55  typedef itk::SmartPointer<Self> Pointer;
56  typedef itk::SmartPointer<const Self> ConstPointer;
57 
59  itkNewMacro(Self);
60 
62  itkTypeMacro(PerBandVectorImageFilter, ImageToImageFilter);
63 
65  typedef TInputImage InputVectorImageType;
66  typedef typename InputVectorImageType::Pointer InputVectorImagePointerType;
67  typedef typename InputVectorImageType::InternalPixelType InputPixelType;
70 
71  typedef TOutputImage OutputVectorImageType;
72  typedef typename OutputVectorImageType::Pointer OutputVectorImagePointerType;
73  typedef typename OutputVectorImageType::InternalPixelType OutputPixelType;
76 
77  typedef TFilter FilterType;
78  typedef typename FilterType::Pointer FilterPointerType;
79 
80  // Internal filters definition
87 
89  itkSetObjectMacro(Filter, FilterType);
90  itkGetObjectMacro(Filter, FilterType);
91 
92  itkSetMacro(OutputIndex, unsigned int);
93  itkGetMacro(OutputIndex, unsigned int);
94 
95  void GenerateInputRequestedRegion(void) override;
96  void GenerateOutputInformation(void) override;
97 
98 protected:
100  void GenerateData(void) override;
101 
104 
107  {
108  }
109 
111  void PrintSelf(std::ostream& os, itk::Indent indent) const override;
112 
113 private:
114  PerBandVectorImageFilter(const Self&) = delete;
115  void operator=(const Self&) = delete;
116 
119 
121  unsigned m_OutputIndex;
122 };
123 } // End namespace otb
124 #ifndef OTB_MANUAL_INSTANTIATION
126 #endif
127 
128 #endif
otbImageList.h
otb::PerBandVectorImageFilter
This filter is a helper class to apply per band a standard itk::ImageToImageFilter to a VectorImage.
Definition: otbPerBandVectorImageFilter.h:49
otb::PerBandVectorImageFilter::RecompositionFilterType
ImageListToVectorImageFilter< OutputImageListType, OutputVectorImageType > RecompositionFilterType
Definition: otbPerBandVectorImageFilter.h:85
otb::PerBandVectorImageFilter::DecompositionFilterType
VectorImageToImageListFilter< InputVectorImageType, InputImageListType > DecompositionFilterType
Definition: otbPerBandVectorImageFilter.h:81
otb::PerBandVectorImageFilter::~PerBandVectorImageFilter
~PerBandVectorImageFilter() override
Definition: otbPerBandVectorImageFilter.h:106
otbImageListToVectorImageFilter.h
otb::PerBandVectorImageFilter::OutputVectorImageType
TOutputImage OutputVectorImageType
Definition: otbPerBandVectorImageFilter.h:71
otb::PerBandVectorImageFilter::Superclass
itk::ImageToImageFilter< TInputImage, TOutputImage > Superclass
Definition: otbPerBandVectorImageFilter.h:54
otb::PerBandVectorImageFilter::OutputImageType
Image< OutputPixelType, OutputVectorImageType::ImageDimension > OutputImageType
Definition: otbPerBandVectorImageFilter.h:74
otbImage.h
otb::ImageListToImageListApplyFilter
This filter applies the filter given as template to the input image list.
Definition: otbImageListToImageListApplyFilter.h:47
otb::PerBandVectorImageFilter::InputVectorImagePointerType
InputVectorImageType::Pointer InputVectorImagePointerType
Definition: otbPerBandVectorImageFilter.h:66
otb::PerBandVectorImageFilter::FilterPointerType
FilterType::Pointer FilterPointerType
Definition: otbPerBandVectorImageFilter.h:78
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::Image
Creation of an "otb" image which contains metadata.
Definition: otbImage.h:89
otb::ImageListToVectorImageFilter::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbImageListToVectorImageFilter.h:48
otb::PerBandVectorImageFilter::ProcessingFilterType
ImageListToImageListApplyFilter< InputImageListType, OutputImageListType, FilterType > ProcessingFilterType
Definition: otbPerBandVectorImageFilter.h:83
otb::PerBandVectorImageFilter::InputImageType
Image< InputPixelType, InputVectorImageType::ImageDimension > InputImageType
Definition: otbPerBandVectorImageFilter.h:68
otb::PerBandVectorImageFilter::FilterType
TFilter FilterType
Definition: otbPerBandVectorImageFilter.h:77
otbPerBandVectorImageFilter.hxx
otb::ImageListToVectorImageFilter
Converts an ImageList to a VectorImage.
Definition: otbImageListToVectorImageFilter.h:42
otb::PerBandVectorImageFilter::InputImageListType
ImageList< InputImageType > InputImageListType
Definition: otbPerBandVectorImageFilter.h:69
otb::Wrapper::Tags::Filter
static const std::string Filter
Definition: otbWrapperTags.h:39
otb::ImageListToImageListApplyFilter::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbImageListToImageListApplyFilter.h:53
otb::PerBandVectorImageFilter::OutputVectorImagePointerType
OutputVectorImageType::Pointer OutputVectorImagePointerType
Definition: otbPerBandVectorImageFilter.h:72
otb::PerBandVectorImageFilter::ProcessingFilterPointerType
ProcessingFilterType::Pointer ProcessingFilterPointerType
Definition: otbPerBandVectorImageFilter.h:84
otbImageListToImageListApplyFilter.h
otb::PerBandVectorImageFilter::DecompositionFilterPointerType
DecompositionFilterType::Pointer DecompositionFilterPointerType
Definition: otbPerBandVectorImageFilter.h:82
otb::PerBandVectorImageFilter::InputPixelType
InputVectorImageType::InternalPixelType InputPixelType
Definition: otbPerBandVectorImageFilter.h:67
otb::PerBandVectorImageFilter::Self
PerBandVectorImageFilter Self
Definition: otbPerBandVectorImageFilter.h:53
otbVectorImageToImageListFilter.h
otb::PerBandVectorImageFilter::RecompositionFilterPointerType
RecompositionFilterType::Pointer RecompositionFilterPointerType
Definition: otbPerBandVectorImageFilter.h:86
otb::PerBandVectorImageFilter::m_Filter
FilterPointerType m_Filter
The processing filter.
Definition: otbPerBandVectorImageFilter.h:118
otb::PerBandVectorImageFilter::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbPerBandVectorImageFilter.h:55
otb::VectorImageToImageListFilter::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbVectorImageToImageListFilter.h:50
otb::ImageList
This class represent a list of images.
Definition: otbImageList.h:39
otb::PerBandVectorImageFilter::InputVectorImageType
TInputImage InputVectorImageType
Definition: otbPerBandVectorImageFilter.h:62
otb::VectorImageToImageListFilter
This class aims at converting a multi-band image to a list of scalar images.
Definition: otbVectorImageToImageListFilter.h:44
otb::PerBandVectorImageFilter::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbPerBandVectorImageFilter.h:56
otb::PerBandVectorImageFilter::m_OutputIndex
unsigned m_OutputIndex
The index of the output of the filter to gather.
Definition: otbPerBandVectorImageFilter.h:121
otb::PerBandVectorImageFilter::OutputPixelType
OutputVectorImageType::InternalPixelType OutputPixelType
Definition: otbPerBandVectorImageFilter.h:73
otb::PerBandVectorImageFilter::OutputImageListType
ImageList< OutputImageType > OutputImageListType
Definition: otbPerBandVectorImageFilter.h:75