32 #ifndef GDAL_ALG_PRIV_H_INCLUDED
33 #define GDAL_ALG_PRIV_H_INCLUDED
42 typedef enum { GBV_UserBurnValue = 0, GBV_Z = 1, GBV_M = 2
54 unsigned char * pabyChunkBuf;
59 double *padfBurnValue;
60 GDALBurnValueSrc eBurnValueSource;
61 GDALRasterMergeAlg eMergeAlg;
75 typedef void (*llScanlineFunc)(
void *, int, int, int, double );
76 typedef void (*llPointFunc)(
void *, int, int, double );
78 void GDALdllImagePoint(
int nRasterXSize,
int nRasterYSize,
79 int nPartCount,
int *panPartSize,
80 double *padfX,
double *padfY,
double *padfVariant,
81 llPointFunc pfnPointFunc,
void *pCBData );
83 void GDALdllImageLine(
int nRasterXSize,
int nRasterYSize,
84 int nPartCount,
int *panPartSize,
85 double *padfX,
double *padfY,
double *padfVariant,
86 llPointFunc pfnPointFunc,
void *pCBData );
88 void GDALdllImageLineAllTouched(
int nRasterXSize,
int nRasterYSize,
89 int nPartCount,
int *panPartSize,
90 double *padfX,
double *padfY,
92 llPointFunc pfnPointFunc,
void *pCBData );
94 void GDALdllImageFilledPolygon(
int nRasterXSize,
int nRasterYSize,
95 int nPartCount,
int *panPartSize,
96 double *padfX,
double *padfY,
98 llScanlineFunc pfnScanlineFunc,
void *pCBData );
106 #define GP_NODATA_MARKER -51502112
108 template<
class DataType,
class EqualityTest>
class GDALRasterPolygonEnumeratorT
112 void MergePolygon(
int nSrcId,
int nDstId );
113 int NewPolygon( DataType nValue );
119 GInt32 *panPolyIdMap =
nullptr;
120 DataType *panPolyValue =
nullptr;
122 int nNextPolygonId = 0;
125 int nConnectedness = 0;
128 explicit GDALRasterPolygonEnumeratorT(
int nConnectedness=4 );
129 ~GDALRasterPolygonEnumeratorT();
131 void ProcessLine( DataType *panLastLineVal, DataType *panThisLineVal,
135 void CompleteMerges();
140 struct IntEqualityTest
142 bool operator()(
GInt32 a,
GInt32 b)
const {
return a == b; }
145 typedef GDALRasterPolygonEnumeratorT<GInt32, IntEqualityTest> GDALRasterPolygonEnumerator;
147 typedef void* (*GDALTransformDeserializeFunc)(
CPLXMLNode *psTree );
149 void CPL_DLL *GDALRegisterTransformDeserializer(
const char* pszTransformName,
151 GDALTransformDeserializeFunc pfnDeserializeFunc);
152 void CPL_DLL GDALUnregisterTransformDeserializer(
void* pData);
154 void GDALCleanupTransformDeserializerMutex();
158 void* GDALCreateTPSTransformerInt(
int nGCPCount,
const GDAL_GCP *pasGCPList,
159 int bReversed,
char** papszOptions );
161 void CPL_DLL * GDALCloneTransformer(
void *pTransformerArg );
168 template<
class T>
int
173 GByte* pabyGreenBand,
175 int (*pfnIncludePixel)(
int,
int,
void*),
180 GDALProgressFunc pfnProgress,
181 void * pProgressArg );
189 GInt16* pasDynamicColorMap,
191 GDALProgressFunc pfnProgress,
192 void * pProgressArg );
194 #define PRIME_FOR_65536 98317
199 #define MEDIAN_CUT_AND_DITHER_BUFFER_SIZE_65536 (6 * sizeof(int) * PRIME_FOR_65536)
213 GBool GDALFloatEquals(
float A,
float B);
215 struct FloatEqualityTest
217 bool operator()(
float a,
float b) {
return GDALFloatEquals(a,b) == TRUE; }