File failed to load: https://isis.astrogeology.usgs.gov/dev/Object/assets/jax/output/NativeMML/config.js
Isis Developer Reference
GdalIoHandler.h
Go to the documentation of this file.
1
5
6/* SPDX-License-Identifier: CC0-1.0 */
7
8#ifndef GdalIoHandler_h
9#define GdalIoHandler_h
10
11#include "Constants.h"
12#include "ImageIoHandler.h"
13#include "SpecialPixel.h"
14
15#include "gdal_priv.h"
16
17class QFile;
18class QMutex;
19class QString;
20template <typename A> class QList;
21
22namespace Isis {
23 class Buffer;
25 class Pvl;
26
45 public:
46 GdalIoHandler(QString &dataFilePath, const QList<int> *virtualBandList, GDALDataType pixelType = GDT_Float64, GDALAccess eAccess=GA_ReadOnly);
47 GdalIoHandler(GDALDataset *geodataSet, const QList<int> *virtualBandList, GDALDataType pixelType = GDT_Float64);
48 void init();
49 virtual ~GdalIoHandler();
50
51 virtual void read(Buffer &bufferToFill) const;
52 virtual void write(const Buffer &bufferToWrite);
53
54 virtual BigInt getDataSize() const;
60 virtual void updateLabels(Pvl &labels);
61
62 virtual void clearCache(bool blockForWriteCache=false) {
63 m_geodataSet->FlushCache(blockForWriteCache);
64 }
65
66 private:
67 void readPixelType(double *doubleBuff, void *rawBuff, int idx) const;
68 bool writePixelType(double *doubleBuff, void *rawBuff, int idx) const;
69
70 GDALDataset *m_geodataSet = nullptr;
71 std::string m_geodataSetPath = "";
72 GDALDataType m_pixelType;
73 int m_lines;
74 int m_samples;
75 int m_bands;
76 double m_offset;
77 double m_scale;
78 unsigned char *m_maskBuff = nullptr;
79 bool m_datasetOwner = false;
80 double m_gdalNoDataValue = NULL8;
81 std::string m_driverName;
82 };
83}
84
85#endif
Buffer for reading and writing cube data.
Definition Buffer.h:53
This is the parent of the caching algorithms.
Definition CubeCachingAlgorithm.h:31
virtual void write(const Buffer &bufferToWrite)
Definition GdalIoHandler.cpp:170
GdalIoHandler(QString &dataFilePath, const QList< int > *virtualBandList, GDALDataType pixelType=GDT_Float64, GDALAccess eAccess=GA_ReadOnly)
Definition GdalIoHandler.cpp:20
void init()
Definition GdalIoHandler.cpp:42
virtual void updateLabels(Pvl &labels)
Function to update the labels with a Pvl object.
Definition GdalIoHandler.cpp:261
virtual ~GdalIoHandler()
Definition GdalIoHandler.cpp:66
virtual BigInt getDataSize() const
Definition GdalIoHandler.cpp:253
virtual void clearCache(bool blockForWriteCache=false)
Definition GdalIoHandler.h:62
virtual void read(Buffer &bufferToFill) const
Definition GdalIoHandler.cpp:76
ImageIoHandler(const QList< int > *virtualBandList)
Definition ImageIoHandler.cpp:12
Container for cube-like labels.
Definition Pvl.h:122
This is free and unencumbered software released into the public domain.
Definition BoxcarCachingAlgorithm.h:13
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16
long long int BigInt
Big int.
Definition Constants.h:49
const double NULL8
Definition SpecialPixel.h:94