OTB  6.1.0
Orfeo Toolbox
otbConcatenateVectorImageFilter.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2017 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>
37  : public itk::ImageToImageFilter<TInputImage1, TOutputImage>
38 {
39 public:
45 
47  itkNewMacro(Self);
48 
50  itkTypeMacro(VectorImageToImagePixelAccessor, ImageToImageFilter);
51 
53  typedef TInputImage1 InputImage1Type;
54  typedef TInputImage2 InputImage2Type;
55  typedef TOutputImage OutputImageType;
56 
57  typedef typename InputImage1Type::Pointer InputImage1PointerType;
58  typedef typename InputImage2Type::Pointer InputImage2PointerType;
59  typedef typename OutputImageType::Pointer OutputImagePointerType;
60 
61  typedef typename InputImage1Type::PixelType InputPixel1Type;
62  typedef typename InputImage2Type::PixelType InputPixel2Type;
63 
64  typedef typename OutputImageType::PixelType OutputPixelType;
65  typedef typename OutputImageType::InternalPixelType OutputInternalPixelType;
66  typedef typename OutputImageType::RegionType OutputImageRegionType;
67 
72  void SetInput1(const TInputImage1 * image);
73 
78  InputImage1Type * GetInput1(void);
79 
84  void SetInput2(const TInputImage2 * image);
85 
90  InputImage2Type * GetInput2(void);
91 
93  itkStaticConstMacro(InputImage1Dimension, unsigned int, TInputImage1::ImageDimension);
94  itkStaticConstMacro(InputImage2Dimension, unsigned int, TInputImage2::ImageDimension);
95  itkStaticConstMacro(OutputImageDimension, unsigned int, TOutputImage::ImageDimension);
97 
98 protected:
101 
103  ~ConcatenateVectorImageFilter() ITK_OVERRIDE;
104  void GenerateOutputInformation() ITK_OVERRIDE;
105  void BeforeThreadedGenerateData() ITK_OVERRIDE;
106 
108  void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, itk::ThreadIdType threadId) ITK_OVERRIDE;
109 
111  void PrintSelf(std::ostream& os, itk::Indent indent) const ITK_OVERRIDE;
112 
113 private:
114  ConcatenateVectorImageFilter(const Self &); //purposely not implemented
115  void operator =(const Self&); //purposely not implemented
116 };
117 } // end namespace otb
118 #ifndef OTB_MANUAL_INSTANTIATION
120 #endif
121 #endif
OutputImageType::InternalPixelType OutputInternalPixelType
unsigned int ThreadIdType
itk::SmartPointer< const Self > ConstPointer
itk::ImageToImageFilter< TInputImage1, TOutputImage > Superclass
OutputImageType::RegionType OutputImageRegionType
This filter concatenates the vector pixel of the first image with the vector pixel of the second imag...