QGIS API Documentation 3.41.0-Master (d5b93354e9c)
Loading...
Searching...
No Matches
qgsrasterresampler.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsrasterresampler.h
3 --------------------
4 begin : December 2011
5 copyright : (C) 2011 by Marco Hugentobler
6 email : marco at sourcepole dot ch
7 ***************************************************************************/
8
9/***************************************************************************
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 ***************************************************************************/
17
18#ifndef QGSRASTERRESAMPLER_H
19#define QGSRASTERRESAMPLER_H
20
21#include <QString>
22#include "qgis_core.h"
23#include "qgis_sip.h"
24
25class QString;
26class QImage;
27class QSize;
28
33class CORE_EXPORT QgsRasterResampler
34{
35 //SIP_TYPEHEADER_INCLUDE( "qgsbilinearrasterresampler.h" );
36 //SIP_TYPEHEADER_INCLUDE( "qgscubicrasterresampler.h" );
37
38
39#ifdef SIP_RUN
41 if ( dynamic_cast<QgsBilinearRasterResampler *>( sipCpp ) != NULL )
42 sipType = sipType_QgsBilinearRasterResampler;
43 else if ( dynamic_cast<QgsCubicRasterResampler *>( sipCpp ) != NULL )
44 sipType = sipType_QgsCubicRasterResampler;
45 else
46 sipType = 0;
48#endif
49
50 public:
51 virtual ~QgsRasterResampler() = default;
52
61 Q_DECL_DEPRECATED virtual void resample( const QImage &srcImage, QImage &dstImage ) = 0 SIP_DEPRECATED;
62
67 virtual QString type() const = 0;
68
74 virtual QgsRasterResampler *clone() const = 0 SIP_FACTORY;
75
83 virtual int tileBufferPixels() const { return 0; }
84};
85
86
94class CORE_EXPORT QgsRasterResamplerV2 : public QgsRasterResampler
95{
96 public:
97
103 virtual QImage resampleV2( const QImage &source, const QSize &size ) = 0;
104
105};
106
107#endif // QGSRASTERRESAMPLER_H
Cubic Raster Resampler.
Interface for resampling rasters (V2) (e.g.
virtual QImage resampleV2(const QImage &source, const QSize &size)=0
Resamples a source image to the specified size.
Interface for resampling rasters (e.g.
virtual int tileBufferPixels() const
Returns the optional tile buffer size in pixels.
virtual ~QgsRasterResampler()=default
virtual Q_DECL_DEPRECATED void resample(const QImage &srcImage, QImage &dstImage)=0
Resamples a source image to a destination image.
virtual QString type() const =0
Gets a descriptive type identifier for this raster resampler.
virtual QgsRasterResampler * clone() const =0
Gets a deep copy of this object.
#define SIP_CONVERT_TO_SUBCLASS_CODE(code)
Definition qgis_sip.h:191
#define SIP_DEPRECATED
Definition qgis_sip.h:106
#define SIP_FACTORY
Definition qgis_sip.h:76
#define SIP_END
Definition qgis_sip.h:208