OTB  9.0.0
Orfeo Toolbox
otbConcatenateVectorImageFilter.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 otbConcatenateVectorImageFilter_h
22 #define otbConcatenateVectorImageFilter_h
23 
24 #include "itkImageToImageFilter.h"
25 #include "otbVectorImage.h"
26 
27 namespace otb
28 {
35 template <class TInputImage1, class TInputImage2, class TOutputImage>
36 class ITK_EXPORT ConcatenateVectorImageFilter : public itk::ImageToImageFilter<TInputImage1, TOutputImage>
37 {
38 public:
41  typedef itk::ImageToImageFilter<TInputImage1, TOutputImage> Superclass;
42  typedef itk::SmartPointer<Self> Pointer;
43  typedef itk::SmartPointer<const Self> ConstPointer;
44 
46  itkNewMacro(Self);
47 
49  itkTypeMacro(VectorImageToImagePixelAccessor, ImageToImageFilter);
50 
52  typedef TInputImage1 InputImage1Type;
53  typedef TInputImage2 InputImage2Type;
54  typedef TOutputImage OutputImageType;
55 
56  typedef typename InputImage1Type::Pointer InputImage1PointerType;
57  typedef typename InputImage2Type::Pointer InputImage2PointerType;
58  typedef typename OutputImageType::Pointer OutputImagePointerType;
59 
60  typedef typename InputImage1Type::PixelType InputPixel1Type;
61  typedef typename InputImage2Type::PixelType InputPixel2Type;
62 
63  typedef typename OutputImageType::PixelType OutputPixelType;
64  typedef typename OutputImageType::InternalPixelType OutputInternalPixelType;
65  typedef typename OutputImageType::RegionType OutputImageRegionType;
66 
71  void SetInput1(const TInputImage1* image);
72 
77  InputImage1Type* GetInput1(void);
78 
83  void SetInput2(const TInputImage2* image);
84 
89  InputImage2Type* GetInput2(void);
90 
92  itkStaticConstMacro(InputImage1Dimension, unsigned int, TInputImage1::ImageDimension);
93  itkStaticConstMacro(InputImage2Dimension, unsigned int, TInputImage2::ImageDimension);
94  itkStaticConstMacro(OutputImageDimension, unsigned int, TOutputImage::ImageDimension);
96 
97 protected:
100 
102  ~ConcatenateVectorImageFilter() override;
103  void GenerateOutputInformation() override;
104  void BeforeThreadedGenerateData() override;
105 
107  void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, itk::ThreadIdType threadId) override;
108 
110  void PrintSelf(std::ostream& os, itk::Indent indent) const override;
111 
112 private:
113  ConcatenateVectorImageFilter(const Self&) = delete;
114  void operator=(const Self&) = delete;
115 };
116 } // end namespace otb
117 #ifndef OTB_MANUAL_INSTANTIATION
119 #endif
120 #endif
otb::ConcatenateVectorImageFilter::Self
ConcatenateVectorImageFilter Self
Definition: otbConcatenateVectorImageFilter.h:40
otb::ConcatenateVectorImageFilter::InputPixel1Type
InputImage1Type::PixelType InputPixel1Type
Definition: otbConcatenateVectorImageFilter.h:60
otbVectorImage.h
otb::ConcatenateVectorImageFilter::InputImage2Type
TInputImage2 InputImage2Type
Definition: otbConcatenateVectorImageFilter.h:53
otb::ConcatenateVectorImageFilter::OutputPixelType
OutputImageType::PixelType OutputPixelType
Definition: otbConcatenateVectorImageFilter.h:63
otb::ConcatenateVectorImageFilter::InputImage2PointerType
InputImage2Type::Pointer InputImage2PointerType
Definition: otbConcatenateVectorImageFilter.h:57
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::ConcatenateVectorImageFilter::OutputImageType
TOutputImage OutputImageType
Definition: otbConcatenateVectorImageFilter.h:54
otb::ConcatenateVectorImageFilter::Superclass
itk::ImageToImageFilter< TInputImage1, TOutputImage > Superclass
Definition: otbConcatenateVectorImageFilter.h:41
otbConcatenateVectorImageFilter.hxx
otb::ConcatenateVectorImageFilter::InputPixel2Type
InputImage2Type::PixelType InputPixel2Type
Definition: otbConcatenateVectorImageFilter.h:61
otb::ConcatenateVectorImageFilter::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbConcatenateVectorImageFilter.h:42
otb::ConcatenateVectorImageFilter::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbConcatenateVectorImageFilter.h:43
otb::ConcatenateVectorImageFilter::InputImage1PointerType
InputImage1Type::Pointer InputImage1PointerType
Definition: otbConcatenateVectorImageFilter.h:56
otb::ConcatenateVectorImageFilter::OutputImagePointerType
OutputImageType::Pointer OutputImagePointerType
Definition: otbConcatenateVectorImageFilter.h:58
otb::ConcatenateVectorImageFilter::InputImage1Type
TInputImage1 InputImage1Type
Definition: otbConcatenateVectorImageFilter.h:49
otb::ConcatenateVectorImageFilter
This filter concatenates the vector pixel of the first image with the vector pixel of the second imag...
Definition: otbConcatenateVectorImageFilter.h:36
otb::ConcatenateVectorImageFilter::OutputInternalPixelType
OutputImageType::InternalPixelType OutputInternalPixelType
Definition: otbConcatenateVectorImageFilter.h:64
otb::ConcatenateVectorImageFilter::OutputImageRegionType
OutputImageType::RegionType OutputImageRegionType
Definition: otbConcatenateVectorImageFilter.h:65