OTB  5.0.0
Orfeo Toolbox
otbConcatenateVectorImageFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ORFEO Toolbox
4  Language: C++
5  Date: $Date$
6  Version: $Revision$
7 
8 
9  Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
10  See OTBCopyright.txt for details.
11 
12 
13  This software is distributed WITHOUT ANY WARRANTY; without even
14  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15  PURPOSE. See the above copyright notices for more information.
16 
17 =========================================================================*/
18 #ifndef __otbConcatenateVectorImageFilter_h
19 #define __otbConcatenateVectorImageFilter_h
20 
21 #include "itkImageToImageFilter.h"
22 #include "otbVectorImage.h"
23 
24 namespace otb
25 {
32 template<class TInputImage1, class TInputImage2, class TOutputImage>
34  : public itk::ImageToImageFilter<TInputImage1, TOutputImage>
35 {
36 public:
42 
44  itkNewMacro(Self);
45 
47  itkTypeMacro(VectorImageToImagePixelAccessor, ImageToImageFilter);
48 
50  typedef TInputImage1 InputImage1Type;
51  typedef TInputImage2 InputImage2Type;
52  typedef TOutputImage OutputImageType;
53 
54  typedef typename InputImage1Type::Pointer InputImage1PointerType;
55  typedef typename InputImage2Type::Pointer InputImage2PointerType;
56  typedef typename OutputImageType::Pointer OutputImagePointerType;
57 
58  typedef typename InputImage1Type::PixelType InputPixel1Type;
59  typedef typename InputImage2Type::PixelType InputPixel2Type;
60 
61  typedef typename OutputImageType::PixelType OutputPixelType;
62  typedef typename OutputImageType::InternalPixelType OutputInternalPixelType;
63  typedef typename OutputImageType::RegionType OutputImageRegionType;
64 
69  void SetInput1(const TInputImage1 * image);
70 
75  InputImage1Type * GetInput1(void);
76 
81  void SetInput2(const TInputImage2 * image);
82 
87  InputImage2Type * GetInput2(void);
88 
90  itkStaticConstMacro(InputImage1Dimension, unsigned int, TInputImage1::ImageDimension);
91  itkStaticConstMacro(InputImage2Dimension, unsigned int, TInputImage2::ImageDimension);
92  itkStaticConstMacro(OutputImageDimension, unsigned int, TOutputImage::ImageDimension);
94 
95 protected:
98 
100  virtual ~ConcatenateVectorImageFilter();
101  virtual void GenerateOutputInformation();
102  virtual void BeforeThreadedGenerateData();
103 
105  virtual void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, itk::ThreadIdType threadId);
106 
108  void PrintSelf(std::ostream& os, itk::Indent indent) const;
109 
110 private:
111  ConcatenateVectorImageFilter(const Self &); //purposely not implemented
112  void operator =(const Self&); //purposely not implemented
113 };
114 } // end namespace otb
115 #ifndef OTB_MANUAL_INSTANTIATION
117 #endif
118 #endif
OutputImageType::InternalPixelType OutputInternalPixelType
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...
unsigned int ThreadIdType