OTB  6.7.0
Orfeo Toolbox
otbImageSeriesFileReader.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2019 Centre National d'Etudes Spatiales (CNES)
3  * Copyright (C) 2007-2012 Institut Mines Telecom / Telecom Bretagne
4  *
5  * This file is part of Orfeo Toolbox
6  *
7  * https://www.orfeo-toolbox.org/
8  *
9  * Licensed under the Apache License, Version 2.0 (the "License");
10  * you may not use this file except in compliance with the License.
11  * You may obtain a copy of the License at
12  *
13  * http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  */
21 
22 
23 #ifndef otbImageSeriesFileReader_h
24 #define otbImageSeriesFileReader_h
25 
27 
28 #include "otbObjectList.h"
29 
30 #include "otbExtractROI.h"
33 #include "OTBImageIOExport.h"
34 
35 namespace otb {
36 
50 template <class TImage, class TInternalImage = TImage>
51 class OTBImageIO_EXPORT_TEMPLATE ImageSeriesFileReader
52  : public ImageSeriesFileReaderBase<TImage, TInternalImage>
53 {
54 public:
55 
61 
63  itkNewMacro(Self);
64 
67 
68  typedef typename Superclass::OutputImageType OutputImageType;
69  typedef typename Superclass::OutputImagePointerType OutputImagePointerType;
70  typedef typename Superclass::PixelType PixelType;
71  typedef typename Superclass::ValueType ValueType;
72  typedef typename Superclass::IndexType IndexType;
73  typedef typename Superclass::SizeType SizeType;
74  typedef typename Superclass::RegionType RegionType;
75 
76  typedef typename Superclass::OutputImageListType OutputImageListType;
77  typedef typename Superclass::OutputImageListPointerType OutputImageListPointerType;
78  typedef typename Superclass::OutputImageListConstPointerType OutputImageListConstPointerType;
79 
80  typedef typename Superclass::InternalImageType InternalImageType;
81  typedef typename Superclass::InternalImagePointerType InternalImagePointerType;
82  typedef typename Superclass::InternalPixelType InternalPixelType;
83  typedef typename Superclass::InternalValueType InternalValueType;
84  typedef typename Superclass::InternalIndexType InternalIndexType;
85  typedef typename Superclass::InternalSizeType InternalSizeType;
86  typedef typename Superclass::InternalRegionType InternalRegionType;
87 
88  typedef typename Superclass::ReaderType ReaderType;
89  typedef typename Superclass::ReaderType ReaderPointerType;
90 
91  typedef typename Superclass::ReaderListType ReaderListType;
92  typedef typename Superclass::ReaderListPointerType ReaderListPointerType;
93 
100  // typedef MultiChannelExtractROI< InternalPixelType, PixelType > ExtractSelectionType;
101  // typedef MultiToMonoChannelExtractROI< InternalPixelType, PixelType > ExtractSelectionType;
102  // typedef ExtractROI< InternalPixelType, PixelType > ExtractSelectionType;
105 
108 
110 
111 protected:
114 
118  virtual void TestBandSelection(std::vector<unsigned int>& itkNotUsed(bands)) {}
119 
126  virtual void GenerateData(DataObjectPointerArraySizeType idx);
127  using Superclass::GenerateData;
128 
134  virtual void AllocateListOfComponents(void);
135 
137  void PrintSelf(std::ostream& os, itk::Indent indent) const
138  {
139  return Superclass::PrintSelf(os, indent);
140  }
141 
146 
147 private:
148  ImageSeriesFileReader (const Self &);
149  void operator =(const Self&);
150 }; // end of class
151 
165 template <class TPixel, class TInternalPixel>
166 class ITK_EXPORT ImageSeriesFileReader<Image<TPixel, 2>, Image<TInternalPixel, 2> >
167  : public ImageSeriesFileReaderBase<Image<TPixel, 2>, Image<TInternalPixel, 2> >
168 {
169 public:
170 
176 
178  itkNewMacro(Self);
179 
182 
183  typedef typename Superclass::OutputImageType OutputImageType;
184  typedef typename Superclass::OutputImagePointerType OutputImagePointerType;
185  typedef typename Superclass::PixelType PixelType;
186  typedef typename Superclass::ValueType ValueType;
188  typedef typename Superclass::SizeType SizeType;
189  typedef typename Superclass::RegionType RegionType;
190 
191  typedef typename Superclass::OutputImageListType OutputImageListType;
192  typedef typename Superclass::OutputImageListPointerType OutputImageListPointerType;
193  typedef typename Superclass::OutputImageListConstPointerType OutputImageListConstPointerType;
194 
195  typedef typename Superclass::InternalImageType InternalImageType;
196  typedef typename Superclass::InternalImagePointerType InternalImagePointerType;
197  typedef typename Superclass::InternalPixelType InternalPixelType;
198  typedef typename Superclass::InternalValueType InternalValueType;
199  typedef typename Superclass::InternalIndexType InternalIndexType;
200  typedef typename Superclass::InternalSizeType InternalSizeType;
201  typedef typename Superclass::InternalRegionType InternalRegionType;
202 
203  typedef typename Superclass::ReaderType ReaderType;
204  typedef typename Superclass::ReaderType ReaderPointerType;
205 
206  typedef typename Superclass::ReaderListType ReaderListType;
207  typedef typename Superclass::ReaderListPointerType ReaderListPointerType;
208 
214 
217 
219 
220 protected:
223 
227  virtual void TestBandSelection(std::vector<unsigned int>& bands);
228 
235  virtual void GenerateData(DataObjectPointerArraySizeType idx);
236  using Superclass::GenerateData;
237 
243  virtual void AllocateListOfComponents(void);
244 
246  void PrintSelf(std::ostream& os, itk::Indent indent) const
247  {
248  return Superclass::PrintSelf(os, indent);
249  }
250 
255 
256 private:
257  ImageSeriesFileReader (const Self &);
258  void operator =(const Self&);
259 }; // end of class specialized for image
260 
273 template <class TPixel, class TInternalPixel>
274 class ITK_EXPORT ImageSeriesFileReader<Image<TPixel, 2>, VectorImage<TInternalPixel, 2> >
275  : public ImageSeriesFileReaderBase<Image<TPixel, 2>, VectorImage<TInternalPixel, 2> >
276 {
277 public:
283 
285  itkNewMacro(Self);
286 
289 
290  typedef typename Superclass::OutputImageType OutputImageType;
291  typedef typename Superclass::OutputImagePointerType OutputImagePointerType;
292  typedef typename Superclass::PixelType PixelType;
293  typedef typename Superclass::ValueType ValueType;
295  typedef typename Superclass::SizeType SizeType;
296  typedef typename Superclass::RegionType RegionType;
297 
298  typedef typename Superclass::OutputImageListType OutputImageListType;
299  typedef typename Superclass::OutputImageListPointerType OutputImageListPointerType;
300  typedef typename Superclass::OutputImageListConstPointerType OutputImageListConstPointerType;
301 
302  typedef typename Superclass::InternalImageType InternalImageType;
303  typedef typename Superclass::InternalImagePointerType InternalImagePointerType;
304  typedef typename Superclass::InternalPixelType InternalPixelType;
305  typedef typename Superclass::InternalValueType InternalValueType;
306  typedef typename Superclass::InternalIndexType InternalIndexType;
307  typedef typename Superclass::InternalSizeType InternalSizeType;
308  typedef typename Superclass::InternalRegionType InternalRegionType;
309 
310  typedef typename Superclass::ReaderType ReaderType;
311  typedef typename Superclass::ReaderType ReaderPointerType;
312 
313  typedef typename Superclass::ReaderListType ReaderListType;
314  typedef typename Superclass::ReaderListPointerType ReaderListPointerType;
315 
321 
324 
326 
327 protected:
330 
334  virtual void TestBandSelection(std::vector<unsigned int>& bands);
335 
342  virtual void GenerateData(DataObjectPointerArraySizeType idx);
343  using Superclass::GenerateData;
344 
350  virtual void AllocateListOfComponents(void);
351 
353  void PrintSelf(std::ostream& os, itk::Indent indent) const
354  {
355  return Superclass::PrintSelf(os, indent);
356  }
357 
362 
363 private:
364  ImageSeriesFileReader (const Self &);
365  void operator =(const Self&);
366 
367 }; // end of class specialized for Image and VectorImage
368 
381 template <class TPixel, class TInternalPixel>
382 class ITK_EXPORT ImageSeriesFileReader<VectorImage<TPixel, 2>, VectorImage<TInternalPixel, 2> >
383  : public ImageSeriesFileReaderBase<VectorImage<TPixel, 2>, VectorImage<TInternalPixel, 2> >
384 {
385 public:
391 
393  itkNewMacro(Self);
394 
397 
398  typedef typename Superclass::OutputImageType OutputImageType;
399  typedef typename Superclass::OutputImagePointerType OutputImagePointerType;
400  typedef typename Superclass::PixelType PixelType;
401  typedef typename Superclass::ValueType ValueType;
403  typedef typename Superclass::SizeType SizeType;
404  typedef typename Superclass::RegionType RegionType;
405 
406  typedef typename Superclass::OutputImageListType OutputImageListType;
407  typedef typename Superclass::OutputImageListPointerType OutputImageListPointerType;
408  typedef typename Superclass::OutputImageListConstPointerType OutputImageListConstPointerType;
409 
410  typedef typename Superclass::InternalImageType InternalImageType;
411  typedef typename Superclass::InternalImagePointerType InternalImagePointerType;
412  typedef typename Superclass::InternalPixelType InternalPixelType;
413  typedef typename Superclass::InternalValueType InternalValueType;
414  typedef typename Superclass::InternalIndexType InternalIndexType;
415  typedef typename Superclass::InternalSizeType InternalSizeType;
417 
418  typedef typename Superclass::ReaderType ReaderType;
419  typedef typename Superclass::ReaderType ReaderPointerType;
420 
421  typedef typename Superclass::ReaderListType ReaderListType;
422  typedef typename Superclass::ReaderListPointerType ReaderListPointerType;
423 
430 
433 
435 
436 protected:
438  ~ImageSeriesFileReader () override {}
439 
443  void TestBandSelection(std::vector<unsigned int>& itkNotUsed(bands)) override{}
444 
451  void GenerateData(DataObjectPointerArraySizeType idx) override;
452  using Superclass::GenerateData;
453 
459  void AllocateListOfComponents(void) override;
460 
462  void PrintSelf(std::ostream& os, itk::Indent indent) const override
463  {
464  return Superclass::PrintSelf(os, indent);
465  }
466 
471 
472 private:
473  ImageSeriesFileReader (const Self &);
474  void operator =(const Self&);
475 }; // end of class specialized for VectorImage
476 
477 } // end of namespace otb
478 
479 #ifndef OTB_MANUAL_INSTANTIATION
481 #endif
482 
483 #endif
ImageSeriesFileReaderBase< VectorImage< TPixel, 2 >, VectorImage< TInternalPixel, 2 > > Superclass
itk::Size< Monteverdi_DIMENSION > SizeType
Definition: mvdTypes.h:137
ImageSeriesFileReaderBase< Image< TPixel, 2 >, VectorImage< TInternalPixel, 2 > > Superclass
Creation of an "otb" vector image which contains metadata.
itk::ImageToImageFilter< InternalImageType, OutputImageType > ExtractSelectionType
Superclass::ReaderListType ReaderListType
Superclass::OutputImageListType OutputImageListType
Superclass::OutputImagePointerType OutputImagePointerType
Superclass::InternalImageType InternalImageType
ImageSeriesFileReaderBase< Image< TPixel, 2 >, Image< TInternalPixel, 2 > > Superclass
InternalImageType::RegionType InternalRegionType
itk::SmartPointer< const Self > ConstPointer
ImageSeriesFileReaderBase< TImage, TInternalImage > Superclass
itk::ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType
Superclass::InternalIndexType InternalIndexType
Superclass::ReaderListPointerType ReaderListPointerType
ExtractSelectionListPointerType m_ExtractorList
Extract a subset of a mono-channel image.
Definition: otbExtractROI.h:43
Superclass::OutputImageType OutputImageType
Superclass::InternalSizeType InternalSizeType
itk::SmartPointer< Self > Pointer
Extract a spatial or spectral subset of a multi-channel image.
Extract a mono channel part of a multi-channel image.
virtual void TestBandSelection(std::vector< unsigned int > &)
Superclass::OutputImageListConstPointerType OutputImageListConstPointerType
Superclass::ReaderType ReaderPointerType
itk::Index< Monteverdi_DIMENSION > IndexType
Definition: mvdTypes.h:133
Superclass::InternalImagePointerType InternalImagePointerType
This class is a generic all-purpose wrapping around an std::vector<itk::SmartPointer<ObjectType> >...
Definition: otbObjectList.h:40
DataObjectPointerArray::size_type DataObjectPointerArraySizeType
itk::ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType
Reader class dedicated to image series reading.
Creation of an "otb" image which contains metadata.
Definition: otbImage.h:89
Superclass::OutputImageListPointerType OutputImageListPointerType
Superclass::InternalPixelType InternalPixelType
Superclass::InternalRegionType InternalRegionType
ObjectList< ExtractSelectionType > ExtractSelectionListType
MultiToMonoChannelExtractROI< InternalPixelType, PixelType > ExtractSelectionType
Superclass::InternalValueType InternalValueType
Superclass::RegionType RegionType
ExtractSelectionType::Pointer ExtractSelectionPointerType
Superclass::ReaderType ReaderType
ExtractSelectionListType::Pointer ExtractSelectionListPointerType
void PrintSelf(std::ostream &os, itk::Indent indent) const