15#ifndef GDALCOLORTABLE_H_INCLUDED
16#define GDALCOLORTABLE_H_INCLUDED
35 std::vector<GDALColorEntry> aoEntries{};
67 static std::unique_ptr<GDALColorTable>
GDALColorTable(GDALPaletteInterp=GPI_RGB)
Construct a new color table.
Definition gdalcolortable.cpp:41
int IsSame(const GDALColorTable *poOtherCT) const
Returns if the current color table is the same as another one.
Definition gdalcolortable.cpp:451
static GDALColorTableH ToHandle(GDALColorTable *poCT)
Convert a GDALColorTable* to a GDALRasterBandH.
Definition gdal_colortable.h:72
const GDALColorEntry * GetColorEntry(int i) const
Fetch a color entry from table.
Definition gdalcolortable.cpp:101
GDALColorTable(const GDALColorTable &)=default
Copy constructor.
static std::unique_ptr< GDALColorTable > LoadFromFile(const char *pszFilename)
Load a color table from a (text) file.
Definition gdalcolortable.cpp:562
GDALPaletteInterp GetPaletteInterpretation() const
Fetch palette interpretation.
Definition gdalcolortable.cpp:323
int GetColorEntryAsRGB(int i, GDALColorEntry *poEntry) const
Fetch a table entry in RGB format.
Definition gdalcolortable.cpp:149
void SetColorEntry(int i, const GDALColorEntry *poEntry)
Set entry in color table.
Definition gdalcolortable.cpp:198
GDALColorTable & operator=(const GDALColorTable &)=default
Copy assignment operator.
bool IsIdentity() const
Returns if the current color table is the identity, that is for each index i, colortable[i]....
Definition gdalcolortable.cpp:470
~GDALColorTable()
Destructor.
GDALColorTable(GDALColorTable &&)=default
Move constructor.
GDALColorTable & operator=(GDALColorTable &&)=default
Move assignment operator.
GDALColorTable * Clone() const
Make a copy of a color table.
Definition gdalcolortable.cpp:249
int CreateColorRamp(int nStartIndex, const GDALColorEntry *psStartColor, int nEndIndex, const GDALColorEntry *psEndColor)
Create color ramp.
Definition gdalcolortable.cpp:364
int GetColorEntryCount() const
Get number of color entries in table.
Definition gdalcolortable.cpp:285
static GDALColorTable * FromHandle(GDALColorTableH hCT)
Convert a GDALColorTableH to a GDALColorTable*.
Definition gdal_colortable.h:79
Core portability definitions for CPL.
Public (C callable) GDAL entry points.
GDALPaletteInterp
Definition gdal.h:351
@ GPI_RGB
Definition gdal.h:353
void * GDALColorTableH
Opaque type used for the C bindings of the C++ GDALColorTable class.
Definition gdal_fwd.h:54
Color tuple.
Definition gdal.h:2185