OTB  10.0.0
Orfeo Toolbox
otbExtendedFilenameToReaderOptions.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2024 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 otbExtendedFilenameToReaderOptions_h
22 #define otbExtendedFilenameToReaderOptions_h
23 
25 #include "OTBExtendedFilenameExport.h"
26 #include <string>
27 
28 namespace otb
29 {
30 
53 class OTBExtendedFilename_EXPORT ExtendedFilenameToReaderOptions : public ExtendedFilenameHelper
54 {
55 public:
58  typedef itk::SmartPointer<Self> Pointer;
59  typedef itk::SmartPointer<const Self> ConstPointer;
61 
63  itkNewMacro(Self);
64 
66  typedef FNameHelperType::OptionMapType MapType;
67  typedef MapType::iterator MapIteratorType;
68 
70  struct OptionType
71  {
72  std::pair<bool, std::string> simpleFileName;
73  std::pair<bool, std::string> extGEOMFileName;
74  std::pair<bool, unsigned int> subDatasetIndex;
75  std::pair<bool, unsigned int> resolutionFactor;
76  std::pair<bool, bool> skipCarto;
77  std::pair<bool, bool> skipGeom;
78  std::pair<bool, bool> skipRpcTag;
79  std::pair<bool, std::string> bandRange;
80  std::vector<std::string> optionList;
81  };
82 
84  void SetExtendedFileName(const char* extFname) override;
85 
86  void SetExtendedFileName(const std::string& extFname) override;
87 
88  /* Get Methods */
89  bool SimpleFileNameIsSet() const;
90  bool ExtGEOMFileNameIsSet() const;
91  const char* GetExtGEOMFileName() const;
92  bool SubDatasetIndexIsSet() const;
93  unsigned int GetSubDatasetIndex() const;
94  bool ResolutionFactorIsSet() const;
95  unsigned int GetResolutionFactor() const;
96  bool SkipCartoIsSet() const;
97  bool GetSkipCarto() const;
98  bool SkipGeomIsSet() const;
99  bool GetSkipGeom() const;
100  bool SkipRpcTagIsSet() const;
101  bool GetSkipRpcTag() const;
102  std::string GetBandRange() const;
103 
105  bool BandRangeIsSet() const;
106 
107 protected:
110  {
111  }
112 
113 private:
115  void operator=(const Self&) = delete;
116 
118 };
119 } // end namespace otb
120 
121 #endif // otbExtendedFilenameToReaderOptions_h
Helper to handle extended filenames.
Converts an extended filename to reader options.
unsigned int GetResolutionFactor() const
const char * GetExtGEOMFileName() const
unsigned int GetSubDatasetIndex() const
void SetExtendedFileName(const char *extFname) override
void SetExtendedFileName(const std::string &extFname) override
ExtendedFilenameToReaderOptions(const Self &)=delete
void operator=(const Self &)=delete
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.