22 #ifndef otbGDALImageIO_h
23 #define otbGDALImageIO_h
34 #include "OTBIOGDALExport.h"
41 class GDALDatasetWrapper;
42 class GDALDataTypeWrapper;
102 itkSetMacro(CompressionLevel,
int);
103 itkGetMacro(CompressionLevel,
int);
107 itkSetMacro(IsComplex,
bool);
108 itkGetMacro(IsComplex,
bool);
112 itkSetMacro(IsVectorImage,
bool);
113 itkGetMacro(IsVectorImage,
bool);
117 itkSetMacro(WriteRPCTags,
bool);
118 itkGetMacro(WriteRPCTags,
bool);
125 m_CreationOptions = opts;
130 return m_CreationOptions;
136 m_NoDataList = noDataList;
143 this->SetIsComplex(isComplexInternalPixelType);
144 this->SetIsVectorImage(isVectorImage);
152 bool CanReadFile(
const char*)
override;
161 void ReadImageInformation()
override;
164 void Read(
void* buffer)
override;
167 virtual void ReadVolume(
void* buffer);
170 bool GetSubDatasetInfo(std::vector<std::string>& names, std::vector<std::string>& desc);
173 bool GDALPixelTypeIsComplex();
179 bool CanWriteFile(
const char*)
override;
182 bool CanStreamWrite()
override;
186 void WriteImageInformation()
override;
190 void Write(
const void* buffer)
override;
193 bool GetAvailableResolutions(std::vector<unsigned int>& res);
196 bool GetResolutionInfo(std::vector<unsigned int>& res, std::vector<std::string>& desc);
203 unsigned int GetOverviewsCount()
override;
206 std::vector<std::string> GetOverviewsInfo()
override;
209 std::string GetGdalPixelTypeAsString()
const;
211 int GetNbBands()
const override;
216 std::string GetResourceFile(std::string
const& s=
"")
const override;
217 std::vector<std::string> GetResourceFiles()
const override;
221 std::string GetMetadataValue(std::string
const& path,
bool& hasValue,
int band = -1)
const override;
225 void SetMetadataValue(
const char * path,
const char * value,
int band=-1)
override;
228 void SetEpsgCode(
const unsigned int wellKnownCRS);
234 "GetNumberOf() not yet implemented in otbGDALImageIO");
238 unsigned int GetAttributId(std::string
const&, std::string
const&)
const override
241 "GetAttributId() not yet implemented in otbGDALImageIO");
262 void GDALMetadataReadRPC();
265 void GDALMetadataWriteRPC(GDALDataset*);
267 void PrintSelf(std::ostream& os, itk::Indent indent)
const override;
269 void InternalReadImageInformation();
272 void InternalWriteImageInformation(
const void* buffer);
291 void operator=(
const Self&) =
delete;
294 std::string GetGdalWriteImageFileName(
const std::string& gdalDriverShortName,
const std::string& filename)
const;
296 std::string FilenameToGdalDriverShortName(
const std::string& name)
const;
299 bool GetOriginFromGMLBox(std::vector<double>& origin);
304 bool CreationOptionContains(std::string partialOption)
const;
307 void ExportMetadata();
310 void ImportMetadata();
321 bool GDALInfoReportCorner(
const char* corner_name,
double x,
double y,
double& dfGeoX,
double& dfGeoY)
const;
366 #endif // otbGDALImageIO_h